Do not use the inertia box for volume computation.

PiperOrigin-RevId: 582319067
Change-Id: I347d820f48faab15b609bcfc8295b07bd2d0f7ed
This commit is contained in:
Alessio Quaglino
2023-11-14 07:45:46 -08:00
committed by Copybara-Service
parent c8146372cf
commit ffca553f64
2 changed files with 1 additions and 7 deletions
+1 -6
View File
@@ -1332,12 +1332,7 @@ double mjCGeom::GetVolume(void) {
}
mjCMesh* pmesh = model->meshes[meshid];
if (model->exactmeshinertia || typeinertia==mjSHELL_MESH) {
return pmesh->GetVolumeRef(typeinertia);
} else {
const double* boxsz_volume = pmesh->boxsz_volume();
return boxsz_volume[0]*boxsz_volume[1]*boxsz_volume[2]*8;
}
return pmesh->GetVolumeRef(typeinertia);
}
// compute from geom shape
-1
View File
@@ -615,7 +615,6 @@ class mjCMesh: public mjCBase {
const std::vector<int>& userface() const { return userface_; }
// mesh properites computed by Compile
const double* boxsz_volume() const { return boxsz_volume_; }
const double* aamm() const { return aamm_; }
// number of vertices, normals, texture coordinates, and faces