Repository navigation
Render RTX visualizers through the simulation's OVRTX renderer - #8585
Merged
ooctipus merged 18 commits intoOct 16, 2026
Merged
Conversation
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
Collaborator
Author
|
run-ci |
ooctipus
force-pushed
the
refactor/rtx-images-newton-window
branch
from
October 16, 2026 20:46
e455257 to
fb9fa68
Compare
Collaborator
Author
|
run-ci |
6 of 7 tasks
ooctipus
added a commit
that referenced
this pull request
Oct 16, 2026
# Description Clone preparation now resolves native representations before initialization, and the simulation registry owns OVStage resources. This PR contains the cloning foundation and its simplification. Shared OVPhysX/OVRTX stages remain isolated in #8279. Without flags, OVPhysX keeps native physics cloning and OVRTX uses an **independent rendering OVStage**; Newton uses native OVRTX cloning. `ISAAC_LAB_OVRTX_USE_OVSTAGE=0` or `1` overrides the rendering path without changing physics ownership. This policy is resolved in `OvrtxReplicateContext.prepare`, in `isaaclab_ov/cloner/replicate.py`, before backend initialization. The renderer-side switch helper was removed. #8279 adds separate opt-in flags for sharing. - `ReplicateContext` gives USD, PhysX, Newton, OVPhysX, OVRTX and OVStage one explicit preparation/dispatch contract. Removed optional method discovery and duplicate constructors. Preparation is inline before context construction, standalone reset and late renderer initialization. Custom contexts must inherit the base and implement `replicate`; no compatibility shim was added. - `OvstageBackend` owns population, prepared copies, queries/path lists and write ordinals. Contexts use `SimulationContext.get_backends()`; renderers own bindings and borrow resources. OVRTX constructors declare requirements without allocating native engines. - `InteractiveScene` authors prototypes only. SDP reads the environment count from `ClonePlan`, including native copies absent from USD. Backends apply planned placement and create required frames in private exports. Removed recursive deactivation and environment-frame capture/restore. Routed prototypes are still selected correctly after USD replication. Deformable discovery and Newton import use authored source frames rather than infer them from planned destination poses. - Consolidated camera registration, binding setup, pose conversion, submission and segmentation decoding. Shared unscaled SDP conversions and retained asynchronous buffers replace duplicate work. Native partition writes create missing attributes so sensor cameras exclude neighboring environments. - Removed OVStage 0.1 / OVRTX 0.4 compatibility modules and fallbacks. The pinned OVStage 0.2 and OVRTX 0.5 APIs are used directly, with concrete stage, binding, frame and buffer types. Preserved current upstream CUDA stream encoding and stream-ordered mapped-buffer release. Based on `develop` at `c1e69cc45`, including #8585 and #8686. Scene-owned cameras and the RTX viewer use the same rendering stage; the reusable `OvstageBackend` owns its resources. The rebase preserves renderer-owned markers and runtime geometry, explicit simulation ownership, scene lighting, and authored environment-root transforms and metadata. Physics/rendering stage sharing remains in #8279, which needs to be restacked on this revision. ## Size Against `develop`: **491 fewer production lines**, 117 additional test lines and 103 documentation/metadata lines: **271 fewer lines overall**, across 61 files (+1,932/-2,203). The OVPhysX physics manager, camera implementation and Newton visualizer match `develop`; shared-stage coordination stays in #8279. The benchmark results below are historical measurements at the named revisions, not new measurements of this rebase. ## Rendering defaults and Kuka measurements Matched Kuka Allegro Lift camera runs (`single_camera,rgb64`), 1,024 environments, median full environment-step time: | Physics / measured revision | Native OVRTX cloning | Independent OVStage rendering | |---|---:|---:| | OVPhysX / develop `c9a40a1de` | 113.5 ms | 80.4 ms | | Newton MJWarp / foundation `0018ae99d` | 18.0–18.3 ms | 30.7–30.8 ms | OVPhysX used one diagnostic process per path. Newton used two per path in reversed order. Each measured 60 synchronized steps after 15 warmup steps. At 128 environments, Newton measured 12.2 ms with OVRTX cloning versus 14.1 ms with OVStage rendering. Newton was 1.6.1rc1 (`dff296359`), MuJoCo/MuJoCo Warp 3.12.0, using the same OV library versions and GPU below; both Newton paths used an isolated kernel cache with fresh LTO artifacts after resolving a pre-existing compiler-cache mismatch. With independent OVStage rendering, OVPhysX Kuka startup and stepping were essentially unchanged by the foundation: develop 70.1 s / 80.4 ms versus #8232 70.8 s / 81.3 ms at 1,024 environments. These measurements justify backend-specific rendering defaults; they do not justify enabling physics/rendering sharing. Shared-stage measurements are in #8279. ## Native-cloning startup | Environments | Base median [range], s | PR median [range], s | Change | |---:|---:|---:|---:| | 128 | 4.000 [3.984–4.038] | 4.067 [3.986–4.121] | +1.7% | | 1,024 | 7.593 [7.492–7.646] | 7.000 [6.985–7.054] | -7.8% | | 4,096 | 31.715 [31.347–31.799] | 28.851 [28.734–29.019] | -9.0% | Compared `develop` at `c9a40a1de` with this foundation at `0018ae99d`. Three measured fresh processes per revision and environment count, alternating revision order, after one excluded warmup pair per count. Both use native cloning (`ISAAC_LAB_OVRTX_USE_OVSTAGE=0`). The 128-environment timings overlap; the larger counts show improvement. These are startup measurements, not shared-stage or steady-state throughput claims. Eight rigid cubes per environment, dome lighting, and a tiled 64×64 diffuse/depth camera. Timing covers simulation/scene construction, reset and the first synchronized image; imports are excluded. **All 24 runs**, including warmups, checked 4.5 m center depth in every environment. Threadripper PRO 7965WX; RTX 5090 GPU 1; driver 580.173.02; Python 3.12.12; OVPhysX 0.6.3, OVRTX 0.5.0.377615, OVStage 0.2.0.377349, Warp 1.17.0, Torch 2.12.0+cu130. Both revisions used the same environment and GPU. No tests or other work used that GPU during timing. The SDK reports existing CPU powersave/device-masking warnings. <details> <summary>Startup reproduction harness</summary> Save as `benchmark_startup.py`. Use one environment with the dependency versions above for both checkouts: ```bash CUDA_VISIBLE_DEVICES=1 /path/to/shared-venv/bin/python benchmark_startup.py --root /path/to/checkout --num-envs 1024 --ovstage 0 ``` Repeat at 128, 1024 and 4096 environments: one warmup pair, then three measured pairs; alternate the order of base and PR runs. Compare `scene_to_image_s`. ```python import argparse import json import os import time from pathlib import Path started = time.perf_counter() parser = argparse.ArgumentParser() parser.add_argument('--root', required=True) parser.add_argument('--num-envs', type=int, default=128) parser.add_argument('--ovstage', type=int, choices=(0, 1), default=0) args = parser.parse_args() os.environ['ISAAC_LAB_OVRTX_USE_OVSTAGE'] = str(args.ovstage) # Dependencies are identical; only the selected checkout changes. import sys root = Path(args.root) sys.path[:0] = [str(path) for path in (root / 'source').iterdir() if path.is_dir()] import numpy as np import torch import warp as wp from isaaclab.app import launch_simulation from isaaclab.assets import AssetBaseCfg, RigidObjectCfg from isaaclab.envs import ManagerBasedEnv, ManagerBasedEnvCfg from isaaclab.scene import InteractiveScene, InteractiveSceneCfg from isaaclab.sensors import CameraCfg from isaaclab.sim import CuboidCfg, DomeLightCfg, MassCfg, PinholeCameraCfg, PreviewSurfaceCfg, SimulationCfg, UsdPhysicsCollisionCfg, UsdPhysicsRigidBodyCfg from isaaclab.utils import configclass from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg @configclass class SceneCfg(InteractiveSceneCfg): light = AssetBaseCfg(prim_path='/World/Light', spawn=DomeLightCfg(intensity=1000)) camera = CameraCfg( prim_path='{ENV_REGEX_NS}/Camera', height=64, width=64, data_types=['simple_shading_constant_diffuse', 'distance_to_image_plane'], spawn=PinholeCameraCfg(focal_length=24.0, horizontal_aperture=20.955, clipping_range=(0.1, 100.0)), offset=CameraCfg.OffsetCfg(pos=(0, 0, 5), rot=(0, 0, 0, 1), convention='opengl'), renderer_cfg=OVRTXRendererCfg(log_level='error'), ) scene_cfg = SceneCfg(num_envs=args.num_envs, env_spacing=10) for i in range(8): setattr(scene_cfg, f'object_{i}', RigidObjectCfg( prim_path=f'{{ENV_REGEX_NS}}/Object_{i}', spawn=CuboidCfg(size=(1, 1, 1), rigid_props=UsdPhysicsRigidBodyCfg(), mass_props=MassCfg(mass=1), collision_props=UsdPhysicsCollisionCfg(), visual_material=PreviewSurfaceCfg(diffuse_color=(0.8, 0.2, 0.1))), init_state=RigidObjectCfg.InitialStateCfg(pos=(float(i % 4) * 1.5, float(i // 4) * 1.5, 0)), )) cfg = ManagerBasedEnvCfg(scene=scene_cfg, sim=SimulationCfg(physics=OvPhysxCfg(), device='cuda:0', gravity=(0.0, 0.0, 0.0)), decimation=1, observations={}, actions={}, events={}, seed=42) imports_done = time.perf_counter() with launch_simulation(cfg, {'visualizer': [], 'device': 'cuda:0'}) as _: launched = time.perf_counter() from isaaclab.sim import SimulationContext sim = SimulationContext(cfg.sim) try: scene = InteractiveScene(cfg.scene) constructed = time.perf_counter() sim.reset() reset_done = time.perf_counter() scene.reset() scene.update(sim.get_physics_dt()) data = scene['camera'].data.output depth = data['distance_to_image_plane'].torch wp.synchronize_device('cuda:0') image_ready = time.perf_counter() assert tuple(depth.shape) == (args.num_envs, 64, 64, 1), depth.shape centers = depth[:, 32, 32, 0].cpu().numpy() np.testing.assert_allclose(centers, 4.5, atol=0.02) result = dict(ovstage=args.ovstage, num_envs=args.num_envs, imports_s=imports_done-started, launch_s=launched-imports_done, scene_create_s=constructed-launched, sim_reset_s=reset_done-constructed, reset_first_image_s=image_ready-constructed, scene_to_image_s=image_ready-launched, script_to_image_s=image_ready-started, depth_min=float(centers.min()), depth_max=float(centers.max())) print('STARTUP_RESULT ' + json.dumps(result), flush=True) finally: sim.clear_instance() ``` </details> ## Validation The three previously failing Franka soft/cloth/cable native-OVRTX golden-image cases passed on GPU0, along with 152 focused clone, renderer, USD-export and scene-data tests. The environment-count regression failed before the fix and passed afterward. Existing coverage was extended; no test files or image tolerances were added. The stale `OvstageBackend.reset` autodoc reference was removed; the full docs build runs in CI. Earlier checks passed 110 profiling-target checks, 71 clone/renderer/binding checks, 10 Newton cloning tests (plus four subtests), and all seven RTX viewer integration cases. The Newton placement regression failed before the fix and passed afterward. Existing tests were extended; no new test files were added. On GPU0, Shadow Hand passed with OVRTX and Newton rendering. Cartpole passed 15 cases; its OVStage constant-diffuse comparison failed identically on `develop`. Kuka's remaining image-comparison failures also reproduced on `develop`; no image tolerances were changed. Earlier rebase validation passed 217 focused cases, including both RTX scene paths, native physics/rendering ownership, camera calibration, lighting, material synchronization and lifecycle checks. The Coffee GPU capture reproduction also passed: moving particles changed recorded pixels without drawing a window. Native validation used GPU0, OVPhysX 0.6.4, OVRTX 0.5.1 and OVStage 0.2.1. Formatting, changelog validation and `git diff --check` passed. Documentation builds are left to CI. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings (native runs include existing SDK and Torch warnings) - [x] I have validated the changed behavior with focused coverage - [x] I have added changelog fragments for the changed packages - [x] My name already exists in `CONTRIBUTORS.md`
4 tasks done
maxkra15
added a commit
that referenced
this pull request
Oct 21, 2026
pbarejko
pushed a commit
that referenced
this pull request
Oct 30, 2026
…mes (#8882) # Description When DLSS frame generation returns an intermediate image before the real camera capture, OVRTX readback currently publishes the first image and discards the real one. Select the frame with the latest capture end time before extracting any camera outputs or running PPISP. Keep the direct single-frame path and the existing validation for missing products/frames. Extend the existing renderer contracts to verify real capture pixels, other requested outputs, and matching asynchronous capture metadata, including an output list whose newest frame is neither first nor last. Add the `isaaclab_ov` changelog fragment. No dependency or public API changes. Fixes #8881. Follows #8583, whose original adapter was removed by #8585. ## Visual comparison **Scene:** An orange cube moves sideways against a plain grey background, viewed straight on from a fixed camera. The cube appears nearly square because one face points toward the camera. The top row shows the full frames; the bottom row enlarges the blue-box region. The right column shows the pixel-difference heatmap. Recorded native images from the same DLSS-enabled render request: **before** is the intermediate image selected by `frames[0]`; **after** is the latest real capture selected by this fix, 8.33 ms newer. The lower row enlarges identical bounds. The heatmap shows the maximum absolute RGB channel difference per pixel on a fixed 0–80 scale.  At frame 2, 129,036 RGB channel values differ before the fix (maximum error 78/255). The fixed output has **zero pixel differences** from the generation-disabled control. These are recorded pixels; the image panels use nearest-neighbor display. <details> <summary>Second recorded capture: frame 15</summary>  At frame 15, the selected capture changes from 258.33 ms to 266.67 ms. The baseline differs in 87,969 RGB channel values (maximum error 79/255); the fixed output again exactly matches the control. </details> ## Validation - Existing regression assertions failed before the fix: wrong intermediate RGB values in delayed observations and actual CPU extraction. They pass after the fix. - Full renderer contract file: **53 passed**, including all five GPU integration cases: ```bash uv run python -m pytest -q source/isaaclab_ov/test/test_ovrtx_renderer_contract.py ``` Validation used a separate uv environment with verified imports from this worktree and pinned OVRTX `0.6.0.1791947691`, OVStage `0.3.0.1791986420`, and Warp `1.17.0`. Torch deprecation warnings and native runtime warnings were observed. - Repository formatting/lint (`uv run isaaclab -f`), changelog validation, and `git diff --check` passed. Independent review found no blocking issues. - Native reproduction used a moving cube at 1280×720, 60 Hz, on RTX 5090 / driver `610.57.04`. With generation disabled, all 16 steps returned one frame; enabled, all 16 returned two: an earlier intermediate followed by the real capture. - Replaying the unchanged baseline/fixed readback methods against those native timestamps and saved pixels showed: | Saved step | Baseline capture delay | Baseline differing RGBA channel values | Fixed differing values | | --- | ---: | ---: | ---: | | 2 | 8.33 ms | 129,036 | 0 | | 15 | 8.33 ms | 87,969 | 0 | At both saved steps, fixed output exactly matched the generation-disabled control. Successful native activation used an LDR-only render product together with explicit settings schemas, `limitedOps=false`, inverse-compositing settings, and a RenderSettings product relationship; the required companion setting was not isolated. The synthetic missing-AOV case is test coverage, not a native observation. This change selects the correct single camera observation. Presenting every generated image at a higher window cadence is separate work. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks with `uv run isaaclab --format`. - [x] I have documented the changed behavior in the package changelog. - [ ] My changes generate no new warnings (dependency/runtime warnings observed as described above). - [x] I have validated the changed behavior and applied the test-audit criteria to the test changes. - [x] I have added a changelog fragment for every touched source package. - [x] My name already exists in `CONTRIBUTORS.md`.
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.
What changes
--viz newton_rtxrenders through ordinary Isaac Lab cameras and displays their GPU output in a Newton GL window. Matching camera configurations share oneOVRTXRendererand stage. If there is no existing RTX sensor, the perspective camera creates that renderer. Newton'sViewerRTXis no longer used; no Newton dependency update is required. The reusableOvstageBackendremains available to downstream consumers, with a declaredClonePlanrequired for population.CameraCfgentries before runtime construction. Scripts withoutInteractiveSceneCfgdeclare assets throughReplicateSession, callinstantiate(camera_cfg), and select the camera withSceneCameraCfg. This publishes the scene plan even for one environment.prepare_stage()completes scene loading, cloning, bindings, and OVStage attachment before any camera products exist. Every camera then registers only its own product and resources; device selection belongs to the simulation. The first-camera branches and cached USD handoff are removed. Physics resets preserve the prepared stage while rebuilding physics-dependent resources and material writers.The newly merged coffee demo publishes grains and liquid materials into the camera renderer and declares its backdrop in the scene config, removing its native Newton RTX subclass and presentation backend.
Authored lighting, camera selection, markers, runtime mesh updates, recording, pause controls, and global cameras remain supported.
CameraCfg.render_settingsholds per-product settings without creating another renderer.Configuration change: RTX uses explicit
vieworcamerassources, defaulting to one perspective camera. It no longer discovers unrelated sensors or translatesstreaming_sensor_prim_path. Set initial pose and size on the visualizer configuration instead of deprecatedenv_cfg.viewer. The migration guide shows the supported declarations.Performance
Before → after: develop
86042738bversus this PR9b635db02. Both run 512 environments with Newton MJWarp, one 128×128 RGB RTX sensor per environment, and a 1280×720 Newton RTX perspective viewer.Measured on GPU0, an RTX 5090, with identical dependencies, camera framing, and task settings. Medians of three fresh-process runs per revision, alternating revision order, with warm asset/shader/kernel caches. Each run used zero actions, 50 warmup steps, and 200 timed steps, with VSync disabled and the window effectively uncapped. The sensor/shared renderer used
ISAAC_LAB_OVRTX_USE_OVSTAGE=0; the baseline viewer used its separate native renderer and stage.Startup includes imports, environment construction, reset, and completion of the first sensor and viewer images. Runtime includes physics, task logic, all sensor images, and viewer rendering/presentation, with CUDA synchronization each step and the final pending viewer render drained. Every run verified 200 viewer frames and 200 fresh frames from all 512 sensors. FPS measures complete vectorized environment steps and viewer frames per second; transitions/s multiplies that rate by 512.
Open validation issue: native RTX camera isolation
The ANYmal tiled-camera demo can show neighboring robots despite matching camera/environment partition IDs. The raw sensor images contain those neighbors; image composition is correct.
A standalone reproduction now confirms a native partitioning defect with no Isaac Lab imports, robot assets, physics, window, or tiled product: render a blue cube through a camera assigned to its partition, then clone a red cube into a different partition. With
showAllPartitionsByDefault=True, the isolated camera gains 2,080 foreign red pixels with legacy OVRTX, and 2,078 with OVStage (expected: zero). Tested on GPU0 with ovrtx0.5.1.385782and ovstage0.2.1.385922. The legacy control that clones before rendering passes.The full robot scene also reproduces through direct OVRTX calls; its exact native trigger still needs investigation. Disabling the global setting hides the demo's neighbors but breaks the unpartitioned overview, so that workaround is not included. The required contract remains isolated sensor views and an overview sharing one renderer.
Validation
86042738b, RTX integration passed 7 cases on each native stage mode, including the new upstream MPM particle-motion case, covering motion, pause, markers, GPU meshes, lighting, sharing, stable buffers/CUDA capture, and lifetime. All GPU execution used GPU0.OvstageBackendpopulation, cloning, repeated population, and cleanup passed.uv run isaaclab -fpassed.Type of change
Release backport
Checklist
uv run isaaclab -f