Enable 'global absolute velocities' by default for btMultiBody. See 8.3.2B Proposed resolution Jakub Stepien PhD Thesis
https://drive.google.com/file/d/0Bz3vEa19XOYGNWdZWGpMdUdqVmZ5ZVBOaEh4ZnpNaUxxZFNV/view?usp=sharing Fixes crashes due to rendering of softbody wireframe in the wrong thread (needs to be in 'debug' rendering section) Use btCapsuleShapeZ instead of btMultiSphereShape when converting MJCF MuJoCo capsules using fromto
This commit is contained in:
@@ -115,14 +115,14 @@ btMultiBody::btMultiBody(int n_links,
|
||||
m_linearDamping(0.04f),
|
||||
m_angularDamping(0.04f),
|
||||
m_useGyroTerm(true),
|
||||
m_maxAppliedImpulse(1000.f),
|
||||
m_maxAppliedImpulse(1000.f),
|
||||
m_maxCoordinateVelocity(100.f),
|
||||
m_hasSelfCollision(true),
|
||||
m_hasSelfCollision(true),
|
||||
__posUpdated(false),
|
||||
m_dofCount(0),
|
||||
m_dofCount(0),
|
||||
m_posVarCnt(0),
|
||||
m_useRK4(false),
|
||||
m_useGlobalVelocities(false),
|
||||
m_useGlobalVelocities(true),
|
||||
m_internalNeedsJointFeedback(false)
|
||||
{
|
||||
m_cachedInertiaTopLeft.setValue(0,0,0,0,0,0,0,0,0);
|
||||
@@ -1280,7 +1280,7 @@ void btMultiBody::solveImatrix(const btVector3& rhs_top, const btVector3& rhs_bo
|
||||
{
|
||||
result[0] = rhs_bot[0] / m_baseInertia[0];
|
||||
result[1] = rhs_bot[1] / m_baseInertia[1];
|
||||
result[2] = rhs_bot[2] / m_baseInertia[2];
|
||||
result[2] = rhs_bot[2] / m_baseInertia[2];
|
||||
} else
|
||||
{
|
||||
result[0] = 0;
|
||||
@@ -2024,6 +2024,12 @@ const char* btMultiBody::serialize(void* dataBuffer, class btSerializer* seriali
|
||||
memPtr->m_posVarCount = getLink(i).m_posVarCount;
|
||||
|
||||
getLink(i).m_inertiaLocal.serialize(memPtr->m_linkInertia);
|
||||
|
||||
getLink(i).m_absFrameTotVelocity.m_topVec.serialize(memPtr->m_absFrameTotVelocityTop);
|
||||
getLink(i).m_absFrameTotVelocity.m_bottomVec.serialize(memPtr->m_absFrameTotVelocityBottom);
|
||||
getLink(i).m_absFrameLocVelocity.m_topVec.serialize(memPtr->m_absFrameLocVelocityTop);
|
||||
getLink(i).m_absFrameLocVelocity.m_bottomVec.serialize(memPtr->m_absFrameLocVelocityBottom);
|
||||
|
||||
memPtr->m_linkMass = getLink(i).m_mass;
|
||||
memPtr->m_parentIndex = getLink(i).m_parent;
|
||||
memPtr->m_jointDamping = getLink(i).m_jointDamping;
|
||||
|
||||
@@ -709,8 +709,11 @@ private:
|
||||
|
||||
bool __posUpdated;
|
||||
int m_dofCount, m_posVarCnt;
|
||||
|
||||
bool m_useRK4, m_useGlobalVelocities;
|
||||
|
||||
//for global velocities, see 8.3.2B Proposed resolution in Jakub Stepien PhD Thesis
|
||||
//https://drive.google.com/file/d/0Bz3vEa19XOYGNWdZWGpMdUdqVmZ5ZVBOaEh4ZnpNaUxxZFNV/view?usp=sharing
|
||||
|
||||
///the m_needsJointFeedback gets updated/computed during the stepVelocitiesMultiDof and it for internal usage only
|
||||
bool m_internalNeedsJointFeedback;
|
||||
};
|
||||
@@ -724,6 +727,11 @@ struct btMultiBodyLinkDoubleData
|
||||
btVector3DoubleData m_jointAxisBottom[6];
|
||||
|
||||
btVector3DoubleData m_linkInertia; // inertia of the base (in local frame; diagonal)
|
||||
btVector3DoubleData m_absFrameTotVelocityTop;
|
||||
btVector3DoubleData m_absFrameTotVelocityBottom;
|
||||
btVector3DoubleData m_absFrameLocVelocityTop;
|
||||
btVector3DoubleData m_absFrameLocVelocityBottom;
|
||||
|
||||
double m_linkMass;
|
||||
int m_parentIndex;
|
||||
int m_jointType;
|
||||
@@ -755,7 +763,12 @@ struct btMultiBodyLinkFloatData
|
||||
btVector3FloatData m_thisPivotToThisComOffset;
|
||||
btVector3FloatData m_jointAxisTop[6];
|
||||
btVector3FloatData m_jointAxisBottom[6];
|
||||
btVector3FloatData m_linkInertia; // inertia of the base (in local frame; diagonal)
|
||||
btVector3FloatData m_linkInertia; // inertia of the base (in local frame; diagonal)
|
||||
btVector3FloatData m_absFrameTotVelocityTop;
|
||||
btVector3FloatData m_absFrameTotVelocityBottom;
|
||||
btVector3FloatData m_absFrameLocVelocityTop;
|
||||
btVector3FloatData m_absFrameLocVelocityBottom;
|
||||
|
||||
int m_dofCount;
|
||||
float m_linkMass;
|
||||
int m_parentIndex;
|
||||
|
||||
Reference in New Issue
Block a user