Repository navigation
Fix camera-extrinsics variation under Newton - #1196
Conversation
- Add isaaclab_arena/patches/CameraLocalOffsetWriter: mirror a camera's local-pose offset onto both the physics FrameView (camera.data.pos_w) and the USD camera prim via UsdFrameView (the RTX render), then camera.reset. Under Newton the FrameView is Warp-only and the render reads the USD/Fabric prim, so both writes are needed; tagged [isaac-lab-camera-pose-write-bug] for removal once fixed upstream. - Use the writer in the camera-extrinsics variation (drops the direct camera._view write). - Add render- and pose-level tests across PhysX and Newton; they use the Franka camera (builds under Newton) and pass with the fix, fail without it. Signed-off-by: Alex Millane <[email protected]>
alexmillane
left a comment
There was a problem hiding this comment.
Self review 1.
- Rename CameraLocalOffsetWriter to CameraPoseWriter and move the decalibration offset calculation back into camera_extrinsics_variation.py; the class now only writes a given local pose (physics FrameView + USD prim + camera.reset). - Inline the frame-agreement tolerances; trim the patches package docstring. Signed-off-by: Alex Millane <[email protected]>
alexmillane
left a comment
There was a problem hiding this comment.
Self review 2
- Split the patches module docstring into problem/solution paragraphs and move the "remove this class" note to a bug-tagged TODO above CameraPoseWriter; document why the writer initializes lazily rather than in the constructor. - Tag the writer's construction and call sites in the variation with [isaac-lab-camera-pose-write-bug]; drop their prose comments. - Trim the render-test docstrings, inline single-use constants, and rename VARIANT_OFFSETS to COMPARED_OFFSETS. Signed-off-by: Alex Millane <[email protected]>
alexmillane
left a comment
There was a problem hiding this comment.
Self review 4
- Drop the class-docstring detail and generalize the lazy-init comment (the writer can be constructed before the simulation starts). - Reword set_local_poses' docstring and note that local poses are relative to the camera prim's parent. Signed-off-by: Alex Millane <[email protected]>
Greptile SummaryThis PR introduces a temporary camera-pose writer that synchronizes camera extrinsics across the physics FrameView and the USD view consumed by RTX, then updates the camera sensor state. The camera-extrinsics variation now uses this writer, with PhysX and Newton integration tests covering rendered output and reported world pose.
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness, security, or repository-rule violations identified. The new writer updates both camera-pose representations required by the supported backends, preserves subset-environment indexing, refreshes camera state, and is covered by complementary production-path and backend-specific regression tests. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Camera extrinsics sampler] --> B[Compose local camera translation]
B --> C[CameraPoseWriter]
C --> D[Physics FrameView]
C --> E[USD camera prim]
C --> F[camera.reset for selected environments]
D --> G[camera.data world pose]
E --> H[RTX rendered image]
F --> G
Reviews (1): Last reviewed commit: "Address review 2: trim comments, tag wor..." | Re-trigger Greptile |
🤖 Isaac Lab-Arena Review BotSummaryAdds Findings🟡 Warning: 🔵 Improvement: 🔵 Improvement: 🔵 Improvement: Test CoverageGood coverage of the actual regression: render-level and pose-level checks on both backends, correctly marked VerdictMinor fixes needed |
qianl-nv
left a comment
There was a problem hiding this comment.
Thanks for providing a clean WAR for this bug in Lab 😂
Approved with a few nits.
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]>
Summary
Fix camera-extrinsics variation under Newton
Detailed description
camera.set_world_poses()does not take effect with newton on.CameraLocalOffsetWriterthat correctly updates the pose while we wait for a fix in Lab.