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:
committed by
Copybara-Service
parent
e94a46c20f
commit
981fa22302
@@ -1014,8 +1014,8 @@ void mjCMesh::Process(void) {
|
||||
mju_eig3(eigval, eigvec, quattmp, full);
|
||||
|
||||
// check eigval - SHOULD NOT OCCUR
|
||||
if (eigval[2]<mjEPS) {
|
||||
throw mjCError(this, "eigenvalue of mesh inertia too small: %s", name.c_str());
|
||||
if (eigval[2]<=0) {
|
||||
throw mjCError(this, "eigenvalue of mesh inertia must be positive: %s", name.c_str());
|
||||
}
|
||||
if (eigval[0] + eigval[1] < eigval[2] ||
|
||||
eigval[0] + eigval[2] < eigval[1] ||
|
||||
|
||||
Reference in New Issue
Block a user