Add Signed Distance Field to collision geometries.

PiperOrigin-RevId: 557507088
Change-Id: I358a642407aee1ba8dfc9d405eb9a4f609435fe9
This commit is contained in:
Alessio Quaglino
2023-08-16 09:14:29 -07:00
committed by Copybara-Service
parent 6245edae28
commit fdb041580c
57 changed files with 3229 additions and 81 deletions
+50
View File
@@ -0,0 +1,50 @@
<mujoco>
<extension>
<plugin plugin="mujoco.sdf.bowl">
<instance name="bowl">
<config key="height" value="0.4"/>
<config key="radius" value="1.0"/>
<config key="thickness" value="0.02"/>
</instance>
</plugin>
</extension>
<asset>
<mesh name="bowl">
<plugin instance="bowl"/>
</mesh>
</asset>
<option sdf_iterations="5" sdf_initpoints="20"/>
<default>
<geom solref="0.01 1" solimp=".95 .99 .0001" condim="1"/>
</default>
<statistic meansize=".1"/>
<include file="scene.xml"/>
<worldbody>
<light name="left" pos="0 0 4"/>
<light name="right" pos="-1 -1 2" dir="1 1 -2"/>
<body euler="45 -15 0" pos="0 0 1">
<geom type="sdf" name="bowl" mesh="bowl" rgba=".2 .8 .8 1">
<plugin instance="bowl"/>
</geom>
</body>
<body pos=".6 -.4 2.5">
<freejoint/>
<geom type="sphere" size=".15" rgba=".8 .17 .15 1"/>
</body>
<body pos="0 -.4 2.5">
<freejoint/>
<geom type="sphere" size=".15" rgba=".8 .17 .15 1"/>
</body>
<body pos=".3 -.4 2.5">
<freejoint/>
<geom type="sphere" size=".15" rgba=".8 .17 .15 1"/>
</body>
</worldbody>
</mujoco>
+55
View File
@@ -0,0 +1,55 @@
<mujoco>
<extension>
<plugin plugin="mujoco.sdf.gear">
<instance name="gear1">
<config key="alpha" value="0"/>
</instance>
</plugin>
<plugin plugin="mujoco.sdf.gear">
<instance name="gear2">
<config key="alpha" value="15"/>
</instance>
</plugin>
</extension>
<asset>
<mesh name="gear1">
<plugin instance="gear1"/>
</mesh>
<mesh name="gear2">
<plugin instance="gear2"/>
</mesh>
</asset>
<option sdf_iterations="5" sdf_initpoints="20"/>
<default>
<geom solref="0.01 1" solimp=".95 .99 .0001" friction="0.2"/>
</default>
<statistic meansize=".1"/>
<include file="scene.xml"/>
<worldbody>
<body pos="0 0 .2">
<joint name="freewheel" type="hinge" damping="1000" axis="0 0 1"/>
<geom type="sdf" name="gear1" mesh="gear1" rgba="0.4 0.4 0.4 1">
<plugin instance="gear1"/>
</geom>
</body>
<body pos="2.85 0 .2">
<joint name="drive" type="hinge" damping=".1" axis="0 0 1"/>
<geom type="sdf" name="gear2" mesh="gear2" rgba="0.7 0.7 0.7 1">
<plugin instance="gear2"/>
</geom>
</body>
<light name="left" pos="0 0 1"/>
<light name="right" pos="1 0 1"/>
</worldbody>
<actuator>
<motor name="drive" joint="drive" ctrlrange="-1 1" gear="1500" ctrllimited="true"/>
</actuator>
</mujoco>
+35
View File
@@ -0,0 +1,35 @@
<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"/>
<asset>
<mesh name="torus">
<plugin instance="torus"/>
</mesh>
<mesh file="../../mug/mug.obj" scale=".2 .2 .2"/>
</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="mug" 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>
+56
View File
@@ -0,0 +1,56 @@
<mujoco>
<extension>
<plugin plugin="mujoco.sdf.nut">
<instance name="nut">
<config key="radius" value="0.26"/>
</instance>
</plugin>
<plugin plugin="mujoco.sdf.bolt">
<instance name="bolt">
<config key="radius" value="0.26"/>
</instance>
</plugin>
</extension>
<compiler autolimits="true"/>
<include file="scene.xml"/>
<visual>
<map force="0.05"/>
</visual>
<asset>
<mesh name="nut">
<plugin instance="nut"/>
</mesh>
<mesh name="bolt">
<plugin instance="bolt"/>
</mesh>
</asset>
<option sdf_iterations="15" sdf_initpoints="60"/>
<default>
<geom solref="0.01 1" solimp=".95 .99 .0001" friction="0.01"/>
</default>
<statistic meansize=".1"/>
<worldbody>
<body pos="-0.0012496 0.00329058 0.830362" quat="-0.000212626 0.999996 -0.00200453 0.00185878">
<joint type="free" damping="30"/>
<geom type="sdf" name="nut" mesh="nut" rgba="0.83 0.68 0.4 1">
<plugin instance="nut"/>
</geom>
</body>
<body euler="180 0 0">
<geom type="sdf" name="bolt" mesh="bolt" rgba="0.7 0.7 0.7 1">
<plugin instance="bolt"/>
</geom>
</body>
<light name="left" pos="-1 0 2" cutoff="80"/>
<light name="right" pos="1 0 2" cutoff="80"/>
</worldbody>
</mujoco>
+68
View File
@@ -0,0 +1,68 @@
<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>
<asset>
<mesh name="torus">
<plugin instance="torus"/>
</mesh>
</asset>
<option sdf_iterations="10" sdf_initpoints="20"/>
<include file="scene.xml"/>
<default>
<geom solref="0.01 1" solimp=".95 .99 .0001"/>
</default>
<worldbody>
<body pos="0 0 .175">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".8 .2 .2 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos=".1 .1 1.2">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".8 .2 .2 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos=".1 .1 2.6">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".8 .2 .2 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos="-.1 .2 2">
<freejoint/>
<geom type="sphere" size="0.3"/>
</body>
<body pos=".3 -.1 2" euler="0 0 45">
<freejoint/>
<geom type="ellipsoid" size=".4 .2 .2"/>
</body>
<body pos="-.1 .1 .5">
<freejoint/>
<geom type="capsule" size=".1" fromto="-.2 -.2 .1 .2 .2 .1"/>
</body>
<body pos=".2 -.2 .3">
<freejoint/>
<geom type="cylinder" size=".1" fromto="-.2 -.2 .1 .2 .2 .1"/>
</body>
<body pos=".1 .1 3.5">
<freejoint/>
<geom type="box" size=".2 .2 .2"/>
</body>
<light name="left" pos="0 0 1"/>
<light name="right" pos="1 0 1"/>
</worldbody>
</mujoco>
+38
View File
@@ -0,0 +1,38 @@
<!-- Copyright 2021 DeepMind Technologies Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<mujoco>
<compiler texturedir="asset"/>
<statistic meansize=".05"/>
<visual>
<rgba haze="0.15 0.25 0.35 1"/>
<map stiffness="700" shadowscale="0.5" fogstart="1" fogend="15" zfar="40" haze="1" shadowclip="3"/>
</visual>
<asset>
<texture type="skybox" builtin="gradient" rgb1="0.3 0.5 0.7" rgb2="0 0 0" width="512" height="512"/>
<texture name="texplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 0.15 0.2"
width="512" height="512" mark="cross" markrgb=".8 .8 .8"/>
<material name="matplane" reflectance="0.3" texture="texplane" texrepeat="1 1" texuniform="true"/>
</asset>
<worldbody>
<light directional="true" diffuse=".8 .8 .8" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1"/>
<geom name="ground" type="plane" pos="0 0 -.02" size="10 10 .01" material="matplane" condim="1"/>
</worldbody>
</mujoco>
+54
View File
@@ -0,0 +1,54 @@
<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>
<asset>
<mesh name="torus">
<plugin instance="torus"/>
</mesh>
</asset>
<option sdf_iterations="10" sdf_initpoints="40"/>
<include file="scene.xml"/>
<default>
<geom solref="0.01 1" solimp=".95 .99 .0001" friction="0.1"/>
</default>
<worldbody>
<body pos="-1 0 3.8">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".2 .2 .8 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos="-1 0 3.4">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".2 .8 .2 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos="-1 0 3">
<freejoint/>
<geom type="sdf" mesh="torus" rgba=".8 .2 .2 1">
<plugin instance="torus"/>
</geom>
</body>
<body pos="0 0 2">
<geom type="cylinder" size=".1" fromto="1 0 -1 -1 0 1"/>
</body>
<body pos="0 0 2">
<geom type="cylinder" size=".5" fromto="1.2 0 -1.2 1 0 -1"/>
</body>
<light name="left" pos="-2 0 7" cutoff="80"/>
<light name="right" pos="2 0 7" cutoff="80"/>
</worldbody>
</mujoco>