Files
Mujoco_WASM/model/plugin/touch_grid.xml
T
Yuval Tassa b397b3123e Added touch grid sensor plugin.
PiperOrigin-RevId: 527512624
Change-Id: I0f316eb6eb2c52472abbec484e5538b66ba2e82e
2023-04-27 02:03:03 -07:00

55 lines
1.8 KiB
XML

<mujoco model="touchtest">
<compiler autolimits="true"/>
<extension>
<plugin plugin="mujoco.sensor.touch_grid"/>
</extension>
<asset>
<texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300" mark="edge" markrgb=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="3 1" texuniform="true"/>
<hfield file="a.png" size="0.2 0.2 0.02 0.015"/>
</asset>
<visual>
<headlight ambient=".7 .7 .7" diffuse=".2 .2 .2" specular="0.1 0.1 0.1"/>
<map znear="0.01"/>
<scale contactwidth=".02" contactheight=".5"/>
</visual>
<default>
<geom friction="0.4" solimp="0 0.95 0.02"/>
</default>
<statistic center="0 0 1" extent="1" meansize=".1"/>
<worldbody>
<light pos="1 0 .3" dir="-1 0 -.3"/>
<light pos="-1 0 .3" dir="1 0 -.3"/>
<geom name="floor" pos="0 0 -0.01" type="plane" size="1 1 .01"/>
<geom name="a" type="hfield" hfield="a" rgba=".5 .5 .7 1"/>
<body name="ball" pos="0 0 1">
<joint name="x" type="slide" axis="1 0 0" damping="1"/>
<joint name="y" type="slide" axis="0 1 0" damping="1"/>
<joint name="z" type="slide" axis="0 0 1"/>
<joint name="rx" axis="1 0 0" springdamper="0.2 1"/>
<joint name="ry" axis="0 1 0" springdamper="0.2 1"/>
<geom type="ellipsoid" size=".3 .5 .1" mass="0.1" rgba=".5 .5 .5 .3"/>
<site name="touch" pos="0 0 .1"/>
</body>
</worldbody>
<sensor>
<plugin name="touch" plugin="mujoco.sensor.touch_grid" objtype="site" objname="touch">
<config key="size_x" value="7"/>
<config key="size_y" value="7"/>
<config key="fov_x" value="45"/>
<config key="fov_y" value="45"/>
<config key="gamma" value="0"/>
<config key="nchannel" value="3"/>
</plugin>
</sensor>
</mujoco>