Skip to content

[Backport] Add shared kinematic rigid-object renderer contract (#6308) - #7587

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-6308-release-3.0.0
Sep 5, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-6308-release-3.0.0

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Backports #6308 to release/3.0.0.

The canonical merged commit ab34e8c5e3ee7a2c5f260d1511714e5be3bed3eb was cherry-picked with -x provenance. Eleven of its twelve source paths replay exactly. source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py required a localized release-compatible conflict resolution, so this PR is intentionally a draft for release-maintainer review.

Field Commit
Original merged change ab34e8c5e3ee7a2c5f260d1511714e5be3bed3eb
Release base used 1c754876008f0806fdcfda8e3a6b2f593b34d6fc
Proposed backport 740e3d7b2efe15c5a25f671583d29c034602e36f

Conflict 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 ClonePlan validation and existing renderer structure, then adds only #6308's semantic change:

  • imports the existing isaaclab.cloner.query API;
  • passes the validated release clone plan into _capture_object_scales;
  • projects captured non-unit source scales to active clone destinations with path_env_ids and path_to_clone;
  • retains real destination scales via setdefault.

No paths outside the original PR are changed.

Type of change

  • Bug fix
  • Shared regression coverage

Validation

  • Repository backport candidate validation passed across all 12 original source paths.
  • Per-file stable patch IDs match on 11 paths; only the conflict-resolved renderer path differs.
  • Shared rendering-contract architecture tests — 2 passed.
  • Focused clone-query tests for path_env_ids and path_to_clone — 4 passed.
  • Python compilation passed for all changed Python files.
  • All changed-file pre-commit hooks passed, including changelog and Git LFS checks.
  • git diff --check upstream/release/3.0.0...HEAD passed.
  • The focused OVRTX runtime test was retried with the documented ov extra, but the release lock has no macOS/arm64 environment. Backend rendering tests and the canonical uv run isaaclab -f remain pending Linux CI.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the available pre-commit checks
  • Documentation changes are not applicable
  • The original unit and integration regression coverage is preserved
  • Changelog fragments are preserved for every touched package
  • The original contributor is already listed in CONTRIBUTORS.md

# 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)
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 4, 2026
@kellyguo11
kellyguo11 marked this pull request as ready for review September 4, 2026 21:56
@kellyguo11
kellyguo11 requested a review from a team September 4, 2026 21:56
@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_scales method 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, setdefault treats 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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This backport adds a shared cross-backend rendering contract for kinematic rigid objects and fixes OVRTX clone destinations losing non-unit source scale.

  • Projects captured source scales through the validated clone plan while preserving authored destination overrides.
  • Adds focused OVRTX clone-scale regression coverage.
  • Reuses one scale-and-pose rendering contract across Isaac RTX, Newton Warp, and OVRTX.
  • Adds Newton shadow-buffer identity-mapping coverage and package changelog fragments.

Confidence Score: 5/5

The 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

Filename Overview
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py Projects captured non-unit source scales to active clone destinations using the validated clone plan while retaining real destination scales.
source/isaaclab/test/renderers/rigid_object_rendering_contract.py Defines the backend-neutral scene, motion, depth measurements, assertions, and cleanup used to verify rigid-object scale and pose rendering.
source/isaaclab_ov/test/test_ovrtx_clone_plan.py Verifies source scale propagation to missing clone prims and preservation of an authored destination override.
source/isaaclab/test/sim/test_newton_manager_visualization_state.py Adds regression coverage proving identity-mapped transforms are copied into the persistent Newton shadow buffer.
source/isaaclab/test/renderers/test_rigid_object_rendering_contract_architecture.py Enforces backend-neutral contract ownership and prevents adapter-level scene duplication.
source/isaaclab_ov/test/test_ovrtx_renderer_rigid_object_rendering.py Runs the shared contract against legacy and ovstage OVRTX paths using OVPhysX state.
source/isaaclab_newton/test/renderers/test_newton_warp_renderer_rigid_object_rendering.py Runs the shared contract against the Newton Warp renderer.
source/isaaclab_physx/test/renderers/test_isaac_rtx_renderer_rigid_object_rendering.py Runs the shared contract across CPU and CUDA PhysX configurations, with and without an articulation.

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]
Loading

Reviews (1): Last reviewed commit: "Add shared kinematic rigid-object render..." | Re-trigger Greptile

@kellyguo11
kellyguo11 merged commit 62b92fb into isaac-sim:release/3.0.0 Sep 5, 2026
51 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants