Skip to content

Commit 0616c4b

Browse files
Expose the CPU-resident tensor types as public aliases
The eight types added to the CPU-only classification were referenced through the raw ``_TT`` enum, leaving the candidate tuple as a mix of module aliases and raw enum members and giving a future reader no reason why these eight were different. This module is the alias layer over the ovphysx enum, so a type worth classifying is worth naming. Each alias carries the shape, dtype and units taken from the wheel's own type table, which the raw references did not. Naming follows the established convention: the ``ARTICULATION_`` prefix is dropped for articulation types, as with DOF_STIFFNESS and BODY_MASS, and retained for rigid-body ones, as with RIGID_BODY_MASS.
1 parent c295669 commit 0616c4b

2 files changed

Lines changed: 62 additions & 11 deletions

File tree

source/isaaclab_ov/changelog.d/ovphysx-cpu-only-tensor-types.minor.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
Added
2+
^^^^^
3+
4+
* Added :attr:`~isaaclab_ov.tensor_types.DOF_DRIVE_TYPE`,
5+
:attr:`~isaaclab_ov.tensor_types.DOF_DRIVE_MODEL`,
6+
:attr:`~isaaclab_ov.tensor_types.BODY_DISABLE_GRAVITY`,
7+
:attr:`~isaaclab_ov.tensor_types.CONTACT_OFFSET`,
8+
:attr:`~isaaclab_ov.tensor_types.REST_OFFSET`,
9+
:attr:`~isaaclab_ov.tensor_types.RIGID_BODY_DISABLE_GRAVITY`,
10+
:attr:`~isaaclab_ov.tensor_types.RIGID_BODY_CONTACT_OFFSET`, and
11+
:attr:`~isaaclab_ov.tensor_types.RIGID_BODY_REST_OFFSET` tensor type aliases,
12+
documenting the shape, dtype and units of each.
13+
114
Fixed
215
^^^^^
316

source/isaaclab_ov/isaaclab_ov/tensor_types.py

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,19 @@
149149
Shape is ``[N, D, 3]``, dtype ``float32``.
150150
"""
151151

152+
DOF_DRIVE_TYPE = _TT.ARTICULATION_DOF_DRIVE_TYPE
153+
"""DOF drive type (0 = none, 1 = force, 2 = acceleration).
154+
155+
Shape is ``[N, D]``, dtype ``uint8``. Read-only.
156+
"""
157+
158+
DOF_DRIVE_MODEL = _TT.ARTICULATION_DOF_DRIVE_MODEL
159+
"""DOF performance-envelope drive model (speed-effort gradient, maximum actuator
160+
velocity, velocity-dependent resistance).
161+
162+
Shape is ``[N, D, 3]``, dtype ``float32``.
163+
"""
164+
152165
"""
153166
External wrench (GPU, write-only)
154167
"""
@@ -193,6 +206,24 @@
193206
Shape is ``[N, L, 9]``, dtype ``float32``.
194207
"""
195208

209+
BODY_DISABLE_GRAVITY = _TT.ARTICULATION_BODY_DISABLE_GRAVITY
210+
"""Per-link gravity disable flag (nonzero disables gravity for that link).
211+
212+
Shape is ``[N, L]``, dtype ``uint8``.
213+
"""
214+
215+
CONTACT_OFFSET = _TT.ARTICULATION_CONTACT_OFFSET
216+
"""Contact offset of each collision shape.
217+
218+
Shape is ``[N, S]``, dtype ``float32`` [m].
219+
"""
220+
221+
REST_OFFSET = _TT.ARTICULATION_REST_OFFSET
222+
"""Rest offset of each collision shape.
223+
224+
Shape is ``[N, S]``, dtype ``float32`` [m].
225+
"""
226+
196227
"""
197228
Rigid-body TensorTypes
198229
@@ -225,6 +256,16 @@
225256
``(N, 9)``, row-major flatten of the 3×3 inertia matrix
226257
``(Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz)`` [kg·m²]."""
227258

259+
RIGID_BODY_DISABLE_GRAVITY = _TT.RIGID_BODY_DISABLE_GRAVITY
260+
"""Gravity disable flag — read/write, CPU. Shape ``(N,)``, dtype ``uint8``;
261+
nonzero disables gravity for that actor."""
262+
263+
RIGID_BODY_CONTACT_OFFSET = _TT.RIGID_BODY_CONTACT_OFFSET
264+
"""Contact offset of each collision shape — read/write, CPU. Shape ``(N, S)`` [m]."""
265+
266+
RIGID_BODY_REST_OFFSET = _TT.RIGID_BODY_REST_OFFSET
267+
"""Rest offset of each collision shape — read/write, CPU. Shape ``(N, S)`` [m]."""
268+
228269
# These three aliases are pending an upcoming ovphysx wheel update.
229270
# When the wheel ships them, the corresponding ``hasattr`` checks below
230271
# in IsaacLab consumers will start returning True and the bindings will
@@ -433,26 +474,23 @@
433474
DOF_MAX_FORCE,
434475
DOF_ARMATURE,
435476
DOF_FRICTION_PROPERTIES,
477+
DOF_DRIVE_TYPE,
478+
DOF_DRIVE_MODEL,
436479
BODY_MASS,
437480
BODY_COM_POSE,
438481
BODY_INERTIA,
439482
BODY_INV_MASS,
440483
BODY_INV_INERTIA,
484+
BODY_DISABLE_GRAVITY,
485+
CONTACT_OFFSET,
486+
REST_OFFSET,
441487
# Rigid-body CPU-only entries (always available)
442488
RIGID_BODY_MASS,
443489
RIGID_BODY_COM_POSE,
444490
RIGID_BODY_INERTIA,
445-
# Collision-shape offsets, gravity-disable flags and DOF drive metadata. Measured
446-
# CPU-resident on a GPU sim; referenced through ``_TT`` since this module exposes
447-
# no public alias for them.
448-
_TT.ARTICULATION_DOF_DRIVE_TYPE,
449-
_TT.ARTICULATION_DOF_DRIVE_MODEL,
450-
_TT.ARTICULATION_BODY_DISABLE_GRAVITY,
451-
_TT.ARTICULATION_CONTACT_OFFSET,
452-
_TT.ARTICULATION_REST_OFFSET,
453-
_TT.RIGID_BODY_DISABLE_GRAVITY,
454-
_TT.RIGID_BODY_CONTACT_OFFSET,
455-
_TT.RIGID_BODY_REST_OFFSET,
491+
RIGID_BODY_DISABLE_GRAVITY,
492+
RIGID_BODY_CONTACT_OFFSET,
493+
RIGID_BODY_REST_OFFSET,
456494
DEFORMABLE_MATERIAL_DYNAMIC_FRICTION,
457495
DEFORMABLE_MATERIAL_YOUNGS_MODULUS,
458496
DEFORMABLE_MATERIAL_POISSONS_RATIO,

0 commit comments

Comments
 (0)