Use mj_rayMesh for computing an inexact SDF for mesh-SDF collisions.
PiperOrigin-RevId: 794576123 Change-Id: I3c688056a5ed617a0787ccf1f4aa683f9409040f
This commit is contained in:
committed by
Copybara-Service
parent
cc52d0242b
commit
dcdf0a9c5c
@@ -0,0 +1,34 @@
|
||||
<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>
|
||||
|
||||
<option gravity="0 0 -9.81" sdf_iterations="3" 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>
|
||||
Reference in New Issue
Block a user