Skip to content

Commit 394ade8

Browse files
[OVPHYSX] Articulation rewrite (data class + asset class + kernels)
Add Articulation and ArticulationData for the OVPhysX backend, mirroring the PhysX/Newton public API. Resolves PR isaac-sim#5459. Articulation ^^^^^^^^^^^^ * index/mask split for every state writer, simulation-parameter writer, setter, and tendon setter; OVPhysX exposes both _index and _mask as first-class paths and intentionally drops the PhysX-specific ``full_data`` kwarg. * Dedicated dynamic + viscous friction setters (write_joint_{dynamic,viscous}_friction_coefficient_to_sim_{index,mask}) that touch only their slot of the combined (N, J, 3) DOF_FRICTION_PROPERTIES buffer. The combined write_joint_friction_coefficient_to_sim_index/_mask still accepts all three components as kwargs (Coulomb static + dynamic + optional viscous) for source-compatible PhysX call sites. * Deprecated non-indexed shorthand shims for friction (x3) and root / joint state (x4), forwarding to the index variants with a DeprecationWarning, matching PhysX's deprecated section. * Wrench-composer return types tightened to non-None (instantaneous_wrench_composer / permanent_wrench_composer); composers are always set in _create_buffers, mirroring PhysX/Newton. * Section organisation matches PhysX exactly: Properties -> Operations -> Operations - Finders -> Operations - State Writers -> Operations - Simulation Parameters Writers -> Operations - Setters -> Operations - Tendons -> Internal helper -> Internal simulation callbacks -> Internal helpers -- Actuators -> Internal helpers -- Debugging -> Deprecated methods. Section delimiters use bare """Section.""" docstring blocks (Newton/PhysX convention). ArticulationData ^^^^^^^^^^^^^^^^ * Pull-on-demand timestamped buffers; CPU-only bindings route through pinned-host staging (PR isaac-sim#5329 pattern). * Property names match PhysX exactly: joint_friction_coeff, joint_dynamic_friction_coeff, joint_viscous_friction_coeff (no *_static / *_dynamic / *_viscous renames). * SI units annotated on every public property docstring ([m or rad, depending on joint type], [m/s or rad/s, ...], [N*m], [kg], etc.) per AGENTS.md. * binding_getter parameter on __init__ typed as Callable[[int], Any] | None. * Section organisation matches PhysX (Defaults -> Joint commands -> Joint properties -> Fixed tendon -> Spatial tendon -> Root state -> Body state -> Joint state -> Derived -> Sliced -> Internal helpers -> Deprecated properties). Kernels ^^^^^^^ * Articulation-specific kernels in isaaclab_ovphysx/assets/articulation/kernels.py (soft-limit clamp, friction-data writer, finite-difference joint-acc helper, body-CoM pose composer); shared kernels promoted to isaaclab_ovphysx/assets/kernels.py. * Per-kernel docstrings document purpose, shape/dtype/SI units, and divergence notes where the OVPhysX implementation differs (e.g. _fd_joint_acc takes inv_dt rather than dt to avoid per-element division). Tests ^^^^^ * Real-backend test_articulation.py mirrors isaaclab_physx 1-to-1 under run_ovphysx.sh; 99 tests pass on each of CPU + CUDA. * test_articulation_helpers.py covers the kitless-only helpers (tendon scoping, mock binding shapes). * Cross-backend test_articulation_iface.py runs the OVPhysX path: 544 tests pass, 16 skipped, 0 failed on each of CPU + CUDA. Brings the iface helper up to the actual ArticulationData constructor signature and broadcasts scalar inputs across joint / fixed-tendon / spatial-tendon mask setters that previously rejected them. OVPhysX-only surface dropped ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Articulation: set_external_force_and_torque_{index,mask} (use instantaneous_wrench_composer.add_forces_and_torques_*), set_spatial_tendon_limit_{index,mask}, and set_spatial_tendon_rest_length_{index,mask} (NotImplementedError stubs PhysX never had). * ArticulationData: body_pose_w / body_lin_vel_w / body_ang_vel_w / body_acc_w / body_link_acc_w (base class provides matching defaults), body_inv_mass / body_inv_inertia, fixed_tendon_limit (PhysX exposes only fixed_tendon_pos_limits), spatial_tendon_limit / spatial_tendon_rest_length (no PhysX equivalent).
1 parent f71c9bd commit 394ade8

10 files changed

Lines changed: 7477 additions & 2213 deletions

File tree

source/isaaclab/test/assets/test_articulation_iface.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,27 @@ def create_ovphysx_articulation(
256256
object.__setattr__(articulation, "_num_spatial_tendons", num_spatial_tendons)
257257

258258
# Create ArticulationData
259-
data = OvPhysxArticulationData(mock_bindings.bindings, device)
260-
data._num_instances = num_instances
261-
data._num_joints = num_joints
262-
data._num_bodies = num_bodies
263-
data._num_fixed_tendons = num_fixed_tendons
264-
data._num_spatial_tendons = num_spatial_tendons
259+
data = OvPhysxArticulationData(
260+
mock_bindings.bindings,
261+
device,
262+
num_instances=num_instances,
263+
num_bodies=num_bodies,
264+
num_joints=num_joints,
265+
num_fixed_tendons=num_fixed_tendons,
266+
num_spatial_tendons=num_spatial_tendons,
267+
body_names=body_names,
268+
joint_names=joint_names,
269+
fixed_tendon_names=fixed_tendon_names,
270+
spatial_tendon_names=spatial_tendon_names,
271+
)
265272
data._is_fixed_base = False
266-
data.body_names = body_names
267-
data.joint_names = joint_names
268-
data.fixed_tendon_names = fixed_tendon_names
269-
data.spatial_tendon_names = spatial_tendon_names
270-
data._create_buffers()
271273
object.__setattr__(articulation, "_data", data)
272274

275+
# Allocate the articulation-side index/mask caches and wrench buffer that
276+
# _initialize_impl would normally populate. Wrench composers created here
277+
# are immediately overwritten by the mocks below.
278+
articulation._create_buffers()
279+
273280
# Wrench composers
274281
mock_inst_wrench = MockWrenchComposer(articulation)
275282
mock_perm_wrench = MockWrenchComposer(articulation)

source/isaaclab_ovphysx/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.2.17"
4+
version = "0.2.18"
55

66
# Description
77
title = "OvPhysX simulation interfaces for IsaacLab core package"

source/isaaclab_ovphysx/docs/CHANGELOG.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,79 @@
11
Changelog
22
---------
33

4+
0.2.18 (2026-05-05)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Added
8+
^^^^^
9+
10+
* Added :class:`~isaaclab_ovphysx.assets.Articulation` and
11+
:class:`~isaaclab_ovphysx.assets.ArticulationData` mirroring the PhysX/Newton
12+
articulation API: index/mask split for every state writer, simulation-parameter
13+
writer, setter, and tendon setter; pull-on-demand timestamped buffers; first-class
14+
CPU-only binding routing through pinned-host staging.
15+
* Added dedicated :meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_dynamic_friction_coefficient_to_sim_index`,
16+
:meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_dynamic_friction_coefficient_to_sim_mask`,
17+
:meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_viscous_friction_coefficient_to_sim_index`,
18+
and :meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_viscous_friction_coefficient_to_sim_mask`
19+
to mirror PhysX's per-component friction surface; each touches only its slot in the
20+
combined ``(N, J, 3)`` ``DOF_FRICTION_PROPERTIES`` buffer.
21+
* Added deprecated non-indexed shorthand shims
22+
:meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_friction_coefficient_to_sim`,
23+
:meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_dynamic_friction_coefficient_to_sim`,
24+
and :meth:`~isaaclab_ovphysx.assets.Articulation.write_joint_viscous_friction_coefficient_to_sim`
25+
for migration parity with PhysX.
26+
27+
Changed
28+
^^^^^^^
29+
30+
* Reorganized :class:`~isaaclab_ovphysx.assets.Articulation` and
31+
:class:`~isaaclab_ovphysx.assets.ArticulationData` to mirror PhysX's section
32+
layout exactly: bare ``"""Section."""`` docstring blocks (replacing
33+
``# --- Section ---`` comment banners), with internal helpers and deprecated
34+
surface placed at the bottom of each class.
35+
* Renamed the three friction-coefficient properties on
36+
:class:`~isaaclab_ovphysx.assets.ArticulationData` to match PhysX:
37+
``joint_friction_static`` → :attr:`~isaaclab_ovphysx.assets.ArticulationData.joint_friction_coeff`,
38+
``joint_friction_dynamic`` → :attr:`~isaaclab_ovphysx.assets.ArticulationData.joint_dynamic_friction_coeff`,
39+
``joint_friction_viscous`` → :attr:`~isaaclab_ovphysx.assets.ArticulationData.joint_viscous_friction_coeff`.
40+
* Tightened :attr:`~isaaclab_ovphysx.assets.Articulation.instantaneous_wrench_composer`
41+
and :attr:`~isaaclab_ovphysx.assets.Articulation.permanent_wrench_composer`
42+
return types from ``WrenchComposer | None`` to ``WrenchComposer``,
43+
matching PhysX/Newton.
44+
* Type-annotated ``binding_getter`` on
45+
:meth:`~isaaclab_ovphysx.assets.ArticulationData.__init__` as
46+
``Callable[[int], Any] | None``.
47+
* Expanded docstrings on the OVPhysX articulation Warp kernels
48+
(:func:`~isaaclab_ovphysx.assets.articulation.kernels.compute_soft_joint_pos_limits_func`,
49+
:func:`~isaaclab_ovphysx.assets.articulation.kernels.update_soft_joint_pos_limits`,
50+
:func:`~isaaclab_ovphysx.assets.articulation.kernels._fd_joint_acc`) to match
51+
PhysX's documentation depth (purpose, ``Args:`` table with shape/dtype/SI units,
52+
divergence notes where the OVPhysX implementation differs).
53+
54+
Removed
55+
^^^^^^^
56+
57+
* Removed OVPhysX-only :meth:`~isaaclab_ovphysx.assets.Articulation.set_external_force_and_torque_index`
58+
and :meth:`~isaaclab_ovphysx.assets.Articulation.set_external_force_and_torque_mask`.
59+
Use :attr:`~isaaclab_ovphysx.assets.Articulation.instantaneous_wrench_composer` /
60+
:attr:`~isaaclab_ovphysx.assets.Articulation.permanent_wrench_composer` and call
61+
``add_forces_and_torques_index`` / ``add_forces_and_torques_mask`` on the composer
62+
directly, matching PhysX/Newton.
63+
* Removed the OVPhysX-only ``set_spatial_tendon_limit_{index,mask}`` and
64+
``set_spatial_tendon_rest_length_{index,mask}`` ``NotImplementedError`` stubs;
65+
the equivalents are not exposed by PhysX.
66+
* Removed redundant or behavior-divergent overrides of base-class shorthand
67+
properties on :class:`~isaaclab_ovphysx.assets.ArticulationData`:
68+
``body_pose_w``, ``body_lin_vel_w``, ``body_ang_vel_w``, ``body_acc_w``,
69+
``body_link_acc_w``. The defaults from
70+
:class:`~isaaclab.assets.BaseArticulationData` apply and match PhysX.
71+
* Removed forward-compat ``body_inv_mass``, ``body_inv_inertia``,
72+
``fixed_tendon_limit``, ``spatial_tendon_limit``, and
73+
``spatial_tendon_rest_length`` properties on
74+
:class:`~isaaclab_ovphysx.assets.ArticulationData` along with their backing
75+
buffers; these had no PhysX equivalent.
76+
477
0.2.17 (2026-05-05)
578
~~~~~~~~~~~~~~~~~~~~
679

0 commit comments

Comments
 (0)