Commit f72c5f4
committed
[OVPHYSX] Articulation rewrite (data class + asset class + kernels)
Add Articulation and ArticulationData for the OVPhysX backend, mirroring
the PhysX/Newton public API. Resolves PR #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 #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 f72c5f4
10 files changed
Lines changed: 7342 additions & 2215 deletions
File tree
- source
- isaaclab_ovphysx
- config
- docs
- isaaclab_ovphysx
- assets
- articulation
- test/assets
- isaaclab/test/assets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
265 | 272 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | 273 | | |
272 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
4 | 77 | | |
5 | 78 | | |
6 | 79 | | |
| |||
0 commit comments