Files
Mujoco_WASM/model/plugin/sdf/mesh.xml
T
Alessio Quaglino 47a750d4a6 Restore mesh-SDF collisions.
This CL rolls back the change from changelist 794576123 since the previous version was more robust and stable. Compared to the original algorithm, this changes handles degenerate and very large triangles as well.

BEGIN_PUBLIC
Restore mesh-SDF collisions.
END_PUBIC

PiperOrigin-RevId: 875716983
Change-Id: If0de41dc7bbd60460779821d2338cf2d661f40d5
2026-02-26 07:39:34 -08:00

36 lines
955 B
XML

<mujoco>
<extension>
<plugin plugin="mujoco.sdf.torus">
<instance name="torus">
<config key="radius1" value="0.35"/>
<config key="radius2" value="0.15"/>
</instance>
</plugin>
</extension>
<!-- number of starting points per face, faces are larger than the torus -->
<option sdf_initpoints="10"/>
<asset>
<mesh name="torus">
<plugin instance="torus"/>
</mesh>
<mesh name="die" file="asset/die.obj" scale="1 1 1"/>
</asset>
<include file="scene.xml"/>
<worldbody>
<body pos="0 .05 2.5" euler="90 0 0">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".8 .17 .15 1" group="1">
<plugin instance="torus"/>
</geom>
</body>
<body>
<geom type="mesh" mesh="die" euler="90 0 0" rgba="0 0 1 .2"/>
</body>
<light pos="1 0 7" dir="0 0 -1" castshadow="false"/>
<light pos="-1 0 7" dir="0 0 -1" castshadow="false"/>
</worldbody>
</mujoco>