Skip to content

Commit b340a55

Browse files
Fix OVPhysX iface fixture to mirror PhysX/Newton setup
The fixture was calling data._process_cfg(obj.cfg), but _process_cfg moved from RigidObjectData onto RigidObject in commit 0887d2d ("Mirror PhysX/Newton patterns in OVPhysX RigidObject"). PhysX/Newton fixtures don't populate default_root_pose / default_root_vel at all, so drop the call. The fixture was also missing the asset-side buffers (_ALL_INDICES, _ALL_BODY_INDICES, _ALL_TRUE_*_MASK, _wrench_buf, _cpu_* pinned staging) that RigidObject._initialize_impl normally allocates via _create_buffers. The PhysX / Newton fixtures install these manually; on the OVPhysX side it is simpler to call obj._create_buffers() directly and then overwrite the real WrenchComposers with mocks. Brings the failing 372 cross-backend iface tests to passing (372 ovphysx-backend cases now green; 1476 rigid-object iface tests total pass with 12 documented xfails).
1 parent abbeda4 commit b340a55

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

source/isaaclab/test/assets/test_rigid_object_iface.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,16 @@ def create_ovphysx_rigid_object(
257257
data = OvPhysxRigidObjectData(mock_bindings.bindings, device)
258258
data.num_instances = num_instances
259259
data.num_bodies = 1
260-
data._process_cfg(obj.cfg)
261260
data._is_primed = True
262261
object.__setattr__(obj, "_data", data)
263262

264-
# Wrench composers
263+
# Build the buffers RigidObject normally allocates in _initialize_impl
264+
# (_ALL_INDICES, _ALL_*_MASK, pinned CPU staging buffers, wrench buf).
265+
# _create_buffers also instantiates real WrenchComposers; those get
266+
# replaced with mocks just below.
267+
obj._create_buffers()
268+
269+
# Replace the real wrench composers with mocks for iface coverage.
265270
mock_inst_wrench = MockWrenchComposer(obj)
266271
mock_perm_wrench = MockWrenchComposer(obj)
267272
object.__setattr__(obj, "_instantaneous_wrench_composer", mock_inst_wrench)

0 commit comments

Comments
 (0)