Skip to content

Commit 7595be0

Browse files
committed
Scope MuJoCo-Warp contact workaround
1 parent e27c315 commit 7595be0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

source/isaaclab_newton/test/sensors/test_contact_sensor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ def test_horizontal_collision_detects_contact(device: str, use_mujoco_contacts:
224224
sim._app_control_on_stop_handle = None
225225

226226
max_separation = max(cfg[1] for cfg in group_configs)
227+
# Avoid MuJoCo-Warp #1527's symmetric zero-margin GJK edge case.
228+
lateral_offset = (
229+
0.01 if use_mujoco_contacts and device.startswith("cuda") and shape_type == ShapeType.MESH_CAPSULE else 0.0
230+
)
227231
scene_cfg = ContactSensorTestSceneCfg(num_envs=num_envs, env_spacing=5.0, lazy_sensor_update=False)
228232
scene_cfg.object_a = create_shape_cfg(
229233
shape_type,
@@ -235,7 +239,7 @@ def test_horizontal_collision_detects_contact(device: str, use_mujoco_contacts:
235239
scene_cfg.object_b = create_shape_cfg(
236240
shape_type,
237241
"{ENV_REGEX_NS}/ObjectB",
238-
pos=(max_separation / 2, 0.01, 0.5),
242+
pos=(max_separation / 2, lateral_offset, 0.5),
239243
disable_gravity=True,
240244
activate_contact_sensors=True,
241245
)

0 commit comments

Comments
 (0)