Add additional data fields that can be reported by rangefinder sensors.

PiperOrigin-RevId: 848316991
Change-Id: Idbf7ba81b4da711a22c23302c8782ab2b0b98d82
This commit is contained in:
Yuval Tassa
2025-12-23 15:31:53 -08:00
committed by Copybara-Service
parent f2e9097ed6
commit 70bc7be4bc
27 changed files with 712 additions and 133 deletions
+27 -12
View File
@@ -1,36 +1,51 @@
<mujoco model="rangefinder camera">
<asset>
<hfield name="hfield" nrow="5" ncol="5" size="2 2 .3 .1"
elevation=".7 .1 .4 .9 .0
.3 .6 .2 .8 .5
.1 .4 .7 .0 .9
.2 .5 .8 .3 .6
.4 .7 .1 .9 .2"/>
<mesh name="ss" builtin="supersphere" params="30 .2 .3" scale=".4 .42 .5"/>
</asset>
<visual>
<rgba frustum="1 1 0 0.1"/>
<rgba frustum="1 1 0 0.15"/>
</visual>
<worldbody>
<light pos="0 0 3"/>
<statistic meansize="0.17"/>
<!-- ground plane -->
<geom type="plane" size="5 5 .1" rgba=".3 .4 .5 1"/>
<worldbody>
<light pos="0 0 5"/>
<camera pos="0 -5.8 2.4" xyaxes="1 0 0 0 0.28 0.96"/>
<camera pos="-0.32 -3.23 2.92" xyaxes="1 0 0 0.05 0.5 0.85" fovy="60"/>
<!-- ground hfield -->
<geom type="hfield" hfield="hfield" rgba=".3 .4 .5 1" pos="0 0 -.3"/>
<!-- scattered objects for rays to hit -->
<geom type="sphere" pos="0 0 .4" size=".4" rgba="1 .3 .3 1"/>
<geom type="box" pos="1 0.5 .35" size=".35 .35 .35" rgba=".3 1 .3 1"/>
<geom type="cylinder" pos="-0.8 0.6 .4" size=".4 .4" rgba=".3 .3 1 1"/>
<geom type="capsule" pos="0.5 -0.7 0" size=".25 .35" zaxis="1 0.5 0" rgba="1 1 .3 1"/>
<geom type="mesh" mesh="ss" pos="1 0.5 .35" rgba=".3 1 .3 1" euler="20 0 30"/>
<geom type="cylinder" pos="-0.8 0.8 .4" size=".4 .5" euler="0 40 0" rgba=".3 .3 1 1"/>
<geom type="capsule" pos="0.5 -0.7 -.2" size=".3 .5" zaxis="1 0.5 0" rgba="0 1 1 1"/>
<geom type="ellipsoid" pos="-0.5 -0.5 .2" size=".4 .3 .25" rgba="1 .3 1 1"/>
<!-- mocap body with perspective camera -->
<body pos="1 0 2" euler="0 20 0" mocap="true">
<body pos="1 0 2" euler="0 20 90" mocap="true">
<geom type="box" pos="0 0 .3" size=".2 .2 .2"/>
<camera name="perspective" resolution="4 4" fovy="60"/>
</body>
<!-- mocap body with orthographic camera -->
<body pos="-1 0 2" euler="0 -20 0" mocap="true">
<body pos="-1 0 2" euler="0 -20 -90" mocap="true">
<geom type="box" pos="0 0 .3" size=".2 .2 .2"/>
<camera name="orthographic" resolution="4 4" fovy="1.5" projection="orthographic"/>
</body>
</worldbody>
<sensor>
<rangefinder camera="perspective"/>
<rangefinder camera="orthographic"/>
<rangefinder camera="perspective" data="dist point normal"/>
<rangefinder camera="orthographic" data="dist point normal"/>
</sensor>
</mujoco>