Repository navigation
Conversation
Walk USD ancestors with prim parents instead of a string rule, convert matrices in one module-level helper, and import pxr at module level. Add a frame-view test that reads a subset of cameras before sim.forward(), which is what a partial environment reset does, and shrink the changelog entry.
Reject a Fabric prim without a USD counterpart instead of seeding identity. Compose the local matrix with XformCache.ComputeRelativeTransform, which stays exact for a singular anchor, and only when the local matrix is seeded. Reuse get_first_matching_ancestor_prim and the usdrt matrix constructor. The view-level test now rotates and scales the environment prims, so a wrong matrix order or a missing parent local fails it, and closes its view through a finalizer.
Contributor
Author
|
run-ci |
5 of 8 tasks
pv-nvidia
added a commit
that referenced
this pull request
Oct 20, 2026
# Description With PhysX and a camera that Kit does not render (for example the Newton Warp renderer), every camera whose environment resets moves to its env-local pose. The camera then renders an empty floor instead of its environment. Training runs are affected after the first episode. Fabric frame views seed their transforms with usdrt's `*XformFromUsd` helpers, which write legacy transform attributes. Only the host Fabric Hierarchy update turns these into the `omni:fabric` matrices, and Kit runs that update every frame only when the Fabric Scene Delegate is on. The headless experience has it off. PhysX's GPU hierarchy update then rebuilt the environment prims from identity local matrices. This PR runs the host Fabric Hierarchy update once after each Fabric xform selection seeds its transforms. It replaces #8682. ## 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` `release/3.0.0` needs its own PR, because its `PhysxManager.play()` differs. ## Validation `Isaac-Lift-KukaAllegro-Camera`, PhysX, Newton Warp renderer, 8192 environments, RTX A6000: - On `c8a06a87c`, after all environments reset, all 8192 cameras are correct in training and in the `summary` benchmark mode. - On the current `develop`, no camera falls back to its env-local pose anymore. A separate regression on `develop` assigns cameras to the wrong environments, with or without this PR. It also happens with the Fabric Scene Delegate on. - The new test `test_hierarchy_update_keeps_seeded_world_poses` fails without the fix and passes with it. - The Fabric frame view tests, the RTX rigid object rendering tests, the #8428 first-frame tests, the simulation context tests, and the Kit pause/resume tests pass. - Startup cost: the runtime benchmark (`isaaclab.benchmark.entrypoints.runtime --benchmark_formatter json --num_envs 8192 --num_steps 300 --warmup_steps 50 --seed 42 presets=isaacsim_physx`, two runs each) reported a "simulation start" time of 110.9 s and 112.1 s on `c8a06a87c`. With the host update (`a5211fa0d`), it reported 113.8 s and 113.6 s. FPS and peak memory stayed within run-to-run noise. ## 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 `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [ ] 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 --------- Co-authored-by: pv-nvidia <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With GPU PhysX, the camera of every environment that resets after the first reset moves to its env-local pose. The camera then renders from near the world origin, which usually shows an empty ground plane. Training with
isaaclab train(no RTX extensions) shows this for every camera task, for exampleIsaac-Lift-KukaAllegro-Camera.Root cause
FabricXformSelectionseeds the Fabric matrices of the frame views and their parents. It calledusdrt.Rt.Xformable.SetLocalXformFromUsd()andSetWorldXformFromUsd(). These helpers do not write the Fabric Hierarchy matrices. They write the legacy OmniHydra attributes_localMatrix,_worldPosition,_worldOrientation, and_worldScale(seeusdrt.scenegraph/Xformable.cpp). Thus,omni:fabric:localMatrixandomni:fabric:worldMatrixkept their identity defaults.FabricFrameViewthen wrote the child matrices and the parent world matrices on the GPU, but not the parent local matrices. Fabric Hierarchy composesworldMatrix = localMatrix * world(ancestor). So the next hierarchy update, whichsim.forward()runs throughomni.physx.fabric, set the world matrix of eachenv_Nto identity.Camera.reset()reads the pose from Fabric after that update, so each reset camera got its env-local pose.The bug came in with #5677. #8433 made it visible: before #8433, the Fabric stage re-attach at play rebuilt the parent matrices.
Fix
FabricXformSelectionnow writesomni:fabric:worldMatrixandomni:fabric:localMatrixwith values from USD:omni:fabric:localMatrix, because Fabric Hierarchy treats ancestors without Fabric matrices as identity. This is not always the USD local transform.The Newton site mirror (
seed_from_usd=False) uses the same code for the attributes that it creates.Tests
The new test
test_partial_env_reset_keeps_camera_world_posebuilds 4 cloned environments with a Warp camera. It resets all environments, then resets environments 1 and 2, and checks the camera world positions. The test fails without the fix (the reset cameras are off by the distance of their env origin) and passes with it.A bare test stage cannot show this bug: there,
sim.reset()writes the parent matrices from USD. The test therefore uses cloned environments and the env reset path, where the bug occurs in training.Validation
All runs on an RTX PRO 5000 Blackwell with Isaac Sim 6.1.
isaaclab trainIsaac-Lift-KukaAllegro-Camera, 64 envs, 3 iterations: cameras off their env posetest_views_xform_prim_fabric.pytest_views_xform_prim_newton.pytest_first_frame_textured_rendering.py(#8428)Golden rendering tests are still running. I will post the result in a comment.
Limitations and follow-ups
FabricFrameView._sync_fabric_from_usd_initialnow writes the same values a second time on the GPU. This change keeps it. A follow-up can remove it._world*attributes take precedence in OmniHydra, so RTX rendering can behave differently.Type of change
Checklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there