Don't enforce minimum inertia at mesh loading.

Inertias of moving bodies are enforced to be greater mjMINVAL at model compilation, there is no need to enforce inertias at mesh load time. Tiny meshes could be static or part of a larger geom assembly, in which case their tiny inertia is not a problem.

Also, make error message for small masses/inertias more precise.

PiperOrigin-RevId: 451625216
Change-Id: I4b48d7a881e620d6fbb591ec77fbdacc7c03496c
This commit is contained in:
Yuval Tassa
2022-05-28 06:42:48 -07:00
committed by Copybara-Service
parent e94a46c20f
commit 981fa22302
3 changed files with 63 additions and 5 deletions
+1 -1
View File
@@ -2494,7 +2494,7 @@ mjModel* mjCModel::Compile(const mjVFS* vfs) {
// error
if (!ok) {
throw mjCError(b, "mass and inertia of moving bodies must be positive");
throw mjCError(b, "mass and inertia of moving bodies must be larger than mjMINVAL");
}
}
}