google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
8.25k stars 823 forks source link

The convex mesh inertia calculation is incorrect #2152

Closed yuvaltassa closed 1 month ago

yuvaltassa commented 1 month ago

Intro

MuJoCo dev, opening a bug following comment by @SeanCurtis-TRI

My setup

N/A

What's happening? What did you expect?

TL;DR @SeanCurtis-TRI is saying:

  1. The convex mesh inertia approximation (add up all the tets) works correctly when the mesh is convex.
  2. However, the model compiler is not using the convex mesh (computed by qhull) to compute the inertia, instead it is using the original mesh.
  3. This can lead to significant overcounting. @SeanCurtis-TRI thinks 2x is the maximum overcounting that can happen, I think it's actually unbounded, either way – not good.

Steps for reproduction

N/A

Minimal model for reproduction

N/A

Code required for reproduction

N/A

Confirmations