Do not use the inertia box for volume computation.
PiperOrigin-RevId: 582319067 Change-Id: I347d820f48faab15b609bcfc8295b07bd2d0f7ed
This commit is contained in:
committed by
Copybara-Service
parent
c8146372cf
commit
ffca553f64
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user