Repository navigation
Mirror Newton frame-view pose writes onto Fabric transforms - #7691
mataylor-nvidia merged 30 commits into
Conversation
Camera.set_world_poses writes through the sensor's FrameView. Under Newton that view is a NewtonSiteFrameView, whose writes land in Warp site state that the RTX renderer never reads, so camera.data.pos_w reported the new pose while the rendered image stayed at the old one. Under PhysX the equivalent view is Fabric-backed, so no such gap exists. NewtonSiteFrameView now retains the destination prim path of each site and, when a transform writer scope exits, stamps the site world poses onto the prims' Fabric world and local matrices. The local matrix must be written too: Newton's body sync ends in a Fabric hierarchy pass that forward-propagates parent * local onto non-rigid-body prims, which would otherwise overwrite the world matrix on the next render for any frame parented under a body. Frames parented to a Newton body already tracked that body through the same hierarchy pass; only the frame's own write was missing. The Fabric prim tagging, selections and view-to-slot mapping this needs already existed inside FabricFrameView. They move to the new shared isaaclab.sim.views.FabricXformSelection, which both backends now use, with seed_from_usd distinguishing a view that owns Fabric from one that only pushes state onto it. Seeding a Newton-driven prim from USD would reset it to its spawn pose, since Newton never writes poses back to USD. Coverage is partial by design: Newton clones physics without cloning USD, so a site can be real while its destination prim exists on no stage, and those have nothing to render.
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The shared Fabric selection extraction is reasonable, but it changes root-level FabricFrameView behavior by replacing an explicit parent validation with pseudoroot handling. Newton frame writes can also compute a local matrix from stale parent Fabric state when a body and its child frame are moved before rendering.
- Design and architecture: Centralizing Fabric tagging, selections, and slot mapping behind
FabricXformSelectioncleanly supports the PhysX ownership and Newton mirroring paths. However, the abstraction must preserve the existing non-pseudoroot parent requirement for the seeding path, and Newton local-transform derivation should use current Newton-side parent/body state rather than render-synchronized Fabric state. - API: Exporting
FabricXformSelectioncreates a documented public surface, while theFabricFrameViewrefactor preserves its existing private accessors. The sharedparent_pathnevertheless relaxes the prior root-level contract: root-level managed prims now resolve to/instead of raising the targetedRuntimeError. Restore that validation for the Fabric seeding path. - Implementation: The Newton mirror correctly uses the read-write selection and updates both world and local matrices. However,
update_indexed_local_matrix_from_worldreads the parent world matrix from Fabric, which may lag current Newton body state until render-time synchronization. A body pose write followed by a child-frame pose write before rendering can therefore produce an incorrect local matrix that the next hierarchy pass propagates into an incorrect world pose. Derive the local transform from current Newton-side body-relative state.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
Delete the compatibility shims that re-exposed FabricXformSelection state under FabricFrameView's old private names. The class and its tests now reach the selection directly, which removes nine properties and four delegating methods. Drop the per-environment path branch in NewtonSiteFrameView label registration. That code only runs before the Newton model exists, which is exactly when a spec resolves to a single cloned pattern, so the branch taking one path per pattern was unreachable. Tighten the prose in FabricXformSelection and the camera pose test.
The read-only properties forwarded to identically named private fields and added nothing. Promote those fields to public attributes documented in the class docstring, and drop the section-marker docstrings. Also drop two comments in NewtonSiteFrameView that restated the surrounding code.
Bring back the RuntimeError for prims directly under the stage root, which was dropped when _parent_path moved into FabricXformSelection. Returning "/" instead let the pseudoroot flow into the tagging loop as an ordinary parent, trading a specific message for a generic missing-prim error or a silently identity parent transform. The message is generalized off FabricFrameView since NewtonSiteFrameView now shares the selection. Shorten the _mirror_to_fabric docstring and the frame-view test preamble.
| @@ -27,26 +27,6 @@ | |||
| logger = logging.getLogger(__name__) | |||
|
|
|||
|
|
|||
| def _parent_path(prim_path: str) -> str: | |||
There was a problem hiding this comment.
_parent_path moved rather than disappeared: its only caller was the parent-path computation in _initialize_fabric, which is now FabricXformSelection.__init__ in isaaclab/sim/views/fabric_xform_selection.py. It could not stay here, since isaaclab cannot import from isaaclab_physx, and the Newton site view now shares the same selection code.
The body and contract are unchanged, including the RuntimeError for a prim directly under the stage root; only the error message is generalized off FabricFrameView, as both backends now hit it.
Trim docstrings and comments across the Fabric selection, the site frame view, and the PhysX frame view, dropping restatements and the stale note about read-through properties. Remove the Attributes section from FabricXformSelection, whose members are now plain public attributes. Fold the shared setup of the two Newton frame-view tests into a contextmanager, and merge the two camera pose-write tests: they captured the same measurements and asserted on different halves, so the suite built four simulations to check what two can cover. Drop the reported-shift assertion, which the two assert_allclose calls above it already imply.
_mirror_to_fabric derived each frame's local matrix from its parent's Fabric world matrix, but bodies sync to Fabric only at render cadence. After a sim.step(render=False) the parent matrix still held the last rendered pose, so the local came out wrong by the body's motion and the next hierarchy pass composed parent * local into a displaced frame -- a body-attached camera landed metres from the pose that was written. Sync transforms first, which is a no-op unless a step marked them dirty. The new regression test steps 30 times without rendering and fails by 2.5 m without the fix.
Trim the prose this branch added across the shared selection and the Newton site view: drop the Args/Raises block from the private parent-path helper, and compress the tagging, index-dtype, selection-refresh, mirror-init, and read-write-selection notes to the point each was making.
|
All tests from the upstream issue are passing |
05a60ce to
f53d31d
Compare
|
run-ci |
fixed this |
|
run-ci |
| _write_frame_world_position(view, written_position.to(device)) | ||
| _render(sim, device) | ||
|
|
||
| _assert_position(_fabric_position(body_path), body_target) |
There was a problem hiding this comment.
question: running this test locally from this PRs HEAD I get an error on this assertion. @mataylor-nvidia do you get this locally?
There was a problem hiding this comment.
here is what I get locally:
source/isaaclab_newton/test/physics/test_newton_fabric_body_sync.py:618: AssertionError
actual = tensor([0., 0., 0.]), expected = tensor([ 1.5000, -0.7500, 2.0000])
E AssertionError: Tensor-likes are not close!
E Mismatched elements: 3 / 3 (100.0%)
E Greatest absolute difference: 2.0 at index (2,) (up to 0.0001 allowed)
There was a problem hiding this comment.
Isolated it to one line. Flipping newton_site_frame_view.py:614 to seed_from_usd=False and changing nothing else makes all 5 frame-view tests pass; at True this assertion fails.
|
Following test fails on CI: https://github.com/isaac-sim/IsaacLab/actions/runs/35017339386/job/104561924842?pr=7691#step:4:711 I tried to run this locally and also got: I opened the |
This reverts commit 7d6d3ed.
Use the camera FrameView pose write as the single source of generated camera transforms. The old USD workaround reset the transform stack after Fabric writes, breaking Newton tiled renders. Remove its unused flush path and refresh the stale cartpole reference to match the simulated reset pose. Validated 20 focused rendering, body-sync, and camera-pose tests. Ran isaaclab -f with all pre-commit checks passing.
|
run-ci |
|
run-ci |
|
run-ci |
…bric transforms (#7691) (#7935) ## Description Backports #7691 to `release/3.0.0`. Fixes Newton camera/frame pose writes updating physics state without moving the rendered image, and preserves the Fabric body synchronization and visualizer changes from the original PR. Applied merge commit `7c59a04270e9401e7405b7549c7245c2a952563e` without conflicts or changes. The backport patch ID matches the original, including its tests, golden images, and changelog fragments. ## Type of change - Bug fix / release backport ## Validation - `uv run isaaclab -f`: passed, with the changelog base set to the fetched `release/3.0.0` tip. - Newton frame-view suite: 28 passed; all 25 CUDA cases failed at initialization because this host's NVIDIA driver is too old for the pinned CUDA runtime. - Git LFS integrity and diff whitespace checks passed. - Installed the `isaacsim` extra and attempted the camera, Fabric body-sync, and PhysX frame-view tests. Collection stopped at Omniverse Kit's interactive EULA prompt; no rendering tests ran. These tests still need an environment with the license accepted and a compatible GPU driver. ## Checklist - [x] Read the contribution guidelines - [x] Ran formatting and pre-commit checks - [x] Preserved the original regression tests and changelog fragments - [x] Contributor is already listed in CONTRIBUTORS.md - [ ] GPU/rendering tests pass on the release branch - [ ] No new runtime warnings No further release backport requested; this PR targets `release/3.0.0` directly.
…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]>
Update Arena to the Isaac Lab 3.0.0 GA pin and Isaac Sim 6.2. Keep the Isaac Sim base image while installing the pinned Lab and Arena source trees from their frozen uv locks. ## Why this change? Arena was on Lab 3.0 EA and Isaac Sim 6.1. Update to the [Isaac Lab v3.0.0 release](https://github.com/isaac-sim/IsaacLab/releases/tag/v3.0.0), pinned at [`e3f7d9ff1f5d7f8280de3ece9000b7117f66bcf4`](isaac-sim/IsaacLab@e3f7d9f), and adapt Arena to its released APIs and dependencies. ## What changes? ### Docker and uv workflow - Follow the uv-based Docker installation introduced by Isaac Lab [PR #7405](isaac-sim/IsaacLab#7405) and [commit `eed50f77c53`](isaac-sim/IsaacLab@eed50f77c53), while retaining Arena's Isaac Sim base-image stages and editable Lab source. - Interactive container shells alias `python` and `python3` to `isaaclab.sh -p`, and `pytest` to `isaaclab.sh -p -m pytest`, so commands initialize Isaac Sim and execute from `/opt/isaaclab-venv`. - Non-interactive runtime and CI commands invoke `isaaclab.sh -p` explicitly; build-time package operations use `uv pip` or `/opt/isaaclab-venv/bin/python`. `/isaac-sim/python.sh` is no longer a supported Arena entry point because it bypasses the Lab launcher and the locked Lab virtual environment. - Continue building from the Isaac Sim 6.2 image. Copy in uv 0.12.9 and create `/opt/isaaclab-venv` with Isaac Sim's Kit Python. - Sync third-party dependencies from the pinned Isaac Lab submodule's frozen `uv.lock`. The metadata-only stage skips all local path packages; after the complete submodule is copied, a second sync installs its editable packages. - Overlay Arena's non-Lab dependencies from Arena's frozen lock with `uv sync --inexact`, then install Arena editable into the same environment. - Pin uv 0.12.9 in Docker and native CI. Regenerating the lockfile with the newer serializer puts Arena's Linux x86_64 constraint in top-level `resolution-markers` and `supported-markers` and remove it from uv lock edges. ### Torch 2.11 and CUDA 13 handling - Isaac Lab [PR #8372](isaac-sim/IsaacLab#8372) deliberately selects Torch 2.11.0 on CUDA 13.0. Torch 2.12's CUDA 13 NCCL 2.29 can fail beside Kit RTX or OVRTX on Blackwell because of a driver shared-memory accounting issue. Torch 2.11 uses NCCL 2.28.9 and avoids that failure while retaining Isaac Lab's deferred-CUDA-initialization workaround. - Native uv routes `torch==2.11.0` and `torchvision==0.26.0` to the `cu130` PyTorch index. Docker takes those versions from Lab's frozen lock instead of duplicating them in a hand-written constraint list. Arena drops its direct `torchaudio` dependency, matching Lab. - Build cuRobo with the CUDA 13.0 toolkit and `CUDA_HOME=/usr/local/cuda-13.0`, matching PyTorch's CUDA major version. ### Other API and released-stack changes - **Environment reset selectors — Lab [PR #8030](isaac-sim/IsaacLab#8030) and [PR #8015](isaac-sim/IsaacLab#8015 accept Lab's tensor, slice, and `None` environment selections in Arena's environment and recorder reset paths. This is API compatibility, no behavior change. - **Camera observations — Lab [PR #8051](isaac-sim/IsaacLab#8051 replace the removed generic `mdp.image` term with the RGB, depth, normals, or segmentation observation function selected for each modality. Unsupported data types now fail explicitly. - **Newton camera pose propagation — Lab [issue #7676](isaac-sim/IsaacLab#7676), [PR #7691](isaac-sim/IsaacLab#7691), and release backport [PR #7935](isaac-sim/IsaacLab#7935 Lab 3.0 now mirrors Newton `FrameView` pose writes into Fabric so RTX sees camera movement. Remove Arena [PR #1196](#1196) and its `CameraPoseWriter` USD workaround. Camera-extrinsics variations now use Lab `set_local_poses()` directly; retained tests cover rendered images and reported poses under PhysX and Newton with Fabric enabled and disabled. - **Runtime camera intrinsics — Lab [PR #7916](isaac-sim/IsaacLab#7916 replace private USD sensor access and `_update_intrinsic_matrices()` with `Camera.set_intrinsic_matrices()`. Lab's ordinary pinhole runtime API enforces square pixels, so Arena now samples one focal-length delta and applies it to both `fx` and `fy`. **Note:** intrinsics variation has an pre-existing bug before this Lab upgrade which results in env_0 camera params being used for all parallel envs. Fix will go in a separate PR. - **Clone-plan topology — Lab [PR #8045](isaac-sim/IsaacLab#8045), backported in [PR #8073](isaac-sim/IsaacLab#8073 resolve representative scene geometry through asset-prototype IDs, prototype paths, and clone-plan topology instead of the removed `cloner.query.iter_sources()` helper. arena_world_scene_access.py was updated to essentially re-implement the removed helper. - **Franka presets — Lab [PR #8169](isaac-sim/IsaacLab#8169) and [PR #8170](isaac-sim/IsaacLab#8170 select `FRANKA_PANDA_LEGACY_CFG` and `FRANKA_PANDA_LEGACY_HIGH_PD_CFG` explicitly after Lab made the flat Franka asset the default and introduced shared minimal presets. This keeps Arena's nested `/panda` hierarchy, legacy joint names, and existing actuator grouping. - **Replicator kitchen USD — Isaac Sim 6.2 asset update:** update tests for `kitchen_peninsula.usda`, which now exposes 50 physics roots instead of 56. Its `_OnlineVisual` physics roots decrease from 24 to 18, and the previously discovered `_OnlineVisual` articulation is no longer present. - Unit test pick and place success speed thresholds were relax due to large observed residual speed. Root cause unknown yet. ## Validation Passing local checks: - `uv lock --check --no-python-downloads` with uv 0.12.9 - Docker build and Isaac Sim startup/import smoke checks with Torch 2.11.0+cu130 and NCCL 2.28.9 - All RL and IL sample workflow replay and inference commands are validated and producing expected success rate. --------- Signed-off-by: Qian Lin <[email protected]>
Description
Camera.set_world_posesmoves the camera on PhysX but not on Newton:camera.data.pos_wreports the new pose while the rendered image stays at the old one.The write goes through the sensor's
FrameView. Under PhysX that view is Fabric-backed, so the RTX renderer which readsomni:fabric:worldMatrixfollows it. Under Newton the view is aNewtonSiteFrameView, and the write lands in Warp site state that nothing mirrors onto the prim.NewtonSiteFrameViewnow retains each site's destination prim path and, when a transform writer scope exits, stamps the site world poses onto the prims' Fabric world and local matrices. The local matrix matters: Newton's body sync ends in a Fabric hierarchy pass that forward-propagatesparent * localonto non-rigid-body prims, which would otherwise overwrite the world matrix on the next render for any frame parented under a body.Frames parented to a Newton body already tracked that body through that same hierarchy pass. Only the frame's own write was missing. That behaviour is now pinned by a test.
Two constraints are load-bearing and documented at the point they apply:
SetWorldXformFromUsd()resets a prim to its spawn pose, because Newton never writes poses back to USD. Only genuinely absent attributes are created and seeded, and parents never receive a local matrix.Coverage is partial by design: Newton clones physics without cloning USD, so a site can be real while its destination prim exists on no stage, and those have nothing to render.
Refactor
The Fabric prim tagging, selections, and view-to-slot mapping this needs already existed inside
FabricFrameView. They move to a new shared helper,FabricXformSelectioninisaaclab/sim/views/fabric_xform_selection.py, used by both backends, withseed_from_usddistinguishing a view that owns Fabric from one that only pushes state onto it. The helper is deliberately not exported fromisaaclab.sim.views: both backends import it by module path, so it stays an internal cross-backend helper rather than public API.FabricFrameViewloses 259 lines and keeps its private surface intact via read-through properties.Type of change
Release backport
developScreenshots
test_camera_pose_write_moves_renderfrom gh issue #7676, run withISAACLAB_TEST_SAVE_IMAGES=1. A downward-looking camera is moved from 2 m to 8 m over the ground plane byCamera.set_world_posesnow working for both backends. The orange marker sits under the camera; the blue and green ones are outside the frame at 2 m and only come into view at 8 m. Depth is greyscaled against a fixed 12 m scale, so a camera that did not move would render identically at both heights.Both backends report mean visible depth 1.929 m at 2 m and 8.290 m at 8 m, a 4.30x ratio against the test's 1.5x threshold. The Newton and PhysX frames are byte-identical at both heights. Before this change the Newton renders stayed at the 2 m pose.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there