Skip to content

Support heterogeneous OvPhysX cloning - #7890

Merged
ooctipus merged 22 commits into
isaac-sim:developfrom
maxkra15:maximiliank/heterogeneous-cloning-ovphysx
Sep 29, 2026
Merged

ooctipus merged 22 commits into
isaac-sim:developfrom
maxkra15:maximiliank/heterogeneous-cloning-ovphysx

Conversation

@maxkra15

@maxkra15 maxkra15 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Enable heterogeneous rigid-body and articulation cloning with the released OVPhysX 0.6.3 wheel. No native patch, dependency update, or monkey-patch is required.

  • Build native copies from the clone plan. Worlds containing source assets or USD-only physics import their complete composition; other worlds copy from a complete original with one environment ID. This preserves within-world contacts without destination placeholders.
  • Keep the CPU full-USD path because 0.6.3 does not support CPU environment-ID filtering.
  • Preserve numeric environment ordering and contact-filter pairing. Reuse resolved paths inside OvPhysxView; assets do not orchestrate binding reuse.
  • Check active D6 rotation axes and tendon layouts once per variant prototype; native metadata validates the remaining body/joint layout. Defer unused rendering bindings during headless startup.
  • Match the scene's declared step rate to SimulationCfg.dt, fixing oversized automatic contact offsets. Enable Kuka Allegro's existing heterogeneous shapes preset for OvPhysX.

Validation

  • 26 focused clone/export tests passed, including selective USD materialization that keeps unaffected worlds on native cloning.
  • 16 heterogeneous integration cases passed on CPU and 16 on GPU, using the unmodified 0.6.3 wheel. Coverage includes indexed state, contact isolation, USD-only supports with and without their native ancestor, incompatible D6/tendon layouts, and compatible disabled-joint and translation-limit differences. Regression cases were verified to fail before their fixes.
  • Formatting and changelog checks passed. Docker/GPU CI requested with run-ci; documentation validation is left to CI.

Released-wheel benchmark

Isaac-Lift-KukaAllegro, 4096 environments, 16 object variants, RTX 5090 GPU 1, no renderer/viewer, seed 42. One warm sample; 20 warmup steps followed by 100 measured steps, synchronized around the measurement window.

Environment creation Environment step Environment steps/s
97.97 s 86.05 ms 47,600

Environment creation is gym.make, not whole-process startup. This measurement uses stock OVPhysX. Further native startup optimizations are submitted separately in NVIDIA-Omniverse/PhysX#532; they are not required by this PR or included in its numbers.

CUDA_VISIBLE_DEVICES=1 PXR_WORK_THREAD_LIMIT=1 OVPHYSX_NVTX=0 \
uv run --extra ovphysx isaaclab benchmark runtime \
  --task Isaac-Lift-KukaAllegro --num_envs 4096 --seed 42 \
  --num_steps 100 --warmup_steps 20 --device cuda:0 --visualizer none physics=ovphysx

Deformable native cloning remains outside this PR. CPU kinematic-velocity reset limitations and heterogeneous rendering-golden coverage are unchanged.

Type of change

  • Bug fix
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • Contribution guidelines and formatting checks reviewed.
  • Documentation and focused regression tests updated.
  • Changelog fragments cover the changed source packages.
  • Contributor name is present in CONTRIBUTORS.md.

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 18, 2026
@maxkra15
maxkra15 marked this pull request as ready for review September 18, 2026 18:18
@maxkra15
maxkra15 requested a review from a team September 18, 2026 18:18
@marcodiiga

Copy link
Copy Markdown
Collaborator

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 18, 2026
@greptile-apps

greptile-apps Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR should not merge until articulation variants with differing effective DOF layouts are rejected before cloning.

Findings

  1. P1 D6 layouts escape validation ▶

Summary

This PR upgrades OvPhysX and OVStage and extends the Omniverse clone pipeline to preserve heterogeneous rigid-body and articulation variants.

  • Carries destination environment IDs through clone recipes and runtime clone calls.
  • Retains every active source environment while stripping authored clone targets.
  • Enables heterogeneous KUKA–Allegro object presets for OvPhysX.
  • Adds topology checks, tests, dependency updates, and documentation.
  • The articulation compatibility check remains incomplete for joints whose effective DOF structure is not determined solely by their USD type.

Diagram

sequenceDiagram
  participant P as ClonePlan
  participant R as OvPhysX replicate adapter
  participant M as OvPhysxManager
  participant S as Serialized stage
  participant X as OvPhysX runtime
  P->>R: sources, destinations, mapping, env_ids
  R->>R: validate variant topology
  R->>M: register per-variant clone recipes
  M->>S: retain source environments
  M->>X: attach source stage
  loop Each variant with targets
    M->>X: clone(source, targets, transforms, env_ids)
    X-->>M: operation complete
  end
Loading

Reviews (1) · Last reviewed commit: "Support heterogeneous OvPhysX cloning"

@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 heterogeneous clone recipe is propagated consistently through construction, registration, serialization, source retention, and runtime replay. Two compatibility and API-documentation issues remain: clone dispatch unconditionally uses the OvPhysX 0.6.3 call shape despite retained legacy-version handling, and the new validation failures are absent from the affected Raises sections.

  • Design and architecture: Per-variant recipes, including empty-target recipes used to retain nonzero source environments, fit the existing ClonePlan pipeline. However, runtime replay bypasses the existing OvPhysX compatibility boundary by always passing the 0.6.3-only env_ids argument, while the package still retains pre-0.6 fallback behavior. Dispatch must be version-aware or legacy support must be removed explicitly.
  • API: The internal CloneRecipe expansion is applied consistently, and register_clone retains its existing signature. The public ovphysx_replicate contract and the replication-context documentation should describe the newly introduced source/destination length, mapping-shape, and topology ValueError cases.
  • Implementation: Environment IDs reach each runtime clone call, source-only variants remain serialized, and dependency pins and tests are updated coherently. Before merge, runtime clone invocation should be aligned with the declared version-compatibility policy, and the new deterministic validation paths should be documented.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

@marcodiiga marcodiiga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The variant-source retention and env_id propagation address the original adapter gaps, but the heterogeneous path still has contact and environment-indexing failures. I reproduced the issues below with the pinned ovphysx 0.6.3 runtime on this commit; the focused tests and basic CPU/CUDA initialization tests pass.

@maxkra15

maxkra15 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Pushed follow-up review fixes for heterogeneous source/target collision isolation, environment-ordered tensor/contact bindings, topology/D6 validation, and legacy clone compatibility. The runtime pins now pair OvPhysX 0.6.3 with OVStage 0.2 and OvRTX 0.5. the earlier KUKA smoke runs also completed, with the CPU reset errors noted below.

The corrected Franka asset is still awaiting sync to the public asset bucket. Testing the updated flat asset restores cloned robot geometry and materials in the cloth, cable, and soft scenes without renderer changes. That should resolve the asset-triggered missing-robot failures once published, but does not make the complete rendering suite green.

Remaining WIP for now:

  • RGB/RGBA golden failures: geometry/albedo checks pass with the corrected asset, but color differences remain with the new rendering stack. Exact cause still under investigation; no golden images or tolerances were changed.
  • Native-only camera partition/visibility discrepancy: reproduced without Isaac Lab in a reduced native scene. This is not yet established as a camera-position error; the exact OvRTX/OVStage boundary responsible remains unresolved.
  • Kinematic velocity errors: KUKA CPU reset writes velocities to kinematic tables, which native PhysX rejects. Independently reproduced with one kinematic cube; an Isaac Lab reset/adapter fix remains outstanding.

@ooctipus

Copy link
Copy Markdown
Collaborator

hmmm why ovphysx cloning support touches ovrtx?

@maxkra15

maxkra15 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

hmmm why ovphysx cloning support touches ovrtx?

@ooctipus OvPhysX 0.6.3 requires OVStage 0.2, and in my testing the previous OvRTX version was incompatible with that combination

@maxkra15

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 21, 2026
@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 29, 2026
@marcodiiga

Copy link
Copy Markdown
Collaborator

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 29, 2026

@marcodiiga marcodiiga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed a70132463d5021ecb93f39de8352e8326524e9ff with the released OvPhysX 0.6.3 wheel.

The complete-original-world approach removes the destination placeholders and fixes the earlier scaled-root case, including rotated roots on CPU and CUDA. Numeric binding order and contact-filter pairing also pass the targeted checks. Two cases still need changes: mixed USD/native physics loses contacts on GPU, and same-count D6 variants lose their correct joint-name/axis layout. The existing tendon-layout finding also still reproduces on CPU; I have added the runtime result to that thread.

Validation

  • 117 focused cloner/view/lifecycle/scene-data tests and 6 preset tests passed locally.
  • All 10 heterogeneous integration cases passed on CPU and all 10 on GPU. Additional contact-order and multibody checks passed on both devices.
  • A separate cloud unit run hit the unchanged cache-permissions assertion because the temporary directory inherited the setgid bit. The corresponding local suite passed.

Matched startup check

Same NVIDIA L40, dependency versions, 16-shape KUKA scene, no renderer, and warm asset/cooking caches. These are single-run scene-construction plus sim.reset() measurements, followed by 10 smoke steps; they exclude environment-manager setup and training.

Revision Environments Scene + reset
699a26b 32 58.64 s
699a26b 64 205.74 s
a7013246 32 8.49 s
a7013246 128 16.65 s
a7013246 512 52.37 s
a7013246 4096 124.62 s

The matched 32-environment startup is about 6.9x faster; a second current-head run took 8.36 s. A matched homogeneous 512-environment cube control improved from 36.71 s to 10.98 s, also confirming the empty-environment export fix. The larger current-head runs completed with the expected object counts and finite positions; this does not establish training throughput or convergence. The pinned CUDA 13 Python packages ran through CUDA forward-compatibility userspace libraries on this L40 host.

A separate CPU comparison against the develop base 2ed561de, using the homogeneous 256-environment cube task, showed gym.make() increasing from roughly 12-15 s to 91-96 s in repeated runs. The full-USD CPU path spends most of that extra time in native contact/tensor binding setup. The host had other CPU work, so these are not isolated benchmark numbers, but the large slowdown repeated. The full-USD CPU import provides per-environment collision groups, so a faster CPU path must preserve that isolation. Please document this startup cost and that the full import also applies to homogeneous CPU scenes. This tradeoff is separate from the GPU gains above; the two measurements also cover different startup scopes.

Fresh Docker + Tests CI completed on this exact head. The package test jobs passed, including isaaclab_ov. The workflow is red because performance-smoke-benchmarks failed: affected combinations report Isaac Sim unavailable on PYTHONPATH or Warp JIT-cache permission errors. Those CI failures do not validate or invalidate the separate controlled startup measurements above.

@ooctipus

Copy link
Copy Markdown
Collaborator

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 29, 2026
@marcodiiga

Copy link
Copy Markdown
Collaborator

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 29, 2026

@marcodiiga marcodiiga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed 851596a271053771184633818d1e03a160cce27a using the released OvPhysX 0.6.3 wheel.

The three original reproductions are fixed: ordinary USD-only supports now contact native objects, incompatible effective D6 rotation axes are rejected, and missing-tendon variants are rejected before the shared view is built. Compatible translation-limit differences remain accepted. The new regression tests fail against a7013246 for the intended reasons and pass this head.

Validation passed: 151 focused tests, 3 preset tests, and 15 heterogeneous integration cases on each of CPU and CUDA. The integration runs include the contact-sensor cases. The original independent probes also pass, including static USD-only supports with collision filtering enabled and disabled. Changed Python files pass the pinned Ruff checks, and the documentation example imports successfully.

Two narrower cases still prevent approval:

  • The USD-only contact fix misses a nested asset when its native ancestor is absent from some destination world compositions. I have added the reproduction and passing controls to the existing contact thread.
  • The new effective-axis guard rejects compatible articulations based on a disabled D6 joint's unused limits; the new inline comment gives the reproduction.

The completed Docker + Tests run on this head passed the package suites, including isaaclab_ov, but its benchmark job failed with Isaac Sim setup and Warp cache-permission errors. Docs, formatting, and multi-GPU checks passed. A fresh head-matched Docker + Tests run is in progress. These CI results are separate from the two reproduced code issues above.

@ooctipus

Copy link
Copy Markdown
Collaborator

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 29, 2026
@marcodiiga

Copy link
Copy Markdown
Collaborator

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 29, 2026

@marcodiiga marcodiiga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed 6cb30f4aec3d3d219611ca6d46d4e725f5dd5668 with the released OvPhysX 0.6.3 wheel. Both remaining findings are fixed: native coverage is checked per destination world, and disabled D6 joints no longer affect the active-axis signature.

The unchanged nested-support reproduction now settles all four objects correctly on CUDA. The disabled-joint reproduction initializes all six environments and passes indexed joint-state writes. The active D6-axis and tendon mismatch guards remain covered.

Validation passed: 159 focused tests, 3 preset tests, and 18 heterogeneous integration cases on each of CPU and CUDA. The three new regression cases also fail against 851596a2 for the intended reasons. Pinned Ruff and whitespace checks passed. No remaining blocking findings from this review.

Fresh Docker + Tests CI is still running.

@ooctipus
ooctipus merged commit d176bf0 into isaac-sim:develop Sep 29, 2026
80 of 88 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Isaac Lab Sep 29, 2026
@isaaclab-bot

isaaclab-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as b256ab2.

isaaclab-bot Bot pushed a commit that referenced this pull request Sep 29, 2026
## Summary

Enable heterogeneous rigid-body and articulation cloning with the
**released OVPhysX 0.6.3 wheel**. No native patch, dependency update, or
monkey-patch is required.

- Build native copies from the clone plan. Worlds containing source
assets or USD-only physics import their complete composition; other
worlds copy from a complete original with one environment ID. This
preserves within-world contacts without destination placeholders.
- Keep the CPU full-USD path because 0.6.3 does not support CPU
environment-ID filtering.
- Preserve numeric environment ordering and contact-filter pairing.
Reuse resolved paths inside `OvPhysxView`; assets do not orchestrate
binding reuse.
- Check active D6 rotation axes and tendon layouts once per variant
prototype; native metadata validates the remaining body/joint layout.
Defer unused rendering bindings during headless startup.
- Match the scene's declared step rate to `SimulationCfg.dt`, fixing
oversized automatic contact offsets. Enable Kuka Allegro's existing
heterogeneous shapes preset for OvPhysX.

## Validation

- 26 focused clone/export tests passed, including selective USD
materialization that keeps unaffected worlds on native cloning.
- 16 heterogeneous integration cases passed on CPU and 16 on GPU, using
the unmodified 0.6.3 wheel. Coverage includes indexed state, contact
isolation, USD-only supports with and without their native ancestor,
incompatible D6/tendon layouts, and compatible disabled-joint and
translation-limit differences. Regression cases were verified to fail
before their fixes.
- Formatting and changelog checks passed. Docker/GPU CI requested with
`run-ci`; documentation validation is left to CI.

### Released-wheel benchmark

`Isaac-Lift-KukaAllegro`, 4096 environments, 16 object variants, RTX
5090 GPU 1, no renderer/viewer, seed 42. One warm sample; 20 warmup
steps followed by 100 measured steps, synchronized around the
measurement window.

| Environment creation | Environment step | Environment steps/s |
| ---: | ---: | ---: |
| 97.97 s | 86.05 ms | 47,600 |

Environment creation is `gym.make`, not whole-process startup. This
measurement uses stock OVPhysX. Further native startup optimizations are
submitted separately in
[NVIDIA-Omniverse/PhysX#532](NVIDIA-Omniverse/PhysX#532);
they are not required by this PR or included in its numbers.

```bash
CUDA_VISIBLE_DEVICES=1 PXR_WORK_THREAD_LIMIT=1 OVPHYSX_NVTX=0 \
uv run --extra ovphysx isaaclab benchmark runtime \
  --task Isaac-Lift-KukaAllegro --num_envs 4096 --seed 42 \
  --num_steps 100 --warmup_steps 20 --device cuda:0 --visualizer none physics=ovphysx
```

Deformable native cloning remains outside this PR. CPU
kinematic-velocity reset limitations and heterogeneous rendering-golden
coverage are unchanged.

## Type of change

- Bug fix
- Documentation update

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] Contribution guidelines and formatting checks reviewed.
- [x] Documentation and focused regression tests updated.
- [x] Changelog fragments cover the changed source packages.
- [x] Contributor name is present in `CONTRIBUTORS.md`.

---------

Co-authored-by: Octi Zhang <[email protected]>

(cherry picked from commit d176bf0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants