Skip to content

Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings (view series, part 1) - #6224

Merged
AntoineRichard merged 10 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/feat/ovphysx_view
Jun 25, 2026
Merged

AntoineRichard merged 10 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/feat/ovphysx_view

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Jun 22, 2026 •

Copy link
Copy Markdown
Collaborator

📦 Part 1 of a 5-part series adding an OvPhysX binding view and migrating the assets onto it:

  1. This PR — add OvPhysxView (the API) + tests.
  2. Migrate the OvPhysX Articulation to root_view.
  3. Migrate the RigidObject.
  4. Migrate the RigidObjectCollection (uses the fused prim_paths+key_aliases path).
  5. Migrate the sensors (pose tracking; contact forces use a separate ContactBinding API and may not fully adopt the view).

Parts 2–5 each depend only on this PR and can be reviewed independently.


Description

Adds OvPhysxView, a string-keyed binding-management layer over the OVPhysX tensor bindings, in isaaclab_ovphysx.

Why. OVPhysX is the odd backend out: it exposes physics attributes as a loose dict[TensorType, TensorBinding] with no view object, whereas Newton has selection.ArticulationView and PhysX has typed tensor views. Today callers must hold the right TensorType enum member, manage a destination buffer, and create bindings against a USD glob — and the create_tensor_binding calls are scattered across the asset classes behind a private _get_binding. OvPhysxView gives OVPhysX a single, discoverable surface as pleasant as Newton's selection API, and one owner of binding creation/caching that the asset/data classes can delegate to. It is the narrow, independently-useful slice carved out of the (shelved) cross-backend get_property/set_property effort; the full rationale and decision log live in docs/superpowers/specs/2026-06-17-ovphysx-view-design.md.

What it provides

  • String-keyed access by lowercased TensorType name (auto-derived from the wheel enum — no hand-maintained table); a TensorType member is also accepted.
  • get_attribute(name, out=) — fresh-allocates a typed array (wp.transformf for poses, wp.spatial_vectorf for velocities, flat float32 otherwise; via a maintained _ATTR_DTYPE map), no aliasing; read_into(name, dst) — zero-copy fill of a caller-owned, possibly structured-dtype buffer (wp.transformf, …) via a float32 reinterpret view that is cached per destination buffer so the wheel's object-identity read cache stays warm even when callers hand a structured buffer each step; set_attribute(name, values, indices=/mask=) (structured sources reinterpreted); and a raw binding_for(name) accessor for adoption.
  • The fused multi-prim form (prim_paths=[...] + key_aliases) so RigidObjectCollection can use it.
  • Discoverability (attribute_names, available_attributes, has_attribute), metadata passthrough, and a nested error hierarchy (UnknownAttribute / ReadOnlyAttribute / AttributeUnavailable / ShapeMismatch / DeviceMismatch).

Device policy: no implicit CPU↔GPU conversion — CPU-resident property types are read/written on CPU, and a buffer on the wrong device raises DeviceMismatch rather than being staged.

Scope / status: this PR adds the view plus 48 mock-based unit tests (no live sim). The asset adoption that replaces _get_binding/_binding_read/_binding_write lives in the follow-up PRs (Articulation #6225, RigidObject #6226), which dogfood the view against a live sim on CPU and GPU and have fed fixes back here (e.g. try_binding_for, the read-view cache, typed get_attribute).

Fixes # — N/A (internal design tracking; surviving slice of the shelved cross-backend view effort).

Type of change

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

Screenshots

N/A — no user-facing visual change.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my feature works (test/sim/test_ovphysx_view.py, 48 tests)
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jun 22, 2026
@AntoineRichard AntoineRichard changed the title Add OvPhysxView: a string-keyed view over OVPhysX tensor bindings Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings Jun 22, 2026
@AntoineRichard AntoineRichard changed the title Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings (view series part 1) Jun 22, 2026
@AntoineRichard AntoineRichard changed the title Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings (view series part 1) Add OvPhysxView: a string-keyed binding manager for OVPhysX tensor bindings (view series, part 1) Jun 22, 2026
OVPhysX exposes physics attributes as a loose dict of TensorType ->
TensorBinding with no view object, unlike Newton's
selection.ArticulationView and PhysX's typed tensor views. OvPhysxView
wraps the bindings for one prim pattern behind a string-keyed
get_attribute / set_attribute surface, addressing attributes by the
lowercased TensorType enum name (e.g. "articulation_dof_stiffness").
It needs no Model/State/Control source object because the TensorType
already implies where the data lives.

Prototype per docs/superpowers/specs/2026-06-17-ovphysx-view-design.md.
Adds unit tests covering name<->enum resolution, the read-only guard,
discoverability, and get/set dispatch against a fake binding (no native
simulation required).
Reworks the view from a convenience wrapper into a layer that can back the
OVPhysX asset/data classes, per the PR review of isaac-sim#6224:

- read_into(name, dst): zero-copy fill of a caller-owned, possibly
  structured-dtype buffer (e.g. wp.transformf) via a float32 reinterpret
  view -- the mechanism the data containers use today.
- set_attribute: accepts structured-dtype sources via the same reinterpret;
  non-float32-width buffers are rejected rather than silently bit-cast.
- prim_paths + key_aliases: support the fused multi-prim binding form
  (create_tensor_binding(prim_paths=[...])) and storing a binding under a
  different TensorType key, as RigidObjectCollection needs.
- binding_for(): raw TensorBinding accessor for adoption.
- _CPU_ONLY_NAMES is now derived from tensor_types._CPU_ONLY_TYPES (no drift).
- Added joint/tendon/is_fixed_base metadata passthrough; eager construction
  raises if it creates zero bindings; get_attribute allocates a fresh buffer
  (no aliasing); nested error hierarchy; PhysX/binding Protocols.

Device policy: no implicit CPU<->GPU conversion. CPU-resident property types
are read/written on CPU; a buffer on the wrong device raises DeviceMismatch
instead of being staged. Device-less host data (numpy/list) is materialized
on the binding's native device.
The OvPhysxView addition is a significant new public surface for the OVPhysX
backend, so promote the changelog fragment from a minor to a major bump.
Reword the entry to describe the binding-manager surface (read_into, the
no-device-conversion policy) and drop the internal design-note path from the
user-facing changelog.
From the second PR review of isaac-sim#6224:

- Critical: _as_binding_view now requires a float32 scalar dtype before the
  zero-copy reinterpret. A same-byte-width wrong dtype (int32) previously passed
  the count-only guard and was bit-reinterpreted into garbage on the write path;
  sub-4-byte dtypes (float16) produced a misleading "0 elements" error. Both are
  now rejected with a clear message. Regression tests added (verified failing
  without the guard).
- _resolve enforces the str | TensorType union and raises UnknownAttribute on
  anything else, instead of letting a bogus key reach the wheel.
- _binding accesses binding.count directly (a malformed binding surfaces instead
  of being masked as a phantom no-match) and surfaces the underlying
  create_tensor_binding exception in the AttributeUnavailable message.
- Added docstrings to the six metadata properties; dropped the unused
  runtime_checkable decorator.
- Tests: same-byte/sub-4-byte dtype rejection, get_attribute(out=) wrong device,
  both indices+mask forwarded, read/write through a prim_paths+key_aliases view,
  non-str/non-TensorType key, and a read-only-names-are-valid-vocabulary check.
From the API-hardening review of isaac-sim#6224. Validate at the boundary and fail loud
instead of silently corrupting, mis-binding, or no-op'ing:

- Reject non-contiguous buffers in _as_binding_view (a strided/sliced source would
  be reinterpreted as contiguous and read/write the wrong memory).
- Canonicalize the device (wp.get_device) so a "cuda" view accepts a "cuda:0"
  buffer instead of raising a spurious, unsatisfiable DeviceMismatch; falls back
  to the raw string when the device can't be resolved locally.
- Reject TensorType.INVALID via the member path too (string path already did).
- Normalize key_aliases to TensorType members so string keys are honored rather
  than silently dropped, and reject aliases that cross the CPU/GPU residency or
  read-only boundary (the device/read-only guards key on the requested type).
- Reject empty pattern/prim_paths and tensor_types-without-eager at construction.
- Eager construction with an explicit tensor_types list now surfaces a failing
  type instead of swallowing it at debug level (default sweep still skips
  inapplicable types).
- Document binding_for as an unguarded escape hatch, get_attribute's native-device
  return, and the has_attribute name-validity-vs-availability split.

Adds regression tests for each (contiguity and INVALID verified failing without
the guard).
Surfaced by dogfooding the view in the articulation migration: the assets branch
on a "binding or None" pattern for optional/absent bindings (tendon types on a
tendon-less articulation, not-yet-created bindings), which the raising binding_for
can't express. try_binding_for returns None when the attribute is valid but not
available for the view's prims, while still raising UnknownAttribute for an invalid
name (a programming error, not an availability question).
…xView

read_into now reuses the float32 reinterpret of a destination buffer
across calls (keyed by buffer id, with a pointer-staleness guard), so the
wheel's object-identity read cache stays warm even when callers hand a
structured buffer each step -- they no longer need to maintain their own
reinterpret cache. get_attribute returns a typed array for attributes with
a known structured layout (transformf for poses, spatial_vectorf for
velocities, via a hand-maintained _ATTR_DTYPE map) and flat float32
otherwise.

This lets the asset data containers drop their bespoke _get_read_view
caching and read structured buffers straight through the view.
OvPhysxView (and OvPhysxFrameView) live in isaaclab_ovphysx.sim.views,
which had no API-docs page. Add the automodule stub and wire it into the
isaaclab_ovphysx autosummary so the new binding-manager view shows up in
the rendered API reference alongside assets / cloner / physics.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 22, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review June 22, 2026 19:51
kellyguo11 pushed a commit that referenced this pull request Jun 26, 2026
…ries, part 5) (#6232)

> ### 🔗 Stacked on top of #6224 (Part 1 — `OvPhysxView`)
> Branched off #6224 as a sibling of the other migrations. Targets
`develop`; until #6224 merges the diff includes the Part 1 `OvPhysxView`
commits. **Please review #6224 first.**

# Description

Part 5 of the OVPhysX view-migration series — the **contact sensor**.
This is the *partial* one: only the `RIGID_BODY_POSE` pose binding (the
`track_pose` path) is a `TensorBinding` the view can manage, so only it
is migrated. The **`ContactBinding`** (net forces via `read_net_forces`,
force matrix via `read_force_matrix`) is a separate ovphysx wheel API
that `OvPhysxView` does not wrap — it is left exactly as-is.

* `_initialize_impl` builds an `OvPhysxView` for the pose binding (when
`track_pose`) and obtains it via `binding_for(TT.RIGID_BODY_POSE)`; the
count-mismatch check and the `pose_binding` accessor are unchanged.
* The per-step pose read goes through `read_into(TT.RIGID_BODY_POSE,
...)` (cached reinterpret).
* The `ContactBinding` create/read/destroy paths are untouched.
* Internal refactor; no public API change.

## Type of change

- [x] Internal refactor (non-breaking)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] Changelog fragment (`.skip` — internal refactor, no bump)

## Testing

