Skip to content

Run deformable demos and tasks with OvPhysX - #6674

Merged
kellyguo11 merged 29 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/ovphysx-deformable-demos
Aug 1, 2026
Merged

kellyguo11 merged 29 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/ovphysx-deformable-demos

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • build on the merged OvPhysX deformable support from Add OVPhysX deformable object support #6665
  • add ovphysx presets for the Franka soft-volume and cloth-surface lift environments
  • run the deformables demo and deformable-object tutorial through the existing multi-backend launcher
  • expose OvPhysX link/COM Jacobians, mass matrices, and gravity compensation through the shared articulation data API
  • preserve fixed/floating-base layouts plus configured body and joint ordering for computed dynamics
  • run both public task presets with their configured arm actions and replicated deformables in every environment
  • resolve automatic physics selection before stage creation so only the selected backend registers its schemas
  • enable supported OvPhysX + OVRTX rendering cases and add one shared reviewed golden set for legacy and OvStage
  • retain explicit isaacsim_physx catalog labels while documenting ovphysx for both Franka deformable tasks

Rendering baselines

  • 23 reviewed PNGs: 12 Franka soft and 11 Franka cloth; requesting RGB also validates the RGBA output
  • the same files are consumed by both legacy and OvStage OVRTX paths
  • no thresholds were widened
  • retained skips are limited to soft/cloth instance segmentation (NVBUG#6463802) and cloth motion vectors (NVBUG#6489754)

Validation

  • legacy OvPhysX + OVRTX matrix: 21 passed, 3 skipped, 128 deselected
  • OvStage OvPhysX + OVRTX matrix against the same PNGs: 21 passed, 3 skipped, 128 deselected
  • focused config, two-environment live soft/cloth task, full OvPhysX manager, and articulation dynamics/reordering sweep: 40 passed, 3 skipped
  • live DexSuite state-task check after the cloner refactor: Isaac-Lift-KukaAllegro resolved the homogeneous CuboidCfg, created two environments, reset contact sensors, and completed the first OvPhysX step
  • both live OvPhysX demo entry points reached setup and advanced simulation without tracebacks
  • deformable-object tutorial produced finite CUDA root positions through 24 simulated seconds
  • full repository pre-commit suite passed on final head 74ce113386

Validated with OvPhysX 0.5.9. The local uv environment is kitless, so the Kit-backed test_simulation_context.py module was not runnable there because isaacsim is not installed; PR CI covers the Kit jobs.

@mmichelis could you take another look at the final rendering baselines and review fixes? @huidongc the shared legacy/OvStage baseline expectation is now implemented.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds OvPhysX deformable body support to Isaac Lab: a new DeformableObject asset backed by the OvPhysX wheel, corresponding OvPhysxDeformableBodyView / OvPhysxDeformableMaterialView wrappers, and OvPhysX presets for the Franka soft-volume and cloth-surface lift tasks. It also extends the multi-backend demo and tutorial launchers to accept --physics ovphysx, registers the OvPhysX deformable USD schema before stage creation, and upgrades the OvPhysxView dtype layer from a hard-coded float32 assumption to per-binding DLPack metadata.

  • New asset and views: DeformableObject, DeformableObjectData, and two view classes wrap all OvPhysX volume/surface deformable tensor bindings and propagate state through Warp kernels; the full-stage export path is requested automatically at construction time.
  • Backend dtype generalization: ovphysx_view.py resolves the scalar dtype of each binding from its DLPack code/bits/lanes metadata rather than assuming float32, enabling correct handling of new int32 element-index tensors.
  • Task and demo integration: FrankaSoftEnvCfg and FrankaClothEnvCfg gain ovphysx preset slots; the deformables demo and tutorial scripts route --physics ovphysx through the shared multi-backend launcher with Kit disabled.

Confidence Score: 4/5

Safe to merge for volume deformable workflows; cloth surface deformable runtime material writes will be silently unavailable until the schema check is broadened.

The deformable asset lifecycle, OvPhysX view dtype generalization, full-stage export path, and task presets all look correct. One functional gap: _find_deformable_material only recognizes OmniPhysicsDeformableMaterialAPI, the generic volume schema. Cloth materials carry surface-specific schemas that the check misses, so the material view is never created for cloth deformables and runtime stiffness/thickness/damping writes are unavailable without any hard error. The fix is a one-line set-intersection change.

deformable_object.py (_find_deformable_material) needs a broadened schema check; deformable_object_data.py can improve caching by storing the reshaped read buffers as stable fields.

Important Files Changed

Filename Overview
source/isaaclab_ovphysx/isaaclab_ovphysx/assets/deformable_object/deformable_object.py New 612-line OvPhysX DeformableObject asset; contains a bug in _find_deformable_material that checks only OmniPhysicsDeformableMaterialAPI, missing all surface-specific schemas and PhysxDeformableMaterialAPI.
source/isaaclab_ovphysx/isaaclab_ovphysx/assets/deformable_object/deformable_object_data.py Lazy data container for deformable state; creates transient reinterpret view objects on each property access, defeating the OvPhysxView read-cache optimization.
source/isaaclab_ovphysx/isaaclab_ovphysx/assets/deformable_object/views.py New PhysX-style view classes for volume/surface deformable bodies and materials; clean delegation to OvPhysxView with correct dtype normalization and eager binding.
source/isaaclab_ovphysx/isaaclab_ovphysx/sim/views/ovphysx_view.py Replaces hard-coded float32 dtype assumption with per-binding DLPack metadata resolution; adds deformable read-only tensor names and fixes structured-dtype allocation logic accordingly.
source/isaaclab_ovphysx/isaaclab_ovphysx/physics/ovphysx_manager.py Adds full-stage export path for deformables, independent per-plugin USD schema registration, and refactors clone-replay logic; changes are well-guarded and lifecycle state is properly reset.
source/isaaclab/isaaclab/sim/simulation_context.py Adds a pre-stage-creation hook that dispatches _prepare_stage_creation() to the selected backend; correctly handles both concrete and PresetCfg physics configs.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py Adds OvPhysX preset for cloth lift task with appropriate PhysX surface deformable spawn config and event overrides; gripper stiffness fix moved to post_init where it belongs.
source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py Adds OvPhysX preset for soft-volume lift task, reusing the existing PhysX deformable spawn config; minimal, clean addition.
scripts/tutorials/01_assets/run_deformable_object.py Migrates tutorial to the multi-backend launch_simulation helper and adds ovphysx backend support; cleanly removes Kit-specific camera output path.

Sequence Diagram

sequenceDiagram
    participant SC as SimulationContext.__init__
    participant OPM as OvPhysxManager
    participant DO as DeformableObject.__init__
    participant SIM as sim.reset()

    SC->>OPM: _prepare_stage_creation()
    SC->>SC: create USD stage
    Note over DO: Scene design phase
    DO->>OPM: require_full_stage()
    DO->>DO: queue_usd_replication(cfg)
    SIM->>OPM: initialize(sim_context)
    SIM->>OPM: _warmup_and_load()
    OPM->>OPM: _export_selected_stage() full stage
    OPM->>OPM: physx.add_usd(scene.usda)
    OPM->>OPM: _replay_pending_clones() skipped
    SIM->>DO: _initialize_impl()
    DO->>DO: _detect_deformable_type()
    DO->>DO: OvPhysxDeformableBodyView(...)
    DO->>DO: _find_deformable_material() bug here
    DO->>DO: OvPhysxDeformableMaterialView(...)
Loading

Reviews (1): Last reviewed commit: "Keep deformable visualizer compatibility..." | Re-trigger Greptile

material_paths = UsdShade.MaterialBindingAPI(root_prim).GetDirectBindingRel("physics").GetTargets()
for material_path in material_paths:
material_prim = root_prim.GetStage().GetPrimAtPath(material_path)
if "OmniPhysicsDeformableMaterialAPI" in _get_api_schemas(material_prim):

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.

P1 _find_deformable_material only accepts a prim that carries OmniPhysicsDeformableMaterialAPI, which is a volume-deformable generic schema. Surface cloth materials authored with PhysxSurfaceDeformableBodyMaterialCfg apply PhysxSurfaceDeformableMaterialAPI (and/or OmniPhysicsSurfaceDeformableMaterialAPI) — neither of which is OmniPhysicsDeformableMaterialAPI. As a result, the cloth DeformableObject will silently receive material_prim = None, log a spurious warning, and never create _material_physx_view, making all runtime cloth-material writes (stiffness, thickness, bending damping, etc.) permanently unavailable even when a material is present. The same issue can affect volume deformables using PhysxDeformableBodyMaterialCfg if their prim carries only PhysxDeformableMaterialAPI.

Suggested change
if "OmniPhysicsDeformableMaterialAPI" in _get_api_schemas(material_prim):
if _get_api_schemas(material_prim) & (_GENERIC_MATERIAL_SCHEMAS | _SURFACE_MATERIAL_SCHEMAS):

Comment on lines +70 to +74
if self._nodal_pos_w.timestamp < self._sim_timestamp:
self._root_view.read_simulation_nodal_positions_into(
self._nodal_pos_w.data.view(wp.float32).reshape((self._num_instances, self._max_sim_vertices, 3))
)
self._nodal_pos_w.timestamp = self._sim_timestamp

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.

P2 Both nodal_pos_w and nodal_vel_w call .view(wp.float32).reshape(...) on each property access, producing a brand-new Python object every time. OvPhysxView._read_view caches the reinterpret view keyed by id(dst), but because each access creates a new object the cache is cold on every call, so the wheel's object-identity read fast-path is never exercised. Storing the reshaped view as a lazily-initialized field eliminates the repeated allocation and keeps the wheel cache warm.

Suggested change
if self._nodal_pos_w.timestamp < self._sim_timestamp:
self._root_view.read_simulation_nodal_positions_into(
self._nodal_pos_w.data.view(wp.float32).reshape((self._num_instances, self._max_sim_vertices, 3))
)
self._nodal_pos_w.timestamp = self._sim_timestamp
if self._nodal_pos_w.timestamp < self._sim_timestamp:
if self._nodal_pos_w_read_buf is None:
self._nodal_pos_w_read_buf = self._nodal_pos_w.data.view(wp.float32).reshape(
(self._num_instances, self._max_sim_vertices, 3)
)
self._root_view.read_simulation_nodal_positions_into(self._nodal_pos_w_read_buf)
self._nodal_pos_w.timestamp = self._sim_timestamp

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!

Comment on lines +33 to +61
def __init__(self, root_view: OvPhysxDeformableBodyView, device: str) -> None:
"""Initialize the deformable object data.

Args:
root_view: OVPhysX deformable body view used for simulation-state reads.
device: Device used for simulation state and derived computations.
"""
super().__init__(device)
self._root_view: OvPhysxDeformableBodyView = weakref.proxy(root_view)

self._num_instances = root_view.count
self._max_sim_vertices = root_view.max_simulation_nodes_per_body
self._max_sim_elements = root_view.max_simulation_elements_per_body
self._max_collision_elements = root_view.max_collision_elements_per_body

self._nodal_pos_w = TimestampedBufferWarp((self._num_instances, self._max_sim_vertices), device, wp.vec3f)
self._nodal_vel_w = TimestampedBufferWarp((self._num_instances, self._max_sim_vertices), device, wp.vec3f)
self._nodal_state_w = TimestampedBufferWarp((self._num_instances, self._max_sim_vertices), device, vec6f)
self._root_pos_w = TimestampedBufferWarp((self._num_instances,), device, wp.vec3f)
self._root_vel_w = TimestampedBufferWarp((self._num_instances,), device, wp.vec3f)

self._nodal_pos_w_proxy: ProxyArray | None = None
self._nodal_vel_w_proxy: ProxyArray | None = None
self._nodal_state_w_proxy: ProxyArray | None = None
self._root_pos_w_proxy: ProxyArray | None = None
self._root_vel_w_proxy: ProxyArray | None = None

self.default_nodal_state_w: ProxyArray | None = None
self.nodal_kinematic_target: ProxyArray | None = None

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.

P2 Read-buffer fields not declared in __init__

To accompany the suggestion on nodal_pos_w/nodal_vel_w, the two stable read-buffer fields (_nodal_pos_w_read_buf and _nodal_vel_w_read_buf) need to be initialised to None in __init__ — otherwise the lazy check if self._nodal_pos_w_read_buf is None raises AttributeError on the first access. Add self._nodal_pos_w_read_buf: wp.array | None = None and self._nodal_vel_w_read_buf: wp.array | None = None alongside the existing _nodal_pos_w_proxy declarations.

@AntoineRichard
AntoineRichard force-pushed the antoiner/ovphysx-deformable-demos branch from bdfe17b to b2d101b Compare July 27, 2026 07:38

@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.

Reviewed exact head b2d101b5820d895cd7f8c623b0c505ac9b6eac70 as an incremental stack, then replayed its nine commits onto current #6665 head b6b479b5d16834547d77b922d2b6419d3ae62534 to exercise the semantic conflicts.

I am requesting changes for the reproduced multi-environment failure, the newly activated rendering cases without reviewed baselines, and the pre-stage hook ordering issue in the inline threads.

Validation on the integrated stack:

  • 33 focused config/manager tests passed.
  • Both one-environment soft and cloth task smokes passed with ovphysx==0.5.9.
  • Both stock presets failed at four environments because only one deformable was created. Changing only replicate_physics to True produced four instances, (4, 86) observations, and a finite step for both tasks.
  • The rendering matrix collects 34 OvPhysX cases across soft and cloth, with 32 runnable after the two explicit skips, but the PR adds no matching golden images.

The maintained docs also need to move with the behavior: docs/source/tutorials/01_assets/run_deformable_object.rst still documents only PhysX/Newton and has stale fixed highlight ranges, while the manual manipulation table in docs/source/overview/environments.rst contradicts the newly edited comprehensive table.

Finally, this PR is currently conflicting with develop and has only the labeler check. Please rebase it after #6665 and run the full task and rendering jobs on the resulting exact head.

@@ -436,6 +441,8 @@ class FrankaSoftSceneCfg(PresetCfg):
# PhysX does not support replicating physics for deformable objects
physx: _FrankaSoftSceneCfg = _FrankaSoftSceneCfg(num_envs=128, env_spacing=2.5, replicate_physics=False)

ovphysx: _FrankaSoftSceneCfg = _FrankaSoftSceneCfg(num_envs=128, env_spacing=2.5, replicate_physics=False)

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.

[P1] Keep OvPhysX replication enabled for these multi-environment presets.

Both OvPhysX presets declare num_envs=128 but set replicate_physics=False. With current develop, that removes OvPhysxReplicateContext; in a kitless run there is no automatic USD fallback, so only env_0 reaches OVPhysX.

I reproduced this with both presets at four environments on ovphysx==0.5.9: environment construction fails because observations expect four rows while deformable state has one ([1, 67, 3] for soft and [1, 961, 3] for cloth). Changing only replicate_physics to True gives four deformable instances, (4, 86) observations, and a finite step for both tasks. Please enable replication for both presets and make at least one smoke use more than one environment; the current helper forces num_envs=1 and masks this failure.

@@ -182,6 +185,8 @@ class PhysicsCfg(PresetCfg):

physx: PhysxCfg = PhysxCfg()

ovphysx: OvPhysxCfg = OvPhysxCfg()

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.

[P1] Add reviewed OvPhysX goldens before this preset activates the rendering matrix.

Adding this field removes the backend-support skip for the soft and cloth kitless rendering tests, but there are no ovphysx-* files in either golden directory. That exposes 32 runnable cases. The ten Newton-Warp renderer cases fail deterministically. The other 22 carry flaky(max_runs=3, min_passes=1), while validate_camera_outputs writes a missing golden before failing, so a retry can pass against the unreviewed image produced by its first attempt.

Please add and review the baselines, or keep these combinations skipped until they land. The missing-golden path should also avoid mutating the baseline directory during an ordinary test run.

if stage_physics is not None:
if not hasattr(stage_physics, "class_type") and hasattr(stage_physics, "default"):
stage_physics = stage_physics.default
stage_physics.class_type._prepare_stage_creation()

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.

[P2] Resolve the automatic backend selection before running this hook.

On current develop, _resolve_auto_physx_cfg runs after the stage has already been created. In a kitless run whose selected/default preset is physx, this therefore invokes the PhysX no-op here and only later switches to OvPhysxCfg; the OvPhysX deformable schemas are never registered before stage creation, which is the ordering this hook is intended to guarantee.

Please hoist preset/default and automatic PhysX-to-OvPhysX resolution before this call, then test that the hook runs once on the final backend while no stage exists.

@AntoineRichard
AntoineRichard force-pushed the antoiner/ovphysx-deformable-demos branch 2 times, most recently from 0c80793 to ab0439a Compare July 28, 2026 21:20
@AntoineRichard

AntoineRichard commented Jul 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

@huidongc Update: the complete supported Franka soft/cloth OvPhysX + OVRTX set is 23 images, not 21. An RGB request also exposes and validates the RGBA output, giving 12 soft and 11 cloth baselines. I generated and visually reviewed one legacy baseline set, then verified both legacy and OvStage against those exact files: each path reports 21 passed and 3 retained NVBUG skips.

@huidongc

Copy link
Copy Markdown
Collaborator

@huidongc I am replacing the temporary OvPhysX rendering skips with the complete supported Franka soft/cloth OvPhysX + OVRTX golden-image set (21 images). My plan is to generate one reviewed baseline set from the legacy OVRTX path and require both the legacy and OvStage paths to pass against those same images, so the two paths cannot silently diverge. Does that match the intended rendering-correctness expectation?

@AntoineRichard Yes, you are right!

@kellyguo11
kellyguo11 requested a review from myurasov-nv as a code owner July 29, 2026 05:47
AntoineRichard and others added 23 commits July 31, 2026 21:02
Keep the tensor attribute constant import required by the merged OVPhysX\nruntime smoke while retaining the added cloth preset coverage.
Register the selected backend schemas before manager unit tests create USD\nstages, preserving later task-smoke coverage in the same process.
Expose computed Jacobians, mass matrices, and gravity forces through the shared articulation data API. Preserve fixed and floating base layouts and apply configured body and joint ordering so task-space controllers can run with OvPhysX.
Resolve automatic physics selection before stage creation so the chosen backend can register its schemas in time. Replicate OvPhysX deformable scenes across all environments and keep rendering cases skipped until reviewed golden images are available.
Require the optional ovphysx module when selecting backend smoke
cases. This prevents generic standalone CI shards from launching
demos without the runtime wheel.
Install the pinned runtime in the non-Kit standalone shard so its
OvPhysX demo cases execute instead of being skipped.

Restore the generic backend availability behavior from develop.
Define the supported Franka deformable baseline matrix and the shared legacy/OvStage validation workflow before regenerating the images.
Lay out the exact baseline matrix, visual review, shared legacy and OvStage validation, and Kelly's catalog corrections.
Activate supported kitless rendering cases for the Franka soft and cloth tasks. Add shared legacy and OvStage OVRTX baselines and retain explicit Isaac Sim PhysX catalog labels.
Clarify that the heterogeneous shapes preset is unsupported with
OvPhysX and lock the conflict behavior for both CLI argument orders.
Remove the internal implementation plan and design notes that were
accidentally included with the OvPhysX rendering changes.
Add baseline paths for the newly enabled OvPhysX rendering cases so CI records actual comparison images after the Newton pin update.
Replace the seeded Franka soft and cloth baselines with reviewed outputs generated by CI after the Newton renderer pin update.
Keep both PyTetWild and OvPhysX in the standalone demo job while
using the action's single extra-pip-packages input.
Install the optional tetrahedralization dependencies in the isaaclab_ov
CI job so procedural volume deformable tests can construct their meshes.
Include the explicit OvPhysX configuration in PhysxAutoCfg so the automatic selector matches the advertised ovphysx preset.
Temporarily skip the Franka soft OvPhysX and Newton renderer RGB case because it renders the nondeterministic simulation tetrahedral mesh. Remove the corresponding corrupted RGB and RGBA baselines; isaac-sim#6773 will restore the case with the visual render mesh.
Exercise the production Franka deformable camera configs introduced on develop instead of the removed test-local helper. Advertise their verified OvPhysX presets in the environment catalog.
Document the OvPhysX deformables showroom option and preserve the workflow pin guard while installing PyTetWild for OV tests.
@AntoineRichard
AntoineRichard force-pushed the antoiner/ovphysx-deformable-demos branch from 00eb915 to 90247e1 Compare July 31, 2026 19:05
@kellyguo11
kellyguo11 merged commit 254b52a into isaac-sim:develop Aug 1, 2026
63 of 81 checks passed
kellyguo11 added a commit that referenced this pull request Aug 1, 2026
# Description

This aggregate PR preserves the ancestry of the articulation reordering
and selector stack so it can be reviewed and merged as one coherent
change.

Merge order preserved in this branch:

- #6507 — articulation ordering element-kind refactor
- #6479 — P9 cached articulation reads across Newton, PhysX, and
OVPhysX, including OVPhysX computed dynamics
- #6741 — rigid asset cache invalidation
- #6652 — P10 signed `int32`/`int64` selector support inside Warp work
kernels
- #6740 — P11 per-asset cached `ProxyArray` finder selectors and
explicit legacy return modes

The P10 commits remain ancestors of P11. The source PRs should stay open
and unchanged until this aggregate PR merges; they can then be closed as
superseded.

Related overlap: #6674. This branch includes the OVPhysX Jacobian,
mass-matrix, and gravity-compensation side folded into P9.

Key outcomes:

- Articulation work kernels accept signed 32-bit and signed 64-bit item
selectors without Torch conversion allocations.
- Raw kernel APIs use dtype-aware factories while retaining
compatibility aliases for deprecated kernels.
- Stable articulation reads are cached for Newton, PhysX, and OVPhysX.
- OVPhysX exposes computed dynamics through the backend-agnostic
articulation data API.
- Asset finders provide opt-in cached, immutable `ProxyArray` selectors
with zero-copy Torch and Warp views and per-asset LRU ownership.
- Implicit legacy finder returns are deprecated; `as_proxy=False`
retains them explicitly during migration.
- Rigid asset state/property writes invalidate same-timestamp derived
caches correctly.
- Changelog entries are consolidated to one fragment per touched
package.

## Asset performance before and after this PR

The table compares the PR merge-base (`a050ceade7`) with the pushed PR
head (`00c8c25cb1`) on an RTX 5090 using CUDA, 4,096 instances, 100
warmup calls, and 1,000 measured calls per operation. It contains only
timed asset method/property calls; application and benchmark startup are
excluded.

Values are the equal-weight mean of the per-operation mean latencies for
operations present on both revisions. The pre-PR `torch_tensor` mode and
post-PR `torch_tensor_int32` mode both generate CUDA `torch.int32`
selectors. Lower is better.

| Backend | Asset | Matched methods / data properties | API methods,
before → after | Data properties, before → after |
|---|---|---:|---:|---:|
| PhysX | Articulation | 24 / 65 | 129.12 → 90.82 µs (-29.7%) | 6.94 →
5.22 µs (-24.8%) |
| PhysX | Rigid object | 13 / 40 | 82.48 → 54.65 µs (-33.7%) | 16.36 →
7.86 µs (-51.9%) |
| PhysX | Rigid-object collection | 13 / 69 | 218.32 → 131.36 µs
(-39.8%) | 64.13 → 27.86 µs (-56.6%) |
| Newton | Articulation | 24 / 64 | 108.64 → 62.01 µs (-42.9%) | 6.48 →
4.70 µs (-27.4%) |
| Newton | Rigid object | 8 / 40 | 66.34 → 43.16 µs (-34.9%) | 15.21 →
10.28 µs (-32.5%) |
| Newton | Rigid-object collection | 8 / 78 | 83.08 → 50.47 µs (-39.3%)
| 37.99 → 12.12 µs (-68.1%) |
| OVPhysX | Articulation | 24 / — | 237.21 → 209.79 µs (-11.6%) |
Baseline failed preflight¹ |
| OVPhysX | Rigid object | 8 / 40 | 144.43 → 142.74 µs (-1.2%) | 18.57 →
15.36 µs (-17.3%) |
| OVPhysX | Rigid-object collection | 8 / 78 | 185.65 → 191.17 µs
(+3.0%) | 46.75 → 41.31 µs (-11.6%) |

API-method latency improved in 8 of 9 backend/asset pairs. Data-property
latency improved in every comparable pair.

¹ The merge-base OVPhysX articulation data benchmark fails during
`body_com_jacobian_w` preflight, while the post-PR suite passes. That
data row is excluded instead of mixing unmatched measurements. The new
`int64` and Warp selector modes are also excluded from this before/after
table because they have no pre-PR equivalent; the post-PR all-mode
matrix passes across all nine backend/asset pairs.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Documentation update

## Verification

- Aggregate ordering, dtype-kernel, proxy-cache, consumer,
documentation, and benchmark matrix: **868 passed**.
- Shared articulation, rigid-object, and rigid-object-collection
interface suites: **6,059 passed, 71 skipped, 68 expected failures**.
- OVPhysX computed dynamics: **4 CUDA tests passed** and **4 CPU tests
passed** in separate processes due the backend process-global device
lock.
- Changelog tooling: **90 passed**.
- `./isaaclab.sh -f`: all hooks passed at the pushed HEAD.
- Independent aggregate review: no remaining Critical, Important, or
Minor findings.

Full Kit-backed PhysX/Newton live asset suites were not completed
locally because the available Kit environment timed out during startup;
CI should provide that coverage.

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `./isaaclab.sh -f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no unexpected new warnings
- [x] I have added tests that prove the fixes and features are effective
- [x] I have added one changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Kelly Guo <[email protected]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# Description

Caches recorded Warp commands for articulation ordering and stable
post-read kernels in the PhysX, Newton, and OVPhysX backends. This
avoids repeated Warp launch setup while preserving CPU behavior and CUDA
graph capture. Cached commands are discarded when articulation data is
rebound or ordering buffers are rebuilt so recorded array arguments
cannot become stale.

OVPhysX now also exposes articulation COM/link Jacobians, mass matrices,
and gravity compensation through the backend-agnostic data API.
Same-timestamp COM, mass, inertia, and armature writes invalidate the
affected computed-dynamics buffers before the next read.

This is stacked after isaac-sim#6341.

## Relationship to isaac-sim#6674

Commit `00c869a0f8` contains the focused OVPhysX articulation-dynamics
portion of isaac-sim#6674, excluding its unrelated deformable-task changes. The
cache and freshness work is isolated in `8bd23d94ed`. If isaac-sim#6674 merges
first, the overlapping dynamics commit can be dropped while rebasing and
the cache commit retained.

## Type of change

- New feature (non-breaking change which adds functionality)

## Validation

- `./isaaclab.sh -f`
- Focused cache, lifecycle, generalized-dynamics, and CPU dynamics
regressions: 9 passed.
- Focused OVPhysX CUDA dynamics shard, after confirming the GPU was
idle: 4 passed.
- Changelog tooling: 90 passed.
- Added focused PhysX coverage for command reuse and reset invalidation.
- Added focused Newton coverage for command reuse, reset invalidation,
and graph-capture fallback.
- Performance measurements are documented in the articulation ordering
investigation report.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `./isaaclab.sh -f`
- [x] My changes generate no new warnings
- [x] I have added tests that cover the feature
- [x] I have added changelog fragments for `isaaclab_physx`,
`isaaclab_newton`, and `isaaclab_ovphysx`
- [x] My name already exists in `CONTRIBUTORS.md`

Documentation screenshots are not applicable.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
## Summary

- build on the merged OvPhysX deformable support from isaac-sim#6665
- add `ovphysx` presets for the Franka soft-volume and cloth-surface
lift environments
- run the deformables demo and deformable-object tutorial through the
existing multi-backend launcher
- expose OvPhysX link/COM Jacobians, mass matrices, and gravity
compensation through the shared articulation data API
- preserve fixed/floating-base layouts plus configured body and joint
ordering for computed dynamics
- run both public task presets with their configured arm actions and
replicated deformables in every environment
- resolve automatic physics selection before stage creation so only the
selected backend registers its schemas
- enable supported OvPhysX + OVRTX rendering cases and add one shared
reviewed golden set for legacy and OvStage
- retain explicit `isaacsim_physx` catalog labels while documenting
`ovphysx` for both Franka deformable tasks

## Rendering baselines

- 23 reviewed PNGs: 12 Franka soft and 11 Franka cloth; requesting RGB
also validates the RGBA output
- the same files are consumed by both legacy and OvStage OVRTX paths
- no thresholds were widened
- retained skips are limited to soft/cloth instance segmentation
(`NVBUG#6463802`) and cloth motion vectors (`NVBUG#6489754`)

## Validation

- legacy OvPhysX + OVRTX matrix: `21 passed, 3 skipped, 128 deselected`
- OvStage OvPhysX + OVRTX matrix against the same PNGs: `21 passed, 3
skipped, 128 deselected`
- focused config, two-environment live soft/cloth task, full OvPhysX
manager, and articulation dynamics/reordering sweep: `40 passed, 3
skipped`
- live DexSuite state-task check after the cloner refactor:
`Isaac-Lift-KukaAllegro` resolved the homogeneous `CuboidCfg`, created
two environments, reset contact sensors, and completed the first OvPhysX
step
- both live OvPhysX demo entry points reached setup and advanced
simulation without tracebacks
- deformable-object tutorial produced finite CUDA root positions through
24 simulated seconds
- full repository pre-commit suite passed on final head `74ce113386`

Validated with OvPhysX 0.5.9. The local uv environment is kitless, so
the Kit-backed `test_simulation_context.py` module was not runnable
there because `isaacsim` is not installed; PR CI covers the Kit jobs.

@mmichelis could you take another look at the final rendering baselines
and review fixes? @huidongc the shared legacy/OvStage baseline
expectation is now implemented.

---------

Co-authored-by: Kelly Guo <[email protected]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# Description

This aggregate PR preserves the ancestry of the articulation reordering
and selector stack so it can be reviewed and merged as one coherent
change.

Merge order preserved in this branch:

- isaac-sim#6507 — articulation ordering element-kind refactor
- isaac-sim#6479 — P9 cached articulation reads across Newton, PhysX, and
OVPhysX, including OVPhysX computed dynamics
- isaac-sim#6741 — rigid asset cache invalidation
- isaac-sim#6652 — P10 signed `int32`/`int64` selector support inside Warp work
kernels
- isaac-sim#6740 — P11 per-asset cached `ProxyArray` finder selectors and
explicit legacy return modes

The P10 commits remain ancestors of P11. The source PRs should stay open
and unchanged until this aggregate PR merges; they can then be closed as
superseded.

Related overlap: isaac-sim#6674. This branch includes the OVPhysX Jacobian,
mass-matrix, and gravity-compensation side folded into P9.

Key outcomes:

- Articulation work kernels accept signed 32-bit and signed 64-bit item
selectors without Torch conversion allocations.
- Raw kernel APIs use dtype-aware factories while retaining
compatibility aliases for deprecated kernels.
- Stable articulation reads are cached for Newton, PhysX, and OVPhysX.
- OVPhysX exposes computed dynamics through the backend-agnostic
articulation data API.
- Asset finders provide opt-in cached, immutable `ProxyArray` selectors
with zero-copy Torch and Warp views and per-asset LRU ownership.
- Implicit legacy finder returns are deprecated; `as_proxy=False`
retains them explicitly during migration.
- Rigid asset state/property writes invalidate same-timestamp derived
caches correctly.
- Changelog entries are consolidated to one fragment per touched
package.

## Asset performance before and after this PR

The table compares the PR merge-base (`a050ceade7`) with the pushed PR
head (`00c8c25cb1`) on an RTX 5090 using CUDA, 4,096 instances, 100
warmup calls, and 1,000 measured calls per operation. It contains only
timed asset method/property calls; application and benchmark startup are
excluded.

Values are the equal-weight mean of the per-operation mean latencies for
operations present on both revisions. The pre-PR `torch_tensor` mode and
post-PR `torch_tensor_int32` mode both generate CUDA `torch.int32`
selectors. Lower is better.

| Backend | Asset | Matched methods / data properties | API methods,
before → after | Data properties, before → after |
|---|---|---:|---:|---:|
| PhysX | Articulation | 24 / 65 | 129.12 → 90.82 µs (-29.7%) | 6.94 →
5.22 µs (-24.8%) |
| PhysX | Rigid object | 13 / 40 | 82.48 → 54.65 µs (-33.7%) | 16.36 →
7.86 µs (-51.9%) |
| PhysX | Rigid-object collection | 13 / 69 | 218.32 → 131.36 µs
(-39.8%) | 64.13 → 27.86 µs (-56.6%) |
| Newton | Articulation | 24 / 64 | 108.64 → 62.01 µs (-42.9%) | 6.48 →
4.70 µs (-27.4%) |
| Newton | Rigid object | 8 / 40 | 66.34 → 43.16 µs (-34.9%) | 15.21 →
10.28 µs (-32.5%) |
| Newton | Rigid-object collection | 8 / 78 | 83.08 → 50.47 µs (-39.3%)
| 37.99 → 12.12 µs (-68.1%) |
| OVPhysX | Articulation | 24 / — | 237.21 → 209.79 µs (-11.6%) |
Baseline failed preflight¹ |
| OVPhysX | Rigid object | 8 / 40 | 144.43 → 142.74 µs (-1.2%) | 18.57 →
15.36 µs (-17.3%) |
| OVPhysX | Rigid-object collection | 8 / 78 | 185.65 → 191.17 µs
(+3.0%) | 46.75 → 41.31 µs (-11.6%) |

API-method latency improved in 8 of 9 backend/asset pairs. Data-property
latency improved in every comparable pair.

¹ The merge-base OVPhysX articulation data benchmark fails during
`body_com_jacobian_w` preflight, while the post-PR suite passes. That
data row is excluded instead of mixing unmatched measurements. The new
`int64` and Warp selector modes are also excluded from this before/after
table because they have no pre-PR equivalent; the post-PR all-mode
matrix passes across all nine backend/asset pairs.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Documentation update

## Verification

- Aggregate ordering, dtype-kernel, proxy-cache, consumer,
documentation, and benchmark matrix: **868 passed**.
- Shared articulation, rigid-object, and rigid-object-collection
interface suites: **6,059 passed, 71 skipped, 68 expected failures**.
- OVPhysX computed dynamics: **4 CUDA tests passed** and **4 CPU tests
passed** in separate processes due the backend process-global device
lock.
- Changelog tooling: **90 passed**.
- `./isaaclab.sh -f`: all hooks passed at the pushed HEAD.
- Independent aggregate review: no remaining Critical, Important, or
Minor findings.

Full Kit-backed PhysX/Newton live asset suites were not completed
locally because the available Kit environment timed out during startup;
CI should provide that coverage.

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `./isaaclab.sh -f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no unexpected new warnings
- [x] I have added tests that prove the fixes and features are effective
- [x] I have added one changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Kelly Guo <[email protected]>
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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants