Skip to content

Fix OvPhysX deformable row order for more than 10 environments - #8972

Closed
blessedefe4real wants to merge 2 commits into
isaac-sim:mainfrom
blessedefe4real:fix/ovphysx-deformable-env-order
Closed

blessedefe4real wants to merge 2 commits into
isaac-sim:mainfrom
blessedefe4real:fix/ovphysx-deformable-env-order

Conversation

@blessedefe4real

@blessedefe4real blessedefe4real commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

On the OvPhysX backend, OvPhysxView._binding re-sorted binding rows into numeric clone order only for RIGID_BODY_* and ARTICULATION_* tensor types. Surface and volume deformable bindings kept the wheel's lexicographic prim order (env_0, env_1, env_10, ...), so with more than 10 environments row i of a DeformableObject view did not belong to env_i, and reads, writes and resets hit another environment.

This adds the SURFACE_DEFORMABLE_*, DEFORMABLE_SIM_*, DEFORMABLE_REST_* and DEFORMABLE_COLLISION_* families to the reordering. DEFORMABLE_MATERIAL_* bindings stay excluded because the wheel exposes no prim paths for them (noted with a TODO, as in the issue).

Fixes #8963

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Validation

  • source/isaaclab_ov/test/sim/test_ovphysx_view.py: 55 passed, 2 skipped with the fix.
  • The two new regression tests (surface and volume deformable, 12 envs in lexicographic order) fail on main and pass with the fix. A third test checks that material bindings are left untouched.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Release backport

  • Backport to release/3.1.0 after this pull request merges into main.

OvPhysxView only re-sorted rigid-body and articulation binding rows into
numeric clone order. Surface and volume deformable bindings kept the
wheel's lexicographic prim order (env_0, env_1, env_10, ...), so with more
than 10 environments row i of a DeformableObject view no longer belonged
to env_i and reads, writes and resets hit another environment.

Include the deformable sim, rest and collision tensor families in the
reordering. Deformable material bindings stay excluded because the wheel
does not expose prim paths for them.

Fixes isaac-sim#8963
@blessedefe4real
blessedefe4real requested a review from a team November 8, 2026 01:32
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Nov 8, 2026
@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects row-to-environment matching in OvPhysX deformable views.

The PR appears safe to merge, with a non-blocking gap in tests for rest and collision ordering.

Findings

  1. P2 Two families lack ordering tests ▶

Summary

This PR extends numeric environment ordering in OvPhysxView to surface and volume deformable bindings.

  • Deformable tensor rows now follow numeric environment order.

Reviews (1) · Last reviewed commit: "Fix OvPhysX deformable rows following le..." · Reviewed by Greptile

@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

All reviewed code categories look good.

  • PR description: The body and validation match the diff, but “10+ environments” includes the unaffected 10-environment case; change the title to “more than 10 environments.”
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: Test quality looks good.

No blocking issues. No inline findings.

Automated review; human maintainers own approval decisions.

@blessedefe4real blessedefe4real changed the title Fix OvPhysX deformable row order for 10+ environments Fix OvPhysX deformable row order for more than 10 environments Nov 15, 2026
@blessedefe4real

Copy link
Copy Markdown
Contributor Author

Hi maintainers, a friendly ping: this is ready for review. The automated review feedback is addressed (the ordering test now also covers the rest and collision deformable bindings). Could a code owner take a look when you have a moment? Thanks!

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

Thanks for the issue and attempt in solution,
this is very revealing, and problem is true

Ill find a more root level fixes, current shape is more like a work a round

@ooctipus

ooctipus commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

can you check #9334 fixes your issue?

@blessedefe4real

Copy link
Copy Markdown
Contributor Author

Thanks for digging into the root cause. I can't run the CUDA tests on my side, so this is from reading the diff: yes, #9334 should fix #8963. Binding the deformable body and material views by clone-plan paths sorted numerically by env ID removes the lexicographic order at the source instead of re-sorting rows afterwards. It also covers the material bindings, which this PR couldn't reorder because the wheel exposes no prim paths for them. Your 12-env test, which checks per-env state and friction through exact native paths, covers exactly the symptom in the issue.

I'm happy for #9334 to supersede this. I'll close this PR once yours is merged, unless you'd rather I close it now.

AntoineRichard pushed a commit that referenced this pull request Dec 2, 2026
## Description

With twelve cloned environments, writing deformable row 2 changes
`env_10`. Reproduced on `main` at `7d4024cf3` with the pinned
`ovphysx==0.8.1.45833638316` runtime on an RTX 5090. Wildcard bindings
enumerate `env_0, env_1, env_10, ...`, while the asset APIs index by
environment.

Resolve deformable body and material selections through the existing
clone-plan path expansion used by rigid assets. Native bindings preserve
the supplied explicit order, including materials that expose no path
metadata. Shared materials retain their shared selection. Remove the
redundant path lookup and remapping from deformable geometry
publication, which already supplies explicit paths.

Fixes #8963. Alternative to #8972 that also addresses its
material-ordering gap. Generic rigid/contact sorting retains wildcard
consumers outside this change.

## Validation

- All **22 deformable asset cases passed**: 21 passed initially; the
optional volume-meshing case passed after installing the
`tetrahedralization` extra and rerunning that case.
- Existing scene-data backend tests: **23 passed**.
- Extended the existing mixed-scene test from 4 to 12 environments:
independently addressed native objects verify indexed position writes
and per-environment materials; published geometry matches the same
environment. Removed the older overlapping volume position-write
assertions.
- Regression fails on the original selection. Independently reverting
material selection, suppressing the position write, or reversing
publication entries also fails the retained integration test.
- Native surface-binding probe: twelve independently authored objects
preserve a deliberately reordered explicit selection for current and
rest positions.
- Review follow-up: renamed shared path expansion to
`expand_env_pattern` and updated all callers; 55 existing view and
mixed-scene regression cases passed.
- Full `uv run isaaclab --format` passed.

During investigation, a separate surface-mesh-at-asset-root cloning
setup realized only the source body on current main. That cloning
problem is outside this change; the native surface selection probe uses
independently authored objects.

## Type of change

- Bug fix

## Release backport

- [ ] <!-- backport-active-release --> Backport to `release/3.1.0` after
this pull request merges into `main`.

## Checklist

- [x] Read the contribution guidelines.
- [x] Ran the full formatting and lint checks.
- [x] Validated the changed behavior and applied the test-audit
criteria.
- [x] Added a changelog fragment for the changed package.
- [x] Contributor name already appears in `CONTRIBUTORS.md`.
@AntoineRichard

Copy link
Copy Markdown
Collaborator

Thanks for the PR @blessedefe4real! @ooctipus PR #9334 got merged, so I'm closing this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] OvPhysX: deformable object rows are ordered lexicographically, so envs ≥ 10 read/write another env's deformable

3 participants