Skip to content

[Tasks] Fix Warp reorient reset sampling around the lower joint limit - #7970

Merged
StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/warp-reorient-reset-sampling
Sep 23, 2026
Merged

StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/warp-reorient-reset-sampling

Conversation

@StafaH

@StafaH StafaH commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The reset_hand kernel in the experimental Warp reorientation env sampled hand joint reset positions around the lower joint limit instead of between the lower and upper limits:

dof_pos_noise = wp.randf(rng_state[env_id], -1.0, 1.0)
rand_delta = delta_min + (delta_max - delta_min) * 0.5 * dof_pos_noise  # centred on delta_min

As a result, every hand joint reset at or below its default position. With a large enough reset_dof_pos_noise it could also end up outside the joint limits. For example, with limits [-1, 1], default 0.1 and noise scale 0.2, resets fell in [-0.32, 0.08] instead of [-0.12, 0.28].

The torch reorient and handover tasks were already fixed in #6413 via sample_joint_positions_within_limits. This PR applies the same [-1, 1] -> [0, 1] mapping in the Warp kernel, so both versions of the task reset joints over the same range. This was the last copy of the formula from the issue on develop.

Fixes #4404

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Test

I added test_warp_reset_hand_samples_the_same_range_as_the_torch_helper to the existing source/isaaclab_tasks/test/core/test_reorient_utils.py. It launches reset_hand on CPU for 512 envs and checks two things:

  • every sample stays inside the range that sample_joint_positions_within_limits produces;
  • each joint gets samples on both sides of its default.

The test fails without the fix and passes with it (uv run python -m pytest source/isaaclab_tasks/test/core/test_reorient_utils.py: 12 passed).

Checklist

  • I have read and understood the contribution guidelines

  • I have run the pre-commit checks with ./isaaclab.sh --format

  • I have made corresponding changes to the documentation

  • My changes generate no new warnings

  • I have added tests that prove my fix is effective or that my feature works

  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)

  • I have added my name to the CONTRIBUTORS.md or my name already exists there

  • Backport this pull request to the active release branch after it merges into develop

The reset_hand kernel mapped [-1, 1] noise onto a range centred on the lower
joint limit, so hand joints always reset below their default and could leave
the limits. Map the noise to [0, 1] to match sample_joint_positions_within_limits
used by the torch reorientation tasks.

Fixes isaac-sim#4404
@StafaH
StafaH requested a review from a team September 23, 2026 04:45
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 23, 2026
@StafaH StafaH changed the title Fix Warp reorient reset sampling around the lower joint limit [Tasks] Fix Warp reorient reset sampling around the lower joint limit Sep 23, 2026
@StafaH

StafaH commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The patch minimally corrects Warp hand-reset sampling by mapping the random value from [-1, 1] to [0, 1] before interpolation, restoring the intended range between lower and upper joint-limit deltas. Package-specific changelog fragments and focused regression coverage are included.

  • Design and architecture: The Warp and torch reset paths are now behaviorally aligned without introducing a new abstraction or dependency. The regression test in the stable task suite imports the experimental Warp environment, which slightly couples those test surfaces but does not warrant pre-merge action for this cross-implementation parity check.
  • API: No public signature, kernel argument order, dtype, or export changes. The only externally observable change is the intended correction to the sampled joint-position distribution.
  • Implementation: The revised expression maps dof_pos_noise to [0, 1], so rand_delta spans [delta_min, delta_max] and the configured noise scale interpolates from the default position toward either joint limit. RNG advancement, velocity sampling, masking, and target initialization remain unchanged. The test checks both range containment and sampling on each side of the default.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the corrected interpolation matching the established Torch behavior and adequate regression coverage.

Summary

The PR corrects Warp hand-reset sampling by mapping random noise from [-1, 1] to the full interpolation interval between lower and upper joint-limit deltas.

  • Aligns the Warp reset formula with the existing Torch helper.
  • Adds a CPU regression test covering limit bounds and samples on both sides of each default position.
  • Adds changelog fragments for the affected packages.

Reviews (1) · Last reviewed commit: "Fix Warp reorient reset sampling around ..."

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 23, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ooctipus

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 23, 2026
@StafaH

StafaH commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 23, 2026
@StafaH
StafaH merged commit 244496d into isaac-sim:develop Sep 23, 2026
60 of 84 checks passed
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 23, 2026
…#7970)

# Description

The `reset_hand` kernel in the experimental Warp reorientation env
sampled hand joint reset positions around the **lower joint limit**
instead of between the lower and upper limits:

```python
dof_pos_noise = wp.randf(rng_state[env_id], -1.0, 1.0)
rand_delta = delta_min + (delta_max - delta_min) * 0.5 * dof_pos_noise  # centred on delta_min
```

As a result, every hand joint reset at or below its default position.
With a large enough `reset_dof_pos_noise` it could also end up outside
the joint limits. For example, with limits `[-1, 1]`, default `0.1` and
noise scale `0.2`, resets fell in `[-0.32, 0.08]` instead of `[-0.12,
0.28]`.

The torch reorient and handover tasks were already fixed in #6413 via
`sample_joint_positions_within_limits`. This PR applies the same `[-1,
1] -> [0, 1]` mapping in the Warp kernel, so both versions of the task
reset joints over the same range. This was the last copy of the formula
from the issue on `develop`.

Fixes #4404

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Test

I added
`test_warp_reset_hand_samples_the_same_range_as_the_torch_helper` to the
existing `source/isaaclab_tasks/test/core/test_reorient_utils.py`. It
launches `reset_hand` on CPU for 512 envs and checks two things:
- every sample stays inside the range that
`sample_joint_positions_within_limits` produces;
- each joint gets samples on both sides of its default.

The test fails without the fix and passes with it (`uv run python -m
pytest source/isaaclab_tasks/test/core/test_reorient_utils.py`: 12
passed).

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

(cherry picked from commit 244496d)
@isaaclab-bot

isaaclab-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 3d44066.

ooctipus added a commit that referenced this pull request Sep 24, 2026
…ng docs (#7957)

Backports the three changes from the September 20–23 `develop` audit
that are missing from `release/3.0.0`, alongside the existing
cloning-guide backport:

- #7722 (`4cf439dfeb`): reject a second `SimulationContext` construction
instead of silently discarding its configuration. Includes the original
fixture cleanup and regression coverage.
- #7893 (`22fcd71bc4`): validate DelayBuffer lag values before mutating
its live configuration.
- #7947 (`6e9ef17f59`): make `v3.0.0-EA` the default documentation
version in deployment and local multi-version builds.
- #7129 (`354168560f`): clarify that `replicate_physics=False` skips the
active physics context while other declared replication contexts still
run.

**Compatibility:** repeated `SimulationContext(...)` calls now raise.
Retrieve the live context with `SimulationContext.instance()`, or call
`clear_instance()` before constructing a replacement. The original major
changelog fragment includes this migration.

The runtime and test files match current `develop`. The docs-default
backport adapts the release branch's existing redirect template,
validates the target page, and preserves explicit overrides. The
cloning-guide backport preserves the current release APIs; its obsolete
sections were already removed.

## Release audit

Checked all **35 PRs** merged into `develop` from **2026-09-20 16:43:18
UTC** through `cff81e8473` (September 23), against release head
`5d3e0b695e`. **32 are already covered; the remaining three are included
here.** Git history, patch equivalence, GitHub's merged PR list, and
remaining file differences were checked. Branch-specific
version/changelog compilation and existing release-only changes are
preserved.

<details>
<summary>Already covered PRs</summary>

26 have an equivalent patch in release: #7919, #7922, #7923, #7924,
#7925, #6758, #7928, #7902, #7927, #7891, #7931, #7691, #7861, #7929,
#7916, #7939, #4609, #7942, #7940, #7948, #7937, #7955, #7960, #7961,
#7970, #7958.

Six were squash-merged or adapted: #7530 and #7899 in #7926; #7637 in
#7933; #7860 in #7936; #7954 and #7950 in #7964. Their implementation
differences were checked against the current release tree.

</details>

## Validation

- **276 tests passed**: SimulationContext (51, including CPU/CUDA),
headless context construction (15), nine schema/fragment suites (165),
four manager suites (38), and DelayBuffer (7).
- Both backported regressions reproduce with the original release
implementations.
- Docs redirect recipe: local/deployment EA defaults, explicit override,
and missing-target rejection passed with a stubbed Sphinx builder.
- All 22 changed files match the intended backport scope; `uv run
isaaclab -f` and `git diff --check` passed.
- Fresh Sphinx validation (`-b dummy -W --keep-going`): passed without
warnings, excluding static assets as the HTML builder does. Full HTML
documentation CI is running.

Local runtime validation used PyTorch 2.12.0, CUDA 13.0, Isaac Sim
6.0.1.0, and an RTX 5090. Existing runtime/deprecation warnings
occurred; the CI jobs validate the pinned environments.

The previous [docs CI
failure](https://github.com/isaac-sim/IsaacLab/actions/runs/35795116307/job/106972539281)
was an external connection reset fetching the Omniverse intersphinx
inventory, producing one warning under `-W`. That URL returned HTTP 200
when rechecked. This update starts a fresh docs build.

---------

Co-authored-by: hujc <jichuanh@nvidia.com>
Co-authored-by: Zihan Xu <2024010904024@std.uestc.edu.cn>
@StafaH
StafaH deleted the fix/warp-reorient-reset-sampling branch October 10, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] inhand_manipulation _reset_idx might be sampling from a wrong range

2 participants