Repository navigation
[Backport] Add shared kinematic rigid-object renderer contract (#6308) - #7587
kellyguo11 merged 1 commit into
Conversation
# Description Revives isaac-sim#6308 on current `develop` and supersedes isaac-sim#3728 with a single backend-neutral contract for kinematic rigid-object rendering. ## Architecture `source/isaaclab/test/renderers/rigid_object_rendering_contract.py` is the composition root. It owns the cloned scene, kinematic pose sequence, depth measurements, and assertions. Package-local adapters own only availability checks, simulation/renderer selection, and backend cleanup: - Isaac RTX + PhysX on CPU and CUDA, with and without a coexisting articulation; - Newton Warp + PhysX on CUDA; - OVRTX + OVPhysX on CUDA through both legacy and OVStage scene ownership (OVStage runs when installed). The dependency direction is adapter -> shared test contract -> public Isaac Lab APIs. An AST architecture gate rejects backend imports in the shared contract and rejects scene, asset, sensor, or class ownership in adapters. The contract creates two cloned instanceable DexCubes with root-level nonuniform scale, verifies their depth silhouettes, moves both kinematic bodies through the public rigid-object tensor API, verifies the physics poses, and requires opposite rendered centroid displacement. ## Current-develop audit Most production changes in the old PR have since landed through newer ownership boundaries: Isaac RTX render-product lifetime in isaac-sim#6729, Newton shadow-state copying in isaac-sim#6773, OVRTX scale-aware transform writes in isaac-sim#7010, and Newton Fabric scale preservation in isaac-sim#7481. This revival removes those stale patches rather than carrying duplicate implementations. The revived contract exposed one remaining OVRTX bug: composed scale was captured only for clone-plan source paths, while OVRTX creates non-source destinations after exporting the host USD stage. Those destinations therefore defaulted to unit scale. As a deliberately temporary bridge, this PR projects only captured non-unit scales through the existing `isaaclab.cloner.query.path_env_ids` and `path_to_clone` boundary using the already-validated `ClonePlan`; real destination scales take precedence. It adds no plan fields, query APIs, renderer configuration, or per-body fallback, and the bridge can be deleted as one unit when SDP supplies composed scale aligned with canonical rigid-body paths. Historical context: [Isaac Sim forum report](https://forums.developer.nvidia.com/t/rigidbody-prim-is-not-updated-in-rendering-pipeline-if-set-to-kinematic/346608). ## Type of change - Bug fix - Shared regression coverage ## Testing - Isaac RTX contract: 4 passed (CUDA/CPU x articulation absent/present). - Newton Warp contract: 1 passed. - OVRTX contract: 2 passed (legacy and OVStage). - OVRTX renderer unit surface: 167 passed. - Core architecture and Newton visualization suites: 25 passed. - OVRTX clone-plan suite: 17 passed. - Cloner query and rendering-contract architecture suites: 87 passed. - Controlled OVRTX regression: failed before the production fix with clone silhouettes of 264 vs. 36 pixels; passed after the fix. - Incoming isaac-sim#7462 NumPy-backed `ClonePlan` query-boundary smoke check: passed unchanged, including non-dense environment ids. - `uv run isaaclab -f`: all hooks passed against the exact upstream `develop` base, including changelog validation. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] Documentation changes are not applicable - [x] I have added unit and integration regression coverage - [x] I have added changelog fragments for every touched package - [x] My name is already present in `CONTRIBUTORS.md` (cherry picked from commit ab34e8c)
|
run-ci |
There was a problem hiding this comment.
Isaac Lab Review Bot
The shared backend-neutral rendering contract and OVRTX clone-scale projection are generally well scoped, but the production scale cache mishandles existing clone destinations whose effective scale is exactly unit scale.
- Design and architecture: The shared contract keeps the intended dependency direction: core test logic remains in
isaaclab, while optional backends provide thin adapters. The OVRTX implementation appropriately reuses the existing clone-query API, but its sparse cache does not fully represent the distinction between existing and unmaterialized destinations. - API: The changed
_capture_object_scalesmethod is private, and its caller and focused test were updated consistently. No public API compatibility issue is evident; the required correction is confined to destination-scale preservation within OVRTX. - Implementation: Because traversal records only non-unit scales,
setdefaulttreats an existing destination with effective scale(1, 1, 1)as absent and replaces it with the source's non-unit scale. Track all traversed Xformable paths, or otherwise distinguish existing unit-scale destinations from destinations that are not present, before projecting source scales.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| for env_id in clone_query.path_env_ids(plan, source_path): | ||
| clone_path = clone_query.path_to_clone(plan, source_path, env_id) | ||
| assert clone_path is not None | ||
| self._object_scales_by_path.setdefault(clone_path, scale) |
There was a problem hiding this comment.
🟡 Warning · Implementation — Unit-scale clone destinations get overwritten
The traversal above only records prims whose scale is non-unit, so _object_scales_by_path has no entry for a destination prim that exists on the stage with an effective scale of (1, 1, 1). setdefault therefore cannot distinguish "absent" from "authored unit scale" and assigns the source's non-unit scale, changing rendered geometry for that env. Track all traversed Xformable paths (or a separate seen-set) and project only to paths never traversed.
Greptile SummaryThis backport adds a shared cross-backend rendering contract for kinematic rigid objects and fixes OVRTX clone destinations losing non-unit source scale.
Confidence Score: 5/5The PR appears safe to merge; the clone-scale projection follows existing clone-plan ownership semantics and the shared regression coverage exercises the intended renderer behavior. No actionable failures remain: destination overrides are preserved, clone paths are derived consistently from the validated plan, and the added backend tests use established initialization and cleanup lifecycles. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[USD source rigid object] --> B[Capture non-unit composed scale]
C[Validated ClonePlan] --> D[Resolve populated environment IDs]
B --> D
D --> E[Map source path to clone paths]
E --> F[Preserve authored destination overrides]
F --> G[Build per-body scale array]
H[Current physics transforms] --> I[Renderer transform synchronization]
G --> I
I --> J[Scaled and pose-synchronized camera output]
J --> K[Shared backend rendering contract]
Reviews (1): Last reviewed commit: "Add shared kinematic rigid-object render..." | Re-trigger Greptile |
Description
Backports #6308 to
release/3.0.0.The canonical merged commit
ab34e8c5e3ee7a2c5f260d1511714e5be3bed3ebwas cherry-picked with-xprovenance. Eleven of its twelve source paths replay exactly.source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.pyrequired a localized release-compatible conflict resolution, so this PR is intentionally a draft for release-maintainer review.ab34e8c5e3ee7a2c5f260d1511714e5be3bed3eb1c754876008f0806fdcfda8e3a6b2f593b34d6fc740e3d7b2efe15c5a25f671583d29c034602e36fConflict resolution
The release renderer already contains the prerequisite work from #6729, #6773, #7010, and #7481, but differs from the source parent around clone-plan handling and method documentation.
The resolution preserves the release branch's tensor-backed
ClonePlanvalidation and existing renderer structure, then adds only #6308's semantic change:isaaclab.cloner.queryAPI;_capture_object_scales;path_env_idsandpath_to_clone;setdefault.No paths outside the original PR are changed.
Type of change
Validation
path_env_idsandpath_to_clone— 4 passed.git diff --check upstream/release/3.0.0...HEADpassed.ovextra, but the release lock has no macOS/arm64 environment. Backend rendering tests and the canonicaluv run isaaclab -fremain pending Linux CI.Checklist
CONTRIBUTORS.md