don't use the URDF inertia element, unless flag CUF_USE_URDF_INERTIA is set, not for the diagonal and also not for the inertial frame shift.

This commit is contained in:
Erwin Coumans
2018-05-03 14:24:16 -07:00
parent d70a9ae3a3
commit 84b20bda80
5 changed files with 51 additions and 6 deletions

View File

@@ -48,8 +48,12 @@ public:
virtual std::string getJointName(int linkIndex) const = 0;
//fill mass and inertial data. If inertial data is missing, please initialize mass, inertia to sensitive values, and inertialFrame to identity.
virtual void getMassAndInertia(int urdfLinkIndex, btScalar& mass,btVector3& localInertiaDiagonal, btTransform& inertialFrame) const =0;
virtual void getMassAndInertia (int urdfLinkIndex, btScalar& mass,btVector3& localInertiaDiagonal, btTransform& inertialFrame) const =0;
virtual void getMassAndInertia2(int urdfLinkIndex, btScalar& mass, btVector3& localInertiaDiagonal, btTransform& inertialFrame, int flags) const
{
getMassAndInertia(urdfLinkIndex, mass, localInertiaDiagonal, inertialFrame);
}
///fill an array of child link indices for this link, btAlignedObjectArray behaves like a std::vector so just use push_back and resize(0) if needed
virtual void getLinkChildIndices(int urdfLinkIndex, btAlignedObjectArray<int>& childLinkIndices) const =0;