Closed jariasn closed 4 months ago
Hi @jariasn
[1] I loaded a stripped down version of your example in brax with http://localhost:8080/simulate/example.xml
and it looks good to me
<mujoco model="ur5">
<compiler angle="radian" autolimits="true"/>
<default>
<joint armature='0.04' damping="1" limited="true"/>
<geom friction=".8 .1 .1" density="300" margin="0.002" contype="0" conaffinity="0"/>
</default>
<option gravity="0 0 -9.81" timestep="0.001" iterations="4" />
<asset>
<mesh file="/abspathto/mujoco/mjx/mujoco/mjx/test_data/meshes/pyramid.stl"/>
<mesh file="/abspathto/mujoco/mjx/mujoco/mjx/test_data/meshes/tetrahedron.stl"/>
</asset>
<worldbody>
<light diffuse=".5 .5 .5" pos="0 0 0" dir="0 0 -1"/>
<geom conaffinity="1" friction="1 .1 .1" name="floor" pos="0 0 0" size="20 20 0.125" type="plane"/>
<body name="teapot" pos="4 0 2">
<geom name="teapot" pos="0 0 0" type="mesh" contype="1" mesh="pyramid" mass="0.1"/>
<joint armature="0" damping="0" limited="false" margin="0.01" name="teapot" pos="0 0 0" type="free"/>
</body>
<body name="can" pos="4 0 1">
<geom name="can" pos="0 0 0" type="mesh" contype="1" conaffinity="1" mesh="tetrahedron" mass="0.1"/>
<joint armature="0" damping="0" limited="false" margin="0.01" name="can" pos="0 0 0" type="free"/>
</body>
</worldbody>
</mujoco>
Not that I lowered the timestep since the simulation was unstable at 0.01.
[2] Which endpoint are you using with the visualizer? The play
endpoint should effectively do a very similar thing as IPython.display.HTML
in colab (I'm assuming that's what you mean by "HTML tool").
Note that mesh collisions are not performant in Brax as per this README. We are actively working to speed these collisions up.
Hi!
I was trying to simulate the collision between a teapot and a can. I run the simulation for about 30 time-steps but the objects don't collide with each other. However, the can and the teapot do collide with the plane. I checked the conaffinity and contype parameters, which should be correctly set. https://github.com/google/brax/assets/64325659/2d27afea-670c-4d2e-b865-1403590943c7
The relevant XML file is:
To load this model, I use this script.
Another problem that I encountered when trying to load two bodies with
<geom type="mesh">
is that the simulation freezes and it starts consuming a lot of resources. It freezes at:This happens only when I try to simulate these bodies using the visualizer.py script. In order for me to visualize more than one body with
<geom type="mesh">
I need to use the HTML tool provided. Why can't I load them using the visualizer.py script? The XML I used is:If I comment out any of the two bodies, the simulation works without any problems.
Thank you in advance for your help!