`test_contact_sensor.py` — cpu: **9 passed, 4 skipped**; cuda: **9
passed, 4 skipped** (exercises both the ContactBinding force path and
the migrated pose-tracking path).
kellyguo11 pushed a commit that referenced this pull request Jun 26, 2026
…sxView (view series) (#6233)

> ### 🔗 Stacked on top of #6224 (Part 1 — `OvPhysxView`)
> Branched off #6224 as a sibling of the asset/sensor migrations.
Targets `develop`; until #6224 merges the diff includes the Part 1
`OvPhysxView` commits. **Please review #6224 first.**

# Description

Two more `RIGID_BODY_POSE` binding consumers the asset (#6225-6227) and
sensor (#6228-6232) passes didn't cover, migrated together in one PR:

* **`OvPhysxFrameView`** (`sim/views/ovphysx_frame_view.py`) — the frame
view that cameras / `XformPrim` use. Builds one `OvPhysxView` +
`try_binding_for(RIGID_BODY_POSE)` (preserving its explicit "matched
zero bodies" error, since the view rejects a 0-count binding), and reads
via `read_into`.
* **`OvPhysxSceneDataBackend`** (`physics/ovphysx_manager.py`) — the
scene-data provider. Builds one `OvPhysxView` per distinct rigid-body
pattern, stores it on the per-pattern entry, and reads via `read_into`;
the per-entry merge into the transform buffer is unchanged.

Both are internal refactors — **no public API change** (neither exposes
a `root_view`). The `ContactBinding` is unrelated (separate wheel API;
see #6232). The scene-data backend's bypass-init unit test hand-seeds
the internal entry dict, so it now seeds a matching `view` stub with
`read_into`.

## Type of change

- [x] Internal refactor (non-breaking)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] Changelog fragment (`.skip` — internal refactor, no bump)

## Testing

* `test_views_xform_prim_ovphysx.py` — cpu: **18 passed**, cuda: **18
passed**.
* `test_ovphysx_scene_data_backend.py` — **11 passed**.
kellyguo11 added a commit that referenced this pull request Jun 29, 2026
…s, part 5) (#6231)

> ### 🔗 Stacked on top of #6224 (Part 1 — `OvPhysxView`)
> Branched off #6224 as a sibling of the asset migrations
(#6225/#6226/#6227). Targets `develop`; until #6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review #6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the
**frame-transformer** sensor's tensor-binding management through
`OvPhysxView`. Internal refactor; **no public API change** (sensors do
not expose a `root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* All pose bindings are GPU-resident state; no CPU staging. One view per
tracked body.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_frame_transformer.py` — cpu: **12 passed**, cuda: **12 passed**.

---------

Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
mardigiorgio pushed a commit to mardigiorgio/IsaacLab that referenced this pull request Jul 2, 2026
…s, part 5) (isaac-sim#6231)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset migrations
(isaac-sim#6225/isaac-sim#6226/isaac-sim#6227). Targets `develop`; until isaac-sim#6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review isaac-sim#6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the
**frame-transformer** sensor's tensor-binding management through
`OvPhysxView`. Internal refactor; **no public API change** (sensors do
not expose a `root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* All pose bindings are GPU-resident state; no CPU staging. One view per
tracked body.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_frame_transformer.py` — cpu: **12 passed**, cuda: **12 passed**.

---------

Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
AntoineRichard added a commit that referenced this pull request Jul 2, 2026
…part 4) (#6227)

> ### 🔗 Stacked on top of #6224 (Part 1 — `OvPhysxView`)
> This PR depends on **#6224** and is branched off it (a *sibling* of
the Articulation #6225
> and RigidObject #6226 migrations, not stacked on them). It targets
`develop`, but because
> #6224 has not merged yet, the diff below includes the Part 1
`OvPhysxView` commits **as well
> as** the Part 4 migration. **Please review #6224 first.** Once #6224
merges this branch will
> be rebased onto `develop` and the diff will shrink to the collection
migration only.

# Description

Part 4 of the OVPhysX view-migration series. It migrates the OVPhysX
**`RigidObjectCollection`**
onto `OvPhysxView` (introduced in **#6224**), following Parts 2 (#6225)
and 3 (#6226).

This is the part that exercises the view's **fused multi-prim path** —
`prim_paths=[...]` plus
`key_aliases` — which the earlier parts did not touch, so it dogfoods
that slice of the API.

### What changed

* `RigidObjectCollection._initialize_impl` builds a single
`OvPhysxView(prim_paths=[g0, …], key_aliases={LINK_POSE:
RIGID_BODY_POSE, …})`. The view
creates each fused binding from its underlying `RIGID_BODY_*` type but
stores it under the
collection's `LINK_*`/`BODY_*` data-class key via `key_aliases` (every
alias stays within its
CPU/GPU residency class, which the view requires). Eager creation is
fail-loud.
* `RigidObjectCollectionData` is built from the view; both
`_get_binding` helpers delegate to
`OvPhysxView.try_binding_for`, and the dead `_binding_getter` callback
is removed.
* **Reads** route through `root_view.read_into(...)` on the native fused
path (cached
reinterpret); the articulation-mode mock read path (iface tests) keeps
its raw `binding.read`
because its buffer device intentionally bypasses the view's strict
device check.
* **Writes** route through `root_view.set_attribute(...)` — the wrench
plus the body-major
reshape write helper, including CPU-only mass/COM/inertia (pre-staged to
pinned CPU).
* `RigidObjectCollection.root_view` now returns the `OvPhysxView`
instead of a raw
  `dict[TensorType, TensorBinding]` (**breaking**).

### Breaking change / migration

`RigidObjectCollection.root_view` returns an `OvPhysxView`, not a dict:

* `root_view[tensor_type]` → `root_view.try_binding_for(tensor_type)`
* full-tensor read → `root_view.get_attribute(tensor_type)`

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have added tests that prove my fix is effective or that my
feature works (collection tests exercise the migrated read/write paths)
- [x] I have updated the changelog
(`source/isaaclab_ovphysx/changelog.d/`)
- [ ] I have updated the documentation accordingly
- [x] I have added my changes to the right `changelog.d` fragment(s)

### Testing

Run kitless; cpu and cuda must be separate invocations (process-global
device lock):

```
72 passed, 4 xfailed   # test_rigid_object_collection.py -k cpu
72 passed, 4 xfailed   # test_rigid_object_collection.py -k cuda
```

---------

Co-authored-by: Kelly Guo <[email protected]>
AntoineRichard added a commit that referenced this pull request Jul 7, 2026
> **Stacked on #6225** (OVPhysX `Articulation` → `OvPhysxView`), which
is stacked on #6224 (`OvPhysxView`). Review/merge those first — the diff
here collapses to a single commit once they land.

## What

The ovphysx wheel now exposes per-collision-shape material as the
`ARTICULATION_SHAPE_FRICTION_AND_RESTITUTION` /
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor types. This closes
the gap that kept `test_set_material_properties` `xfail`ed: the test had
been written against the PhysX-only
`root_view.get_material_properties()` / `set_material_properties()` /
`max_shapes` view API, which `OvPhysxView` does not provide.

- Add `tensor_types` aliases `SHAPE_FRICTION_AND_RESTITUTION` and
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` so the module stays import-safe against older wheels.
- Rewrite `test_set_material_properties` to read/write the material
through `OvPhysxView.get_attribute` / `set_attribute` on the new tensor
type. The per-articulation shape count is derived from the binding shape
`[N, S, 3]` (`[static_friction, dynamic_friction, restitution]`); the
test skips on wheels that lack the type. The now-unused
`_MATERIAL_GAP_REASON` is removed.

## Verification

The material binding is device-resident (it follows the simulation
device). The `set → step → read` round-trip passes on both `cpu` and
`cuda:0` for `num_articulations` 1 and 2.
AntoineRichard added a commit that referenced this pull request Jul 8, 2026
…6241)

> **Stacked on #6227** (OVPhysX `RigidObjectCollection` →
`OvPhysxView`), which is stacked on #6224 (`OvPhysxView`). Review/merge
those first. Sibling of #6239 (articulation) and #6240 (rigid object).

## What

The ovphysx wheel now exposes per-collision-shape rigid-body material as
the `RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor type. This closes
the gap that kept the collection's `test_set_material_properties`
`xfail`ed (it was an empty `NotImplementedError` stub written against
the PhysX-only `root_view.get/set_material_properties()` API).

- Add the `tensor_types` alias
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` (shared with the sibling material PRs; documented
there).
- Implement `test_set_material_properties`, mirroring the PhysX backend
but reading/writing the material through `OvPhysxView.get_attribute` /
`set_attribute`. The collection's fused binding is body-major flat, so
data `[num_envs, num_cubes, 3]` is mapped to/from the view layout with
`reshape_data_to_view_3d` and its inverse.

## Verification

OVPhysX runs the PhysX solver. The material round-trip passes on both
`cpu` and `cuda:0` for `num_envs` 1/3 × `num_cubes` 1/2.

The changelog fragment is a `.skip` because the only user-facing
addition (the alias) is documented by the sibling material PRs; this PR
is test enablement.
AntoineRichard added a commit that referenced this pull request Jul 8, 2026
> **Stacked on #6226** (OVPhysX `RigidObject` → `OvPhysxView`), which is
stacked on #6224 (`OvPhysxView`). Review/merge those first — the diff
here collapses to a single commit once they land. Sibling of #6239 (the
articulation equivalent).

## What

The ovphysx wheel now exposes per-collision-shape rigid-body material as
the `RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor type (shape `[N,
S, 3]` = static friction, dynamic friction, restitution). This closes
the gap that kept **five** rigid-object material tests `xfail`ed — they
were empty `NotImplementedError` stubs written against the PhysX-only
`root_view.get/set_material_properties()` / `max_shapes` view API.

- Add the `tensor_types` alias
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` so the module stays import-safe against older wheels.
- Implement, mirroring the PhysX backend but reading/writing the
material through `OvPhysxView.get_attribute` / `set_attribute`:
- `test_rigid_body_set_material_properties` and
`test_set_material_properties_via_view` — set/get round-trip.
- `test_rigid_body_no_friction`, `test_rigid_body_with_static_friction`,
`test_rigid_body_with_restitution` — physical-behavior tests.
- Ground planes use the solver-common `RigidBodyMaterialBaseCfg`; masses
come from `data.body_mass`. The no-friction test settles the cube and
uses zero restitution so the resting contact is clean before asserting
the sliding velocity is preserved.

## Verification

OVPhysX runs the PhysX solver, so the physical tests use the PhysX
reference tolerances. All five pass on both `cpu` and `cuda:0` for
`num_cubes` 1 and 2. Full `test_rigid_object.py` is green (53 passed on
cpu, no regressions).
AntoineRichard added a commit that referenced this pull request Jul 8, 2026
> **Stacked on #6239 (articulation material) and #6240 (rigid-object
material)** — this branch merges both so the MDP term has
`Articulation.root_view` + `RigidObject.root_view` (the #6225/#6226
migrations) and the material aliases. Review/merge those (and their
bases #6224/#6225/#6226) first; the diff here collapses to a single
commit once they land. (#6241/collection is **not** needed — this MDP
term targets `RigidObject`/`Articulation`, not collections.)

## What

`randomize_rigid_body_material` previously **no-op'd on the OVPhysX
backend** (the wheel lacked a material binding). The wheel now exposes
per-shape material as `*_SHAPE_FRICTION_AND_RESTITUTION`, so this
replaces the no-op with a real implementation.

OVPhysX runs the PhysX solver, so the new
`_RandomizeRigidBodyMaterialOvPhysx`:
- mirrors the **PhysX bucket approach** (PhysX's 64000 unique-material
limit applies): pre-samples `num_buckets` materials and randomly assigns
them to shapes;
- writes per-shape `(static_friction, dynamic_friction, restitution)`
through the asset's `OvPhysxView` (`set_attribute` on
`SHAPE_FRICTION_AND_RESTITUTION` for articulations,
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` for rigid objects),
read-modify-writing the full `[N, S, 3]` buffer so non-selected envs are
preserved.

### Limitation
Randomizes **all shapes** only. Per-body selection
(`asset_cfg.body_ids`) raises `NotImplementedError` — the ovphysx wheel
exposes no per-body shape counts (unlike PhysX's
`link_physx_view.max_shapes` / Newton's `num_shapes_per_body`), so
body→shape ranges can't be indexed.

## Verification

New real-backend test (`test_randomize_rigid_body_material_mdp.py`)
drives the implementation against an OVPhysX `RigidObject`: it asserts
the written friction/restitution land within the sampled ranges, and
that a per-body selection fails loud. Passes on both `cpu` and `cuda:0`.
The PhysX and Newton paths are untouched.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…ndings (view series, part 1) (isaac-sim#6224)

> **📦 Part 1 of a 5-part series** adding an OvPhysX binding view and
migrating the assets onto it:
> 1. **This PR** — add `OvPhysxView` (the API) + tests.
> 2. Migrate the OvPhysX **Articulation** to `root_view`.
> 3. Migrate the **RigidObject**.
> 4. Migrate the **RigidObjectCollection** (uses the fused
`prim_paths`+`key_aliases` path).
> 5. Migrate the **sensors** (pose tracking; contact forces use a
separate `ContactBinding` API and may not fully adopt the view).
>
> Parts 2–5 each depend only on this PR and can be reviewed
independently.

---

# Description

Adds **`OvPhysxView`**, a string-keyed binding-management layer over the
OVPhysX tensor bindings, in `isaaclab_ovphysx`.

**Why.** OVPhysX is the odd backend out: it exposes physics attributes
as a loose `dict[TensorType, TensorBinding]` with **no view object**,
whereas Newton has `selection.ArticulationView` and PhysX has typed
tensor views. Today callers must hold the right `TensorType` enum
member, manage a destination buffer, and create bindings against a USD
glob — and the `create_tensor_binding` calls are scattered across the
asset classes behind a private `_get_binding`. `OvPhysxView` gives
OVPhysX a single, discoverable surface as pleasant as Newton's selection
API, and one owner of binding creation/caching that the asset/data
classes can delegate to. It is the narrow, independently-useful slice
carved out of the (shelved) cross-backend `get_property`/`set_property`
effort; the full rationale and decision log live in
`docs/superpowers/specs/2026-06-17-ovphysx-view-design.md`.

**What it provides**
- String-keyed access by lowercased `TensorType` name (auto-derived from
the wheel enum — no hand-maintained table); a `TensorType` member is
also accepted.
- `get_attribute(name, out=)` — fresh-allocates a **typed** array
(`wp.transformf` for poses, `wp.spatial_vectorf` for velocities, flat
`float32` otherwise; via a maintained `_ATTR_DTYPE` map), no aliasing;
**`read_into(name, dst)`** — zero-copy fill of a caller-owned, possibly
structured-dtype buffer (`wp.transformf`, …) via a `float32` reinterpret
view that is **cached per destination buffer** so the wheel's
object-identity read cache stays warm even when callers hand a
structured buffer each step; `set_attribute(name, values,
indices=/mask=)` (structured sources reinterpreted); and a raw
`binding_for(name)` accessor for adoption.
- The fused multi-prim form (`prim_paths=[...]` + `key_aliases`) so
`RigidObjectCollection` can use it.
- Discoverability (`attribute_names`, `available_attributes`,
`has_attribute`), metadata passthrough, and a nested error hierarchy
(`UnknownAttribute` / `ReadOnlyAttribute` / `AttributeUnavailable` /
`ShapeMismatch` / `DeviceMismatch`).

**Device policy:** no implicit CPU↔GPU conversion — CPU-resident
property types are read/written on CPU, and a buffer on the wrong device
raises `DeviceMismatch` rather than being staged.

**Scope / status:** this PR adds the view plus 48 mock-based unit tests
(no live sim). The asset adoption that replaces
`_get_binding`/`_binding_read`/`_binding_write` lives in the follow-up
PRs (Articulation isaac-sim#6225, RigidObject isaac-sim#6226), which dogfood the view
against a live sim on CPU and GPU and have fed fixes back here (e.g.
`try_binding_for`, the read-view cache, typed `get_attribute`).

Fixes # — N/A (internal design tracking; surviving slice of the shelved
cross-backend view effort).

## Type of change

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

## Screenshots

N/A — no user-facing visual change.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation <!-- design
note updated separately
(docs/superpowers/specs/2026-06-17-ovphysx-view-design.md); no rendered
API-doc change in this PR yet -->
- [x] My changes generate no new warnings
- [x] I have added tests that prove my feature works
(`test/sim/test_ovphysx_view.py`, 48 tests)
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…saac-sim#6225)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> This PR depends on **isaac-sim#6224** and is stacked on top of it. It targets
> `develop`, but because isaac-sim#6224 has not merged yet, the diff below
includes the
> Part 1 `OvPhysxView` commits **as well as** the Part 2 migration.
**Please
> review isaac-sim#6224 first.** Once isaac-sim#6224 merges, this branch will be rebased
onto
> `develop` and the diff will shrink to the articulation migration only.

# Description

Part 2 of the OVPhysX view-migration series. It migrates the OVPhysX
**`Articulation`** onto the new `OvPhysxView` binding manager introduced
in
**isaac-sim#6224 (Part 1)**.

The goal of the series is to *dogfood* `OvPhysxView` on the real asset
classes
to surface weaknesses before the rigid-object/collection/sensor
migrations, and
to consolidate the scattered `create_tensor_binding` / `binding.read` /
`binding.write` calls behind one managed surface.

### What changed

* `Articulation._initialize_impl` now builds a single
`OvPhysxView(physx, pattern, device)` and populates it via
`try_binding_for`
(best-effort: tensor types that do not apply to these prims are skipped,
the
asset still raises if *no* binding could be created). All binding
creation,
  caching, and the CPU/GPU device policy now live in the view.
* `ArticulationData` is constructed from the view; its counts come from
the
view metadata, and both `_get_binding` helpers (asset + data container)
  delegate to `OvPhysxView.try_binding_for`.
* **Every write now goes through `root_view.set_attribute(...)`**
instead of
calling `binding.write` on a binding obtained from the view — the ~70
property
/ state / target / wrench / tendon writes, including the per-step
actuation
path. This brings the view's read-only, device, dtype, and contiguity
guards
  to the asset write path, which previously bypassed them.
* **Every read now goes through `root_view.read_into(...)`.**
`ArticulationData`
drops its bespoke `_get_read_view` reinterpret cache; the view now
caches the
`float32` reinterpret per destination buffer (keeping the wheel's read
cache
  warm) and derives the structured layout from the binding shape, so the
  transform / spatial-vector / scalar read helpers collapse to one
  implementation. CPU-only reads keep their pinned-host staging.
* `Articulation.root_view` now returns the `OvPhysxView` instead of a
raw
`dict[TensorType, TensorBinding]` (**breaking** — see migration note
below).
* The articulation tests route through the new API
  (`root_view.get_attribute(...)`, `root_view.try_binding_for(...)`).

### Breaking change / migration

`Articulation.root_view` returns an `OvPhysxView`, not a dict:

* `root_view[tensor_type]` → `root_view.try_binding_for(tensor_type)`
* `tensor_type in root_view` (availability) →
`root_view.try_binding_for(tensor_type) is not None`
* full-tensor read → `root_view.get_attribute(tensor_type)`

### Findings surfaced (the point of the exercise)

* **CPU-only property writes work through `set_attribute`.**
mass/COM/inertia/DOF
limits/stiffness/… are CPU-resident even on a GPU sim, and
`set_attribute`
refuses to stage CPU↔GPU. This is fine because the asset *already*
pre-stages
those to pinned CPU buffers, so the source is on the binding's native
(CPU)
device and the no-stage policy is satisfied with no change. (An initial
assumption that the device policy would block these turned out to be
wrong —
  verified by the green `cuda:0` run.)
* `read_into` allocates a fresh `float32` reinterpret view per call,
which would
defeat the wheel binding's internal read cache that the data container
caches
by `(tensor_type, ptr)`; hot-path reads were kept on the cached-view
path.
* Per-step writes re-resolve the binding through `set_attribute` (a dict
lookup
+ cheap guards) rather than the previously cached binding handle; the
cost is
negligible because the pre-built `float32` write-view passes through the
reinterpret unchanged. A "bound writer" handle on the view would remove
even
  that lookup — a possible Part 1 follow-up.
* The view rejects 0-count bindings (stricter than the old loop, which
could
  store a phantom binding) — a correctness improvement.

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have added tests that prove my fix is effective or that my
feature works (articulation tests route through the new API)
- [x] I have updated the changelog
(`source/isaaclab_ovphysx/changelog.d/`)
- [ ] I have updated the documentation accordingly
- [x] I have added my changes to the right `changelog.d` fragment(s)

### Testing

Run kitless; cpu and cuda must be separate invocations (process-global
device lock):

```
101 passed, 4 xfailed   # -k cpu
101 passed, 4 xfailed   # -k cuda
```
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…saac-sim#6226)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> This PR depends on **isaac-sim#6224** and is branched off it (a *sibling* of
the Articulation
> migration isaac-sim#6225, not stacked on it). It targets `develop`, but because
isaac-sim#6224 has not
> merged yet, the diff below includes the Part 1 `OvPhysxView` commits
**as well as** the
> Part 3 migration. **Please review isaac-sim#6224 first.** Once isaac-sim#6224 merges,
this branch will be
> rebased onto `develop` and the diff will shrink to the rigid-object
migration only.

# Description

Part 3 of the OVPhysX view-migration series. It migrates the OVPhysX
**`RigidObject`**
onto the `OvPhysxView` binding manager introduced in **isaac-sim#6224 (Part 1)**,
mirroring the
Articulation migration in **isaac-sim#6225 (Part 2)**.

The series dogfoods `OvPhysxView` on the real asset classes to surface
weaknesses and to
consolidate the scattered `create_tensor_binding` / `binding.read` /
`binding.write` calls
behind one managed surface.

### What changed

* `RigidObject._initialize_impl` builds a single `OvPhysxView(physx,
pattern, device)` and
eagerly creates the rigid-body bindings through it. RigidObject keeps
its **fail-loud**
contract (a missing core type raises a helpful `RuntimeError`) by
creating each via
`binding_for` rather than the best-effort `try_binding_for` the
articulation uses.
* `RigidObjectData` is constructed from the view; counts come from the
view's bindings,
and both `_get_binding` helpers delegate to
`OvPhysxView.try_binding_for`.
* **Every write goes through `root_view.set_attribute(...)`** —
pose/velocity/wrench plus
the CPU-only mass/COM/inertia properties (which the asset pre-stages to
pinned CPU
buffers, so the source is already on the binding's native device and the
view's
no-implicit-staging policy is satisfied). Writes now get the view's
read-only/device/
  dtype/contiguity guards.
* **Every read goes through `root_view.read_into(...)`.**
`RigidObjectData._read_binding_into`
routes through the view, which caches the `float32` reinterpret per
destination buffer
and derives the structured layout from the binding shape — this path
previously rebuilt
the reinterpret on every read, so it is a strict read-cache improvement.
CPU-only reads
  keep their pinned-host staging.
* `RigidObject.root_view` now returns the `OvPhysxView` instead of a raw
  `dict[TensorType, TensorBinding]` (**breaking** — see migration note).

### Breaking change / migration

`RigidObject.root_view` returns an `OvPhysxView`, not a dict:

* `root_view[tensor_type]` → `root_view.try_binding_for(tensor_type)`
* full-tensor read → `root_view.get_attribute(tensor_type)`

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have added tests that prove my fix is effective or that my
feature works (rigid-object tests exercise the migrated read/write
paths)
- [x] I have updated the changelog
(`source/isaaclab_ovphysx/changelog.d/`)
- [ ] I have updated the documentation accordingly
- [x] I have added my changes to the right `changelog.d` fragment(s)

### Testing

Run kitless; cpu and cuda must be separate invocations (process-global
device lock):

```
42 passed, 10 xfailed              # test_rigid_object.py -k cpu
41 passed, 2 skipped, 8 xfailed    # test_rigid_object.py -k cuda
1 passed                           # test_rigid_object_helpers.py
```
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…aac-sim#6228)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset migrations
(isaac-sim#6225/isaac-sim#6226/isaac-sim#6227). Targets `develop`; until isaac-sim#6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review isaac-sim#6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the **IMU** sensor's
tensor-binding management through `OvPhysxView`. Internal refactor; **no
public API change** (sensors do not expose a `root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* The CPU-only `RIGID_BODY_COM_POSE` keeps its pinned-host staging +
`wp.copy` to the sim device.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_imu.py` — cpu: **12 passed**, cuda: **12 passed**.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…aac-sim#6229)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset migrations
(isaac-sim#6225/isaac-sim#6226/isaac-sim#6227). Targets `develop`; until isaac-sim#6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review isaac-sim#6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the **PVA** sensor's
tensor-binding management through `OvPhysxView`. Internal refactor; **no
public API change** (sensors do not expose a `root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* The CPU-only `RIGID_BODY_COM_POSE` keeps its pinned-host staging +
`wp.copy` to the sim device.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_pva.py` — cpu: **13 passed**, cuda: **13 passed**.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…rt 5) (isaac-sim#6230)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset migrations
(isaac-sim#6225/isaac-sim#6226/isaac-sim#6227). Targets `develop`; until isaac-sim#6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review isaac-sim#6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the **joint-wrench**
sensor's tensor-binding management through `OvPhysxView`. Internal
refactor; **no public API change** (sensors do not expose a
`root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* All bindings are GPU-resident state
(`ARTICULATION_LINK_INCOMING_JOINT_FORCE`); no CPU staging needed.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_joint_wrench_sensor.py` — cpu: **11 passed**, cuda: **11 passed**.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…ries, part 5) (isaac-sim#6232)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the other migrations. Targets
`develop`; until isaac-sim#6224 merges the diff includes the Part 1 `OvPhysxView`
commits. **Please review isaac-sim#6224 first.**

# Description

Part 5 of the OVPhysX view-migration series — the **contact sensor**.
This is the *partial* one: only the `RIGID_BODY_POSE` pose binding (the
`track_pose` path) is a `TensorBinding` the view can manage, so only it
is migrated. The **`ContactBinding`** (net forces via `read_net_forces`,
force matrix via `read_force_matrix`) is a separate ovphysx wheel API
that `OvPhysxView` does not wrap — it is left exactly as-is.

* `_initialize_impl` builds an `OvPhysxView` for the pose binding (when
`track_pose`) and obtains it via `binding_for(TT.RIGID_BODY_POSE)`; the
count-mismatch check and the `pose_binding` accessor are unchanged.
* The per-step pose read goes through `read_into(TT.RIGID_BODY_POSE,
...)` (cached reinterpret).
* The `ContactBinding` create/read/destroy paths are untouched.
* Internal refactor; no public API change.

## Type of change

- [x] Internal refactor (non-breaking)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] Changelog fragment (`.skip` — internal refactor, no bump)

## Testing

`test_contact_sensor.py` — cpu: **9 passed, 4 skipped**; cuda: **9
passed, 4 skipped** (exercises both the ContactBinding force path and
the migrated pose-tracking path).
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…sxView (view series) (isaac-sim#6233)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset/sensor migrations.
Targets `develop`; until isaac-sim#6224 merges the diff includes the Part 1
`OvPhysxView` commits. **Please review isaac-sim#6224 first.**

# Description

Two more `RIGID_BODY_POSE` binding consumers the asset (isaac-sim#6225-6227) and
sensor (isaac-sim#6228-6232) passes didn't cover, migrated together in one PR:

* **`OvPhysxFrameView`** (`sim/views/ovphysx_frame_view.py`) — the frame
view that cameras / `XformPrim` use. Builds one `OvPhysxView` +
`try_binding_for(RIGID_BODY_POSE)` (preserving its explicit "matched
zero bodies" error, since the view rejects a 0-count binding), and reads
via `read_into`.
* **`OvPhysxSceneDataBackend`** (`physics/ovphysx_manager.py`) — the
scene-data provider. Builds one `OvPhysxView` per distinct rigid-body
pattern, stores it on the per-pattern entry, and reads via `read_into`;
the per-entry merge into the transform buffer is unchanged.

Both are internal refactors — **no public API change** (neither exposes
a `root_view`). The `ContactBinding` is unrelated (separate wheel API;
see isaac-sim#6232). The scene-data backend's bypass-init unit test hand-seeds
the internal entry dict, so it now seeds a matching `view` stub with
`read_into`.

## Type of change

- [x] Internal refactor (non-breaking)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] Changelog fragment (`.skip` — internal refactor, no bump)

## Testing

* `test_views_xform_prim_ovphysx.py` — cpu: **18 passed**, cuda: **18
passed**.
* `test_ovphysx_scene_data_backend.py` — **11 passed**.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…s, part 5) (isaac-sim#6231)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> Branched off isaac-sim#6224 as a sibling of the asset migrations
(isaac-sim#6225/isaac-sim#6226/isaac-sim#6227). Targets `develop`; until isaac-sim#6224 merges, the diff
below includes the Part 1 `OvPhysxView` commits. **Please review isaac-sim#6224
first.**

# Description

Part 5 of the OVPhysX view-migration series — route the
**frame-transformer** sensor's tensor-binding management through
`OvPhysxView`. Internal refactor; **no public API change** (sensors do
not expose a `root_view`).

* `_initialize_impl` builds one `OvPhysxView` instead of separate
`create_tensor_binding` calls; binding handles come from `binding_for`.
* Pose/state reads route through `read_into` (cached `float32`
reinterpret, typed off the binding shape), replacing the manual
`wp.array(ptr=...)` reinterpret views.
* All pose bindings are GPU-resident state; no CPU staging. One view per
tracked body.
* Numeric behavior unchanged.

## Type of change

- [x] This change requires no public API change (internal refactor)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment (`.skip` — internal refactor, no
user-facing change / no bump)

## Testing

`test_frame_transformer.py` — cpu: **12 passed**, cuda: **12 passed**.

---------

Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…part 4) (isaac-sim#6227)

> ### 🔗 Stacked on top of isaac-sim#6224 (Part 1 — `OvPhysxView`)
> This PR depends on **isaac-sim#6224** and is branched off it (a *sibling* of
the Articulation isaac-sim#6225
> and RigidObject isaac-sim#6226 migrations, not stacked on them). It targets
`develop`, but because
> isaac-sim#6224 has not merged yet, the diff below includes the Part 1
`OvPhysxView` commits **as well
> as** the Part 4 migration. **Please review isaac-sim#6224 first.** Once isaac-sim#6224
merges this branch will
> be rebased onto `develop` and the diff will shrink to the collection
migration only.

# Description

Part 4 of the OVPhysX view-migration series. It migrates the OVPhysX
**`RigidObjectCollection`**
onto `OvPhysxView` (introduced in **isaac-sim#6224**), following Parts 2 (isaac-sim#6225)
and 3 (isaac-sim#6226).

This is the part that exercises the view's **fused multi-prim path** —
`prim_paths=[...]` plus
`key_aliases` — which the earlier parts did not touch, so it dogfoods
that slice of the API.

### What changed

* `RigidObjectCollection._initialize_impl` builds a single
`OvPhysxView(prim_paths=[g0, …], key_aliases={LINK_POSE:
RIGID_BODY_POSE, …})`. The view
creates each fused binding from its underlying `RIGID_BODY_*` type but
stores it under the
collection's `LINK_*`/`BODY_*` data-class key via `key_aliases` (every
alias stays within its
CPU/GPU residency class, which the view requires). Eager creation is
fail-loud.
* `RigidObjectCollectionData` is built from the view; both
`_get_binding` helpers delegate to
`OvPhysxView.try_binding_for`, and the dead `_binding_getter` callback
is removed.
* **Reads** route through `root_view.read_into(...)` on the native fused
path (cached
reinterpret); the articulation-mode mock read path (iface tests) keeps
its raw `binding.read`
because its buffer device intentionally bypasses the view's strict
device check.
* **Writes** route through `root_view.set_attribute(...)` — the wrench
plus the body-major
reshape write helper, including CPU-only mass/COM/inertia (pre-staged to
pinned CPU).
* `RigidObjectCollection.root_view` now returns the `OvPhysxView`
instead of a raw
  `dict[TensorType, TensorBinding]` (**breaking**).

### Breaking change / migration

`RigidObjectCollection.root_view` returns an `OvPhysxView`, not a dict:

* `root_view[tensor_type]` → `root_view.try_binding_for(tensor_type)`
* full-tensor read → `root_view.get_attribute(tensor_type)`

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have added tests that prove my fix is effective or that my
feature works (collection tests exercise the migrated read/write paths)
- [x] I have updated the changelog
(`source/isaaclab_ovphysx/changelog.d/`)
- [ ] I have updated the documentation accordingly
- [x] I have added my changes to the right `changelog.d` fragment(s)

### Testing

Run kitless; cpu and cuda must be separate invocations (process-global
device lock):

```
72 passed, 4 xfailed   # test_rigid_object_collection.py -k cpu
72 passed, 4 xfailed   # test_rigid_object_collection.py -k cuda
```

---------

Co-authored-by: Kelly Guo <[email protected]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
> **Stacked on isaac-sim#6225** (OVPhysX `Articulation` → `OvPhysxView`), which
is stacked on isaac-sim#6224 (`OvPhysxView`). Review/merge those first — the diff
here collapses to a single commit once they land.

## What

The ovphysx wheel now exposes per-collision-shape material as the
`ARTICULATION_SHAPE_FRICTION_AND_RESTITUTION` /
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor types. This closes
the gap that kept `test_set_material_properties` `xfail`ed: the test had
been written against the PhysX-only
`root_view.get_material_properties()` / `set_material_properties()` /
`max_shapes` view API, which `OvPhysxView` does not provide.

- Add `tensor_types` aliases `SHAPE_FRICTION_AND_RESTITUTION` and
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` so the module stays import-safe against older wheels.
- Rewrite `test_set_material_properties` to read/write the material
through `OvPhysxView.get_attribute` / `set_attribute` on the new tensor
type. The per-articulation shape count is derived from the binding shape
`[N, S, 3]` (`[static_friction, dynamic_friction, restitution]`); the
test skips on wheels that lack the type. The now-unused
`_MATERIAL_GAP_REASON` is removed.

## Verification

The material binding is device-resident (it follows the simulation
device). The `set → step → read` round-trip passes on both `cpu` and
`cuda:0` for `num_articulations` 1 and 2.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…saac-sim#6241)

> **Stacked on isaac-sim#6227** (OVPhysX `RigidObjectCollection` →
`OvPhysxView`), which is stacked on isaac-sim#6224 (`OvPhysxView`). Review/merge
those first. Sibling of isaac-sim#6239 (articulation) and isaac-sim#6240 (rigid object).

## What

The ovphysx wheel now exposes per-collision-shape rigid-body material as
the `RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor type. This closes
the gap that kept the collection's `test_set_material_properties`
`xfail`ed (it was an empty `NotImplementedError` stub written against
the PhysX-only `root_view.get/set_material_properties()` API).

- Add the `tensor_types` alias
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` (shared with the sibling material PRs; documented
there).
- Implement `test_set_material_properties`, mirroring the PhysX backend
but reading/writing the material through `OvPhysxView.get_attribute` /
`set_attribute`. The collection's fused binding is body-major flat, so
data `[num_envs, num_cubes, 3]` is mapped to/from the view layout with
`reshape_data_to_view_3d` and its inverse.

## Verification

OVPhysX runs the PhysX solver. The material round-trip passes on both
`cpu` and `cuda:0` for `num_envs` 1/3 × `num_cubes` 1/2.

The changelog fragment is a `.skip` because the only user-facing
addition (the alias) is documented by the sibling material PRs; this PR
is test enablement.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…ac-sim#6240)

> **Stacked on isaac-sim#6226** (OVPhysX `RigidObject` → `OvPhysxView`), which is
stacked on isaac-sim#6224 (`OvPhysxView`). Review/merge those first — the diff
here collapses to a single commit once they land. Sibling of isaac-sim#6239 (the
articulation equivalent).

## What

The ovphysx wheel now exposes per-collision-shape rigid-body material as
the `RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` tensor type (shape `[N,
S, 3]` = static friction, dynamic friction, restitution). This closes
the gap that kept **five** rigid-object material tests `xfail`ed — they
were empty `NotImplementedError` stubs written against the PhysX-only
`root_view.get/set_material_properties()` / `max_shapes` view API.

- Add the `tensor_types` alias
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION`, guarded with `try/except
AttributeError` so the module stays import-safe against older wheels.
- Implement, mirroring the PhysX backend but reading/writing the
material through `OvPhysxView.get_attribute` / `set_attribute`:
- `test_rigid_body_set_material_properties` and
`test_set_material_properties_via_view` — set/get round-trip.
- `test_rigid_body_no_friction`, `test_rigid_body_with_static_friction`,
`test_rigid_body_with_restitution` — physical-behavior tests.
- Ground planes use the solver-common `RigidBodyMaterialBaseCfg`; masses
come from `data.body_mass`. The no-friction test settles the cube and
uses zero restitution so the resting contact is clean before asserting
the sliding velocity is preserved.

## Verification

OVPhysX runs the PhysX solver, so the physical tests use the PhysX
reference tolerances. All five pass on both `cpu` and `cuda:0` for
`num_cubes` 1 and 2. Full `test_rigid_object.py` is green (53 passed on
cpu, no regressions).
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…#6243)

> **Stacked on isaac-sim#6239 (articulation material) and isaac-sim#6240 (rigid-object
material)** — this branch merges both so the MDP term has
`Articulation.root_view` + `RigidObject.root_view` (the isaac-sim#6225/isaac-sim#6226
migrations) and the material aliases. Review/merge those (and their
bases isaac-sim#6224/isaac-sim#6225/isaac-sim#6226) first; the diff here collapses to a single
commit once they land. (isaac-sim#6241/collection is **not** needed — this MDP
term targets `RigidObject`/`Articulation`, not collections.)

## What

`randomize_rigid_body_material` previously **no-op'd on the OVPhysX
backend** (the wheel lacked a material binding). The wheel now exposes
per-shape material as `*_SHAPE_FRICTION_AND_RESTITUTION`, so this
replaces the no-op with a real implementation.

OVPhysX runs the PhysX solver, so the new
`_RandomizeRigidBodyMaterialOvPhysx`:
- mirrors the **PhysX bucket approach** (PhysX's 64000 unique-material
limit applies): pre-samples `num_buckets` materials and randomly assigns
them to shapes;
- writes per-shape `(static_friction, dynamic_friction, restitution)`
through the asset's `OvPhysxView` (`set_attribute` on
`SHAPE_FRICTION_AND_RESTITUTION` for articulations,
`RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION` for rigid objects),
read-modify-writing the full `[N, S, 3]` buffer so non-selected envs are
preserved.

### Limitation
Randomizes **all shapes** only. Per-body selection
(`asset_cfg.body_ids`) raises `NotImplementedError` — the ovphysx wheel
exposes no per-body shape counts (unlike PhysX's
`link_physx_view.max_shapes` / Newton's `num_shapes_per_body`), so
body→shape ranges can't be indexed.

## Verification

New real-backend test (`test_randomize_rigid_body_material_mdp.py`)
drives the implementation against an OVPhysX `RigidObject`: it asserts
the written friction/restitution land within the sampled ranges, and
that a per-body selection fails loud. Passes on both `cpu` and `cuda:0`.
The PhysX and Newton paths are untouched.
pv-nvidia added a commit to pv-nvidia/pv-isaac-lab that referenced this pull request Aug 27, 2026
The isaac-sim#5677 cherry-pick brought in OvPhysxFrameView code calling OvPhysxView
(try_binding_for / read_into). That class arrives with isaac-sim#6224, which is not on
this release branch, so the module import raised ModuleNotFoundError as soon as
an OVPhysX frame view was initialized.

Restore the direct physx.create_tensor_binding / binding.read calls this branch
provides.
kellyguo11 added a commit that referenced this pull request Aug 29, 2026
…coped Fabric selections (#6805) (#7342)

# Description

Backports two already-merged FrameView PRs to `release/3.0.0-beta2`,
cherry-picked in merge order:

- #5677 — GPU-accelerated FrameView local poses + `xform_space_writer`
API (upstream `69888c34e471`)
- #6805 — scale `FabricFrameView` selections to the view, not the stage
(upstream `480370cdc5b0`, nvbug 6535498)

Two support commits, because this branch predates some prerequisites:

- `Shim needed for Arena compatibility.` (@amillane) adds
`split_clone_template`, backported from #6071. Ordered first so no
commit imports it before it exists.
- `fix: use the OVPhysX tensor binding API…` restores this branch's
`physx.create_tensor_binding()` / `binding.read()`. The #5677 pick
referenced `OvPhysxView`, which arrives with #6224 and is absent here,
so `OvPhysxFrameView` init raised `ModuleNotFoundError`.

Conflict resolutions converge each touched file on its post-#6805 state
from `develop`, so the backported code is byte-identical to what has
been running and tested there. Two consequences of that choice:

- `get_scales()` now returns `ProxyArray` in all backends, as on
`develop`. On this branch it previously returned `wp.array`, so callers
that pass the result straight to Warp APIs need `.warp` (Torch users:
`.torch`). This is the one API change the backport carries.
- The Fabric-hierarchy import stays unconditional (the optional import
is #6499, not backported).

The only deviation from `develop`'s state is test-infra: device
parametrization uses literal `["cpu", "cuda:0"]` because
`test_devices()` does not exist on this branch.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality) —
`FrameView.close()`, writer-scope API
- Breaking change (relative to this release branch only): `get_scales()`
returns `ProxyArray` instead of `wp.array`, matching `develop`

## Tests

- `test_views_xform_prim_ovphysx.py` — 49 passed (26 `cpu` + 24
`cuda:0`; needs one process per device, `ovphysx<=0.3.7` binds device
mode in C++ on first `PhysX(...)`)
- `test_views_xform_prim_newton.py` — 58 passed

---------

Co-authored-by: alex <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: yts-nv <[email protected]>
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 isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants