drake
drake copied to clipboard
CalcSpatialInertia fails on this Hello Robot obj
What happened?
Following #20444, I've put a simple failure reproduction here: https://github.com/RobotLocomotion/drake/commit/2fe7f248091a93e20fbb471f8a27502ba9caee73
This attempts to compute the spatial inertia from the hello robot model in mujoco menagerie but fails with
Expected: CalcSpatialInertia(unit_scale_obj, kDensity) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Spatial inertia fails SpatialInertia::IsPhysicallyValid().
mass = 2.1647959683444456e-05
Center of mass = [-0.24465954725602354 -3.041901842037344e-06 0.02583678929053868]
Inertia about point P, I_BP =
[1.90172e-08 -1.2568e-11 1.35882e-07]
[-1.2568e-11 1.30846e-06 1.45236e-12]
[1.35882e-07 1.45236e-12 1.2914e-06]
Inertia about center of mass, I_BBcm =
[ 4.56633e-09 3.54305e-12 -9.59847e-10]
[ 3.54305e-12 -1.79939e-09 -2.49019e-13]
[-9.59847e-10 -2.49019e-13 -4.40846e-09]
Principal moments of inertia about Bcm (center of mass) =
[-4.509963383944518e-09 -1.799395202505969e-09 4.667840740414944e-09]
Additionally the CalcSpatialInertia doc strings do not actually declare that they could throw an exception for this reason.
Version
No response
What operating system are you using?
Ubuntu 22.04
What installation option are you using?
compiled from source code using Bazel
Relevant log output
No response