Move fullinertia from mjCAlternative to mjCBody with correction to handle URDF with 0 inertias.
PiperOrigin-RevId: 604812870 Change-Id: I018254d1362a654a4f99bf5e621d5abc7129a0c6
This commit is contained in:
committed by
Copybara-Service
parent
19c41aa965
commit
b9c50ad79c
@@ -20,6 +20,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@@ -2551,9 +2552,8 @@ void mjCModel::FuseStatic(void) {
|
||||
}
|
||||
|
||||
// compute principal axes of inertia
|
||||
mjCAlternative alt;
|
||||
mjuu_copyvec(alt.fullinertia, toti, 6);
|
||||
const char* err1 = alt.Set(par->iquat, par->inertia, degree, euler);
|
||||
mjuu_copyvec(par->fullinertia, toti, 6);
|
||||
const char* err1 = par->FullInertia(par->iquat, par->inertia);
|
||||
if (err1) {
|
||||
throw mjCError(NULL, "error '%s' in fusing static body inertias", err1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user