Ignore geoms with tiny mass in inertiafromgeom computation. Fixes #2754
PiperOrigin-RevId: 795475978 Change-Id: I02b5db9e2ac7ec556cb0a0ec6dbe4214ba9128d7
This commit is contained in:
committed by
Copybara-Service
parent
977f94e9df
commit
b566ef2883
@@ -1902,11 +1902,12 @@ void mjCBody::InertiaFromGeom(void) {
|
||||
double toti[6] = {0, 0, 0, 0, 0, 0};
|
||||
std::vector<mjCGeom*> sel;
|
||||
|
||||
// select geoms based on group
|
||||
// select geoms based on group, ignore tiny masses
|
||||
sel.clear();
|
||||
for (int i=0; i < geoms.size(); i++) {
|
||||
if (geoms[i]->group >= compiler->inertiagrouprange[0] &&
|
||||
geoms[i]->group <= compiler->inertiagrouprange[1]) {
|
||||
geoms[i]->group <= compiler->inertiagrouprange[1] &&
|
||||
geoms[i]->mass_ > mjEPS) {
|
||||
sel.push_back(geoms[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user