Allow contact sensor subtree1/subtree2 to be any body.

PiperOrigin-RevId: 799632590
Change-Id: If9cd6c5a3a5f83d89ae024a8f64232ab1f1d603a
This commit is contained in:
Yuval Tassa
2025-08-26 10:59:44 -07:00
committed by Copybara-Service
parent 9eaa31af2f
commit 7443e685ac
7 changed files with 64 additions and 32 deletions
-16
View File
@@ -1428,22 +1428,6 @@ class SpecsTest(absltest.TestCase):
refname='cam',
),
),
dict(
expected_error='subtree1 must be a child of the world',
sensor_params=dict(
type=mujoco.mjtSensor.mjSENS_CONTACT,
objtype=mujoco.mjtObj.mjOBJ_XBODY,
objname='non_root',
),
),
dict(
expected_error='subtree2 must be a child of the world',
sensor_params=dict(
type=mujoco.mjtSensor.mjSENS_CONTACT,
reftype=mujoco.mjtObj.mjOBJ_XBODY,
refname='non_root',
),
),
]
for params in test_cases: