Modify MJX sensor_pos to handle unsupported sensors.

PiperOrigin-RevId: 663768186
Change-Id: I2e7600e77855a96a47f012fb64b6cc43abbf6f64
This commit is contained in:
Taylor Howell
2024-08-16 10:09:42 -07:00
committed by Copybara-Service
parent 4d9305fbb9
commit ce9c0ea351
3 changed files with 34 additions and 2 deletions
@@ -0,0 +1,19 @@
<!-- For validating model with unsupported sensor -->
<mujoco model="unsupported_sensor">
<worldbody>
<body>
<joint type="hinge"/>
<geom name="geom0" size="1"/>
<site name="site"/>
</body>
<body>
<joint type="hinge"/>
<geom name="geom1" size="1"/>
</body>
</worldbody>
<sensor>
<distance name="distance" geom1="geom0" geom2="geom1"/>
<framelinvel name="framelinvel" objtype="site" objname="site"/>
<touch name="touch" site="site"/>
</sensor>
</mujoco>