[4C/10] Route rigid rendering transforms through SDP - #7941
Conversation
|
run-ci |
|
run-ci |
|
run-ci |
|
run-ci |
|
run-ci |
1bb98da to
257e54d
Compare
|
run-ci |
|
run-ci |
|
Thanks Octi! Looking through it at a high level, I noticed a couple of _dirty that is in different places. This might turn into a problem of whack-a-mole with dirty flags. What if we maybe did something like:
Second is that for request_transforms, maybe we should set-up in a way that does all the setup once, and then in the future it is just a call. There could be 2 ways to do it: Functional: Or slightly less functional but maybe more user friendly: |
| "_prepared_renderer_ids", | ||
| "_prepared_num_envs", | ||
| "_last_scene_state_step", | ||
| "_last_geometry_step", |
There was a problem hiding this comment.
_last_geometry_step is a bit odd of a term, reading this first time I would now know what it refers to
| True if transforms are available in ``output``, False if no transforms are published | ||
| or the format conversion is unsupported. | ||
| """ | ||
| output_format = output._cls |
There was a problem hiding this comment.
There is alot of usage of this output._cls, complex to read
| ############################ | ||
| ## Example | ||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
Should we remove the main function here?
| width=16, | ||
| data_types=["rgb"], | ||
| spawn=sim_utils.PinholeCameraCfg(), | ||
| renderer_cfg=IsaacRtxRendererCfg(), |
There was a problem hiding this comment.
We should have the test use ovrtx preferable, as that path matters more to us
| - For file-spawned fixtures that must only tune existing physics bodies, use explicit fragment | ||
| target mappings. A bare fragment or list may create a missing body and change the fixture's validity. | ||
|
|
||
| ## Scene-data ownership |
There was a problem hiding this comment.
Let's remove this from AGENTS.md, if such a note is required, leave it near the implementation of SDP refresh publication and agents will naturally pick up the rule when they write code requiring it.
|
@StafaH Agreed on producer-owned versions. Replaced the transform dirty latches and SDP generation counter with This fixed a concrete stale-data case: with two SDP readers, the first previously consumed the flag before the second refreshed its converted buffer. The existing regression now covers both readers. Pending FK flags remain because they represent work that still needs execution, not publication freshness. The Fabric part has changed since your example: I kept the single Also merged latest develop and resolved the conflict. Addressed the inline cleanup too: removed the embedded For the test comment, the cited test asserts actual Kit/Fabric matrices, so it needs Isaac RTX; OVRTX cannot run with Kit. I also ran the existing native OVPhysX → OVRTX image tests on GPU 0: both legacy and ovstage passed, checking scale, pose changes, and camera calibration. The 5 PhysX publication checks and 4 Newton/Fabric integration cases also passed, including captured writes followed by rendering without a physics step. |
|
run-ci |
|
run-ci |
|
run-ci |
|
run-ci |
…#7941, #7977, #7983, #7991, #8003) (#8002) ## Description Backports the rendering changes and related release fixes: - #7941 — routes rigid rendering transforms through `SceneDataProvider` and preserves shared Fabric bindings. - #7977 — batches due camera captures by renderer and fixes moving and cloned camera updates. This supersedes #8001. - #7983 — removes `CameraRenderSpec.camera_path_relative_to_env_0` and derives and validates the OVRTX source camera path from `camera_prim_paths`. The rendering changes were developed with this interface, so it is required by their OVRTX tests. - #7991 — fixes Newton's deprecated joint friction writers and the PhysX rigid object collection `body_mask` writer signatures. - #8003 — consolidates redundant Newton tests to shorten the Newton CI job without changing runtime code. #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_version` publication contract described in the included migration documentation. Direct callers of `BaseRenderer.render()` must pass a sequence, for example `render([data])`. Callers constructing `CameraRenderSpec` must remove the `camera_path_relative_to_env_0` argument; OVRTX now derives it from `camera_prim_paths`. ## Validation - Rendering and scene-data focused tests from the original backport passed locally: 27 renderer tests and 50 scene-data / PhysX renderer tests. OVRTX runtime cases were skipped locally because the optional `ovrtx` module is unavailable. - #7991: the Newton deprecated friction writer test passed, and 72 rigid object collection mask writer cases passed. The new friction test fails without the fix and passes with it. - #8003: all 8 revised contact lifecycle cases passed. Kit-based Newton asset tests remain for CI. - `uv run isaaclab -f` passed after all additions with the changelog base set to `release/3.0.0`, as did `git diff --check`. - The original backport's documentation build passed with warnings treated as errors. Full GPU and Kit CI is running on the updated PR. ## Type of change - Rendering bug fixes and performance improvement - Backend API bug fixes and breaking renderer / scene-data interface changes with migration guidance - Newton test consolidation - Documentation and changelog fragments for affected source packages ## Release backport This PR targets `release/3.0.0`; no further backport is needed. ## Checklist - [x] Contribution guidance reviewed - [x] Focused local tests and formatting checks passed - [x] Public documentation and package changelog fragments included - [ ] Full GPU and Kit CI passed --------- Co-authored-by: ooctipus <zhengyuz@nvidia.com> Co-authored-by: Piotr Barejko <pbarejko@nvidia.com>
Description
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.What changes
FabricBackendinisaaclab_physxowns 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. CoreRenderContexthas no Fabric methods or state.FabricMatrix44contains only matrix storage.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.
Transform movement
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.
Transform→TransformTransform→TransposedMatrix44dTransform→FabricMatrix44Transform→TransformTransform→TransposedMatrix44dTransform→Transformuse_fabric=TrueOVPhysX 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.
Performance
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.
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
257e54d5fand develop53a7f1c0a, with identical dependencies. Subsequent cleanup has not been rebenchmarked.Migration
Custom scene-data backends must initialize
transforms_version=0and increment it after native pose writes or buffer swaps. The consumer-facingget_transforms(output)API binds shared, read-only arrays, including converted outputs. Passallow_passthrough=Falsefor caller-owned writable or preallocated arrays; conversion writes directly into them. Single-format backends keep their existingtransformsproperty; the baseget_transforms(output_format)delegates to it. Multi-format backends may override that method andnative_transform_formats.Validation
Type of change
Release backport
Checklist