[Backport release/3.0.0] Rendering, backend writers, and Newton tests (#7941, #7977, #7983, #7991, #8003) - #8002
Conversation
Route rigid-body transforms from physics to renderers through `SceneDataProvider` (SDP). Physics publishes its native buffer and increments its version after changes. SDP binds that buffer when format and ordering match, or converts it once per requested layout and reuses the result until the next change. Readers never reset the producer's version. - **OVRTX:** converts physics poses directly into its matrix format, without first copying them into a Newton render state. - **Newton rendering:** borrows SDP's transform buffer instead of copying into a second buffer. Newton physics and rendering continue sharing their existing model/state. - **Isaac RTX:** shares one registry-owned Fabric binding with Kit, preserves authored scale, and updates the transform hierarchy on GPU. PhysX publishes its native Fabric matrices without fetching packed poses. - **Ownership:** physics refreshes native data; SDP borrows or converts arrays. One `FabricBackend` in `isaaclab_physx` owns the stage/hierarchy handles and shared transform bindings, identified by stage/device. Consumers pass SDP explicitly to updates; it is not part of backend identity. Core `RenderContext` has no Fabric methods or state. `FabricMatrix44` contains only matrix storage. - **Rendering updates:** removes repeated renderer-driven physics refreshes. Writes made between physics steps remain visible on the next render. For Newton → Isaac RTX, cached bindings and GPU hierarchy updates replace repeated binding setup and the CPU hierarchy fallback. This is the main runtime saving measured below. Particle/deformable transport is outside this change. OVRTX retains its existing Newton geometry bridge. Counts are SDP output-writing passes, not total SDK-internal copies. Conversion, reordering, and scale are combined in one pass; unchanged data reuses the result. | Physics | Renderer | Published → requested format | SDP passes | | --- | --- | --- | ---: | | Newton | Newton Warp | `Transform` → `Transform` | 0 | | Newton | OVRTX | `Transform` → `TransposedMatrix44d` | 1 | | Newton | Isaac RTX | `Transform` → `FabricMatrix44` | 1 | | OVPhysX | Newton Warp | `Transform` → `Transform` | 0 if ordering matches; otherwise 1 | | OVPhysX | OVRTX | `Transform` → `TransposedMatrix44d` | 1 | | Isaac PhysX | Newton Warp | `Transform` → `Transform` | 0 if ordering matches; otherwise 1 | | Isaac PhysX | Isaac RTX | Native Fabric → borrowed Fabric | 0 with `use_fabric=True` | OVPhysX and OVRTX cannot run with Kit. Fabric hierarchy propagation and OVRTX's native attribute write happen after the SDP pass and are not included in these counts. Kuka Allegro Camera, 4096 environments, 64×64 RGB, Newton MJWarp → Isaac RTX, RTX 5090, no interactive visualizer. Two warm-cache runs per revision; runtime excludes 25 warmup steps and measures 200 synchronized full environment steps, including rendering and observations. | Metric | PR | Develop | | --- | ---: | ---: | | Warm startup | 135.47 s | 133.19 s | | Runtime step | 172.32 ms | 554.49 ms | | Environment frames/s | 23,770 | 7,387 | The measured step time was **68.9% lower (3.22× throughput)**. No startup improvement was measured. All 4096 camera images were finite and nonconstant. Measured revisions: PR `257e54d5f` and develop `53a7f1c0a`, with identical dependencies. Subsequent cleanup has not been rebenchmarked. Custom scene-data backends must initialize `transforms_version=0` and increment it after native pose writes or buffer swaps. The consumer-facing `get_transforms(output)` API binds shared, read-only arrays, including converted outputs. Pass `allow_passthrough=False` for caller-owned writable or preallocated arrays; conversion writes directly into them. Single-format backends keep their existing `transforms` property; the base `get_transforms(output_format)` delegates to it. Multi-format backends may override that method and `native_transform_formats`. - Focused CPU tests and GPU 0 Newton/PhysX Fabric tests cover pointer sharing, publication versions, transform formats, ordering, authored scale, buffer reallocation, same-step writes, and resets. The existing cache regression now also checks that independent SDP readers cannot hide producer changes from one another. - All 11 native Newton/Fabric tests and the native PhysX Fabric test passed after moving bindings out of core. They also check one shared RTX/Kit resource and explicit Newton-to-Fabric updates without an RTX camera or Kit viewer. - Removed obsolete synchronization tests and duplicate mock-only checks; native and numerical regressions remain. - Native OVPhysX → OVRTX rendered scale, pose changes, and camera calibration passed for both legacy and ovstage APIs. Matched OVRTX timings have not been collected. - Refactor and bug fixes - Breaking custom scene-data backend interface change, with migration above - [x] <!-- backport-active-release --> Backport to the active release branch - [x] Contribution guidelines reviewed - [x] Changelog fragments and migration documentation updated - [x] Retained focused tests and formatting checks passed after test cleanup - [ ] Full GPU CI passed for the latest revision - [x] Native OVPhysX → OVRTX rendering validated (cherry picked from commit 22bfa0d)
isaac-sim#7977) (cherry picked from commit 1e520e9)
|
run-ci |
|
run-ci |
Keep isaac-sim#8006 out of the release backport until its source PR merges.
|
run-ci |
|
| for camera in cameras: | ||
| if not camera._env_mask_has_any(camera._is_outdated): | ||
| continue | ||
| camera._prepare_camera(camera._is_outdated) | ||
| ready.append(camera) |
There was a problem hiding this comment.
Frames advance on failed batches When a batched render or output read fails, these cameras have already advanced their frame counters. The batch then leaves them marked for retry, so a retry advances the counters again for the same capture period. This can make camera frame metadata inaccurate, including for a peer camera whose capture completed before another camera failed.
Knowledge Base Used: Simulation, rendering, and sensors
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| @@ -0,0 +1 @@ | |||
| Consolidated redundant Newton tests and trimmed device and shape matrices that repeated the same code paths. | |||
There was a problem hiding this comment.
Material-write coverage is removed This consolidation removes the rigid-object and rigid-object-collection tests that write and read back friction and restitution, without keeping equivalent checks. Those tests cover distinct view-binding behavior, so material-write regressions will no longer be caught.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the camera batching, SDP transform publication, shared Fabric ownership, OVRTX camera-path derivation, and backend writer fixes. The changed producer/consumer paths are migrated consistently in the supplied patch, and no candidate finding identifies a concrete defect requiring maintainer action.
- Design and architecture: The additive batching design preserves fallback behavior through BaseRenderer.render_batch(), while SensorBase opt-in grouping and RenderContext renderer grouping keep eager batching separate from lazy camera reads. Fabric synchronization is centralized in a simulation-owned FabricBackend and transform freshness moves to producer versions rather than physics-step cadence.
- API: Checked CameraRenderSpec removal, the SceneDataBackend transforms_version contract, shared read-only transform outputs, SensorBase batching APIs, and PhysX collection mask signatures. In-tree callers and backends are migrated, and changelog and migration documentation describe the immediate external caller changes; compatibility therefore relies on consumers following that release guidance.
- Implementation: Traced eager camera updates through InteractiveScene, SensorBase._process_batch, Camera preparation, RenderContext grouping, backend render_batch implementations, and output readback. Also traced SDP version-keyed conversions through PhysX, Newton, OVPhysX, OVRTX, Isaac RTX, and Kit Fabric consumers, including authored-scale preservation and writable-output opt-out behavior.
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.
Description
Backports the rendering changes and related release fixes:
SceneDataProviderand preserves shared Fabric bindings.CameraRenderSpec.camera_path_relative_to_env_0and derives and validates the OVRTX source camera path fromcamera_prim_paths. The rendering changes were developed with this interface, so it is required by their OVRTX tests.body_maskwriter signatures.#7941 required conflict resolution in the OVRTX legacy and OvStage transform binding functions: the release branch's Newton model path collection was replaced by SDP-published paths. #7983 was then integrated with those SDP paths. Each added commit records its source commit.
Custom scene-data backends must follow the
transforms_versionpublication contract described in the included migration documentation. Direct callers ofBaseRenderer.render()must pass a sequence, for examplerender([data]). Callers constructingCameraRenderSpecmust remove thecamera_path_relative_to_env_0argument; OVRTX now derives it fromcamera_prim_paths.Validation
ovrtxmodule is unavailable.uv run isaaclab -fpassed after all additions with the changelog base set torelease/3.0.0, as didgit diff --check.Type of change
Release backport
This PR targets
release/3.0.0; no further backport is needed.Checklist