Raise NotImplementedError for unsupported sensors in MJX. Update MJX feature parity docs to include fully supported sensors.

PiperOrigin-RevId: 673325233
Change-Id: Ib262bdd37937c5230765c11d1f61581e55e8c397
This commit is contained in:
Taylor Howell
2024-09-11 03:49:43 -07:00
committed by Copybara-Service
parent 4e3dc14f8e
commit 8710126d08
4 changed files with 29 additions and 72 deletions
@@ -1,65 +0,0 @@
<!-- For validating model with unsupported sensors -->
<mujoco model="unsupported_sensor">
<asset>
<material name="material"/>
</asset>
<worldbody>
<!-- tree 0 -->
<body name="body0" pos="1 2 3">
<joint name="hinge0" type="hinge" axis="1 0 0"/>
<geom name="geom0" size="0.1" material="material"/>
<site name="site_rangefinder0" pos="-1e-3 0 0.2"/>
<site name="site_rangefinder1" pos="-1e-3 0 0.175"/>
<site name="site0" pos=".1 .2 .3"/>
<body name="body1" pos="0.1 0.2 0.3">
<joint name="hinge1" type="hinge" axis="0 1 0"/>
<geom name="geom1" size="0.25"/>
<site name="site1" pos=".2 .4 .6"/>
</body>
</body>
<!-- body 2 -->
<body name="body2" pos=".1 .1 .1">
<joint name="ballquat2" type="ball" pos="0.1 0.1 0.1"/>
<geom name="geom2" size="1"/>
</body>
<!-- body 3 -->
<body name="body3" pos="-.1 -.1 -.1">
<joint name="ballquat3" type="ball" pos="0.1 0.2 0.3"/>
<geom size="1"/>
<site name="site3"/>
</body>
<!-- bodies for camera projection -->
<body pos="11.1 0 1">
<geom type="box" size=".1 .6 .375"/>
<site name="frontorigin" pos="-.1 .6 .375"/>
<site name="frontcenter" pos="-.1 0 0"/>
</body>
<body pos="10 0 0">
<joint axis="0 0 1" range="-180 180" limited="false"/>
<geom type="sphere" size=".2" pos="0 0 0.9"/>
<camera pos="0 0 1" xyaxes="0 -1 0 0 0 1" fovy="41.11209"
resolution="1920 1200" name="fixedcamera"/>
</body>
<!-- body for rangefinder -->
<body name="body_rangefinder" pos="1 2 4">
<geom size="0.01" material="material"/>
</body>
</worldbody>
<actuator>
<motor name="motor0" joint="hinge0" ctrlrange="-1 1" gear="10"
ctrllimited="true"/>
<motor name="motor1" joint="hinge1" ctrlrange="-1 1" gear="10"
ctrllimited="true"/>
</actuator>
<sensor>
<distance name="distance" geom1="geom0" geom2="geom1"/>
<framelinvel name="framelinvel" objtype="site" objname="site0"/>
<touch name="touch" site="site0"/>
</sensor>
</mujoco>