Do not infer inertia if geom is not in inertiagrouprange.
PiperOrigin-RevId: 483994271 Change-Id: Ia663cd30e93d9c3a2e32408a658f091af4d1ca1a
This commit is contained in:
committed by
Copybara-Service
parent
da33c5922f
commit
f695f55253
@@ -701,8 +701,10 @@ void mjCBody::Compile(void) {
|
||||
|
||||
// compile all geoms, phase 1
|
||||
for (i=0; i<geoms.size(); i++) {
|
||||
geoms[i]->inferinertia = id>0 && (!explicitinertial ||
|
||||
model->inertiafromgeom==mjINERTIAFROMGEOM_TRUE);
|
||||
geoms[i]->inferinertia = id>0 &&
|
||||
(!explicitinertial || model->inertiafromgeom == mjINERTIAFROMGEOM_TRUE) &&
|
||||
geoms[i]->group >= model->inertiagrouprange[0] &&
|
||||
geoms[i]->group <= model->inertiagrouprange[1];
|
||||
geoms[i]->Compile();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user