Closed HuaweiWang closed 1 year ago
I'm confused, the model you posted doesn't have an explicit <inertial>
tag, so the inertia is entirely inferred from boundmass and boundinertia, right?
Are you saying that these attributes are missing from <compiler>
in the saved model?
Or are you saying that you want explicit <inertial>
tags to be saved even though none were present in the original model?
Yes, that's correct. Neither of them is saved right now from my end. And either fix you mentioned could work I assume.
To me, saving these attributes inside <compiler>
makes more sense.
Hi MuJoCo Team,
We are creating musculoskeletal (MSK) models in MuJoCo and using
mujoco-bindings
, one thing we noticed is that themujoco.mj_saveLastXML
function does not save inertia properties when there is no geometry (but with joints) attached to the body.In MSK modelling, we needs to create quite some virtual bodies (as conditional sites). The issue we encountered can be reproduced in this simple example, in which load/save/reload does not work due to the inertia properties are not saved.
A solution could be to add the -keep_inertials args, or automatically save the inertia properties when no geometry is included (in this case, the inertia properties need to be saved to be reload correctly)
An alternative is to have the common bounds setup saved in the headline
boundmass="0.001" boundinertia="0.001" inertiagrouprange="0 1"
. With this information, the model can be loaded even when there is no geometry and inertia property attached to the virtual body.@aikkala