Repository navigation
Add reset tests - #7891
Add reset tests#7891
Conversation
|
run-ci |
|
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the added ManagerBasedEnv reset regression coverage, which verifies that reset restores the cube’s default pose and matching depth silhouette without advancing physics, along with the package .skip changelog fragment.
- Design and architecture: The test builds the scene using existing environment, asset, camera, and observation abstractions and reliably closes the environment in a
finallyblock. The main non-blocking tradeoff is placing an environment-reset regression in a sensor rendering test module, which broadens that module’s imports and responsibilities. - API: No public APIs, exports, defaults, or type contracts are changed. The test consumes existing environment, camera-observation, and rigid-object interfaces, and the test-only package change includes the required
.skipchangelog fragment. - Implementation: The reset path, world-frame pose construction using environment origins, moved-pose reference, physics-step-count invariant, and depth-mask IoU comparison are internally consistent. The fixed silhouette-separation and IoU thresholds may require adjustment if the camera or scene constants change, but this is a non-blocking maintenance tradeoff.
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.
|
Backported to |
# Description Add some tests for: #6394 Fixes # (issue) <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) 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 <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> (cherry picked from commit c4b81fa)
…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 <[email protected]> Co-authored-by: Zihan Xu <[email protected]>
# Description On GPU PhysX, the first camera observation from `env.reset()` showed rigid bodies at their spawn pose. The state observations were correct. A physics step made the image correct. Fixes #8428. This PR includes the regression test from #8427 (commit by @Jean-Francois-Lafleche). ## Root cause The renderer is correct. Fabric is stale. After the first `env.reset()` on `cuda:0`, the cube has these x positions: | Source | x [m] | | --- | --- | | PhysX tensor view (`root_view.get_transforms()`) | -0.20 (reset pose) | | Fabric `omni:fabric:worldMatrix` | -0.35 (spawn pose) | | Rendered silhouette | spawn pose | The cause is the Fabric re-synchronization in `PhysxManager.play()` (#5178, #5610). The sequence is: 1. `SimulationContext.reset()` calls `PhysxManager.play()` on the initial stop-to-play transition. 2. `play()` calls `_sync_fabric_after_resume()`, which detaches and re-attaches the `omni.physx.fabric` stage. 3. After the re-attach, `force_update()` ignores poses written through the GPU tensor API until the next `simulate()`. 4. `ManagerBasedEnv.reset()` writes the reset pose through the GPU tensor API. `forward()` calls `force_update()`, but Fabric keeps the spawn pose. These checks confirm the sequence: * With `_re_sync_fabric()` disabled, the first reset frame shows the reset pose at step 0. * A raw `simulate()` before `env.reset()` also fixes the frame. The same call at the end of `PhysxManager.reset()`, before `play()`, does not. * `fabric.update()`, `fabricUseGPUInterop=false`, and an extra detach/attach with `force_update()` do not fix the frame. * The CPU pipeline is not affected. * After the first physics step, later resets publish correctly without a step. This is why the test from #7891 passes. ## Change `PhysxManager.play()` now re-syncs Fabric only when the timeline resumes from pause. A fresh stop-to-play transition does not need the #4279 workaround. The #4279 workaround is still necessary on Isaac Sim 6.1. With the re-sync removed completely, the Kit pause/resume test fails: the robot stays frozen after resume (12 changed pixels, at least 100 required). ## Remaining PhysX defect This PR avoids the defect at start-up only. The defect itself is in `omni.physx.fabric` 110.3.2. After `detach_stage()` and `attach_stage()`, `force_update()` does not publish GPU tensor API pose writes until the next `simulate()`. The `force_update()` docstring says that it updates Fabric "even if simulation did not run", so this behavior is a PhysX defect. Thus, this sequence still returns a stale first frame: ```python sim.pause() sim.play() # re-attaches Fabric env.reset() # reset poses do not reach Fabric before a physics step ``` A PhysX ticket for this defect will be filed and linked in #8428. When PhysX fixes it, Isaac Lab can remove the re-sync condition in `play()`. If PhysX also fixes the #4279 resume freeze, Isaac Lab can remove the detach/attach workaround. ## Validation Isaac Sim 6.1.0.0, RTX A6000, driver 595.91.07: | Test | Before | After | | --- | --- | --- | | `test_first_frame_textured_rendering.py` | first-reset test failed (IoU 0.370) | 2 passed | | `test_visualizer_integration_physx.py` (Kit pause/resume, #4279) | — | passed | | `test_simulation_context.py` | — | 26 passed | | `test_simulation_context_kit.py` | — | 4 passed | `test_visualizer_tiled_integration_physx.py` fails in my container with `Canvas must be an instance of HeadlessCanvas` (pyglet). It fails the same way without this change. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: JF Lafleche <[email protected]> Co-authored-by: JF Lafleche <[email protected]> Co-authored-by: pv-nvidia <[email protected]> Co-authored-by: Octi Zhang <[email protected]>
On GPU PhysX, the first camera observation from `env.reset()` showed rigid bodies at their spawn pose. The state observations were correct. A physics step made the image correct. Fixes isaac-sim#8428. This PR includes the regression test from isaac-sim#8427 (commit by @Jean-Francois-Lafleche). The renderer is correct. Fabric is stale. After the first `env.reset()` on `cuda:0`, the cube has these x positions: | Source | x [m] | | --- | --- | | PhysX tensor view (`root_view.get_transforms()`) | -0.20 (reset pose) | | Fabric `omni:fabric:worldMatrix` | -0.35 (spawn pose) | | Rendered silhouette | spawn pose | The cause is the Fabric re-synchronization in `PhysxManager.play()` (isaac-sim#5178, isaac-sim#5610). The sequence is: 1. `SimulationContext.reset()` calls `PhysxManager.play()` on the initial stop-to-play transition. 2. `play()` calls `_sync_fabric_after_resume()`, which detaches and re-attaches the `omni.physx.fabric` stage. 3. After the re-attach, `force_update()` ignores poses written through the GPU tensor API until the next `simulate()`. 4. `ManagerBasedEnv.reset()` writes the reset pose through the GPU tensor API. `forward()` calls `force_update()`, but Fabric keeps the spawn pose. These checks confirm the sequence: * With `_re_sync_fabric()` disabled, the first reset frame shows the reset pose at step 0. * A raw `simulate()` before `env.reset()` also fixes the frame. The same call at the end of `PhysxManager.reset()`, before `play()`, does not. * `fabric.update()`, `fabricUseGPUInterop=false`, and an extra detach/attach with `force_update()` do not fix the frame. * The CPU pipeline is not affected. * After the first physics step, later resets publish correctly without a step. This is why the test from isaac-sim#7891 passes. `PhysxManager.play()` now re-syncs Fabric only when the timeline resumes from pause. A fresh stop-to-play transition does not need the isaac-sim#4279 workaround. The isaac-sim#4279 workaround is still necessary on Isaac Sim 6.1. With the re-sync removed completely, the Kit pause/resume test fails: the robot stays frozen after resume (12 changed pixels, at least 100 required). This PR avoids the defect at start-up only. The defect itself is in `omni.physx.fabric` 110.3.2. After `detach_stage()` and `attach_stage()`, `force_update()` does not publish GPU tensor API pose writes until the next `simulate()`. The `force_update()` docstring says that it updates Fabric "even if simulation did not run", so this behavior is a PhysX defect. Thus, this sequence still returns a stale first frame: ```python sim.pause() sim.play() # re-attaches Fabric env.reset() # reset poses do not reach Fabric before a physics step ``` A PhysX ticket for this defect will be filed and linked in isaac-sim#8428. When PhysX fixes it, Isaac Lab can remove the re-sync condition in `play()`. If PhysX also fixes the isaac-sim#4279 resume freeze, Isaac Lab can remove the detach/attach workaround. Isaac Sim 6.1.0.0, RTX A6000, driver 595.91.07: | Test | Before | After | | --- | --- | --- | | `test_first_frame_textured_rendering.py` | first-reset test failed (IoU 0.370) | 2 passed | | `test_visualizer_integration_physx.py` (Kit pause/resume, isaac-sim#4279) | — | passed | | `test_simulation_context.py` | — | 26 passed | | `test_simulation_context_kit.py` | — | 4 passed | `test_visualizer_tiled_integration_physx.py` fails in my container with `Canvas must be an instance of HeadlessCanvas` (pyglet). It fails the same way without this change. - Bug fix (non-breaking change which fixes an issue) - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there Conflict: source/isaaclab_visualizers/test/golden_images/anymal_d/physx-kit-tiled.png keeps the release version. The release refreshed this golden for the published 6.2 checkerboard (isaac-sim#8685), and the version from PR 8433 predates that refresh. The test test_visualizer_golden[physx-anymal_d-kit-tiled] passes with the kept golden. --------- Signed-off-by: JF Lafleche <[email protected]> Co-authored-by: JF Lafleche <[email protected]> Co-authored-by: pv-nvidia <[email protected]> Co-authored-by: Octi Zhang <[email protected]> (cherry picked from commit 4eccae0)
Description
Add some tests for: #6394
Fixes # (issue)
Type of change
Release backport
developScreenshots
Please attach before and after screenshots of the change if applicable.
Checklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there