mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Orientation issue for small meshes

Open snasiriany opened this issue 1 year ago • 3 comments

For models that have small meshes, I was seeing the issue Error: mesh volume is too small...

I'm able to make this issue go away by adding the following line to the body containing the meshes: <inertial pos="0 0 0" mass="0" diaginertia="0 0 0"/>

Adding this line resolves the error, but the offending small mesh is oriented incorrectly: small_scale

I've noted that the orientation issue goes away when I increase the scale parameter of the meshes to a large enough value: large_scale

Attaching a zip file with minimal models here: small_model_2.zip

To reproduce: python -m mujoco.viewer --mjcf small_model_2/model_small_scale.xml

I believe this is a bug.

  • System information:
    • Operating system: both Mac (M1), Ubuntu
    • MuJoCo version: 2.3.7

snasiriany avatar Oct 17 '23 23:10 snasiriany

Add shellinertia=true to the Hood_light_2 geom and your problem should go away.

kevinzakka avatar Oct 18 '23 05:10 kevinzakka

Thanks @kevinzakka! That did solve it, but it should only be used if the geom is small. In the larger model with 100x scale, I need to make that shellinertia=false. Is there a way to determine this automatically? Perhaps a good feature to implement in the future.

snasiriany avatar Oct 18 '23 15:10 snasiriany

Why do you need to make it false? My intention was that shellinertia should only have been dependent on the mesh topology, not its size.

quagla avatar Oct 24 '23 16:10 quagla