Merge pull request #2030 from erwincoumans/master
some fixes in inverse dynamics, PyBullet example comparing explicit pd, stable pd control, position control (constraint)
This commit is contained in:
@@ -764,6 +764,12 @@ void btHingeConstraint::getInfo2InternalUsingFrameOffset(btConstraintInfo2* info
|
||||
btVector3 ax1A = trA.getBasis().getColumn(2);
|
||||
btVector3 ax1B = trB.getBasis().getColumn(2);
|
||||
btVector3 ax1 = ax1A * factA + ax1B * factB;
|
||||
if (ax1.length2()<SIMD_EPSILON)
|
||||
{
|
||||
factA=0.f;
|
||||
factB=1.f;
|
||||
ax1 = ax1A * factA + ax1B * factB;
|
||||
}
|
||||
ax1.normalize();
|
||||
// fill first 3 rows
|
||||
// we want: velA + wA x relA == velB + wB x relB
|
||||
|
||||
@@ -134,6 +134,15 @@ public:
|
||||
return m_baseCollider;
|
||||
}
|
||||
|
||||
const btMultiBodyLinkCollider *getLinkCollider(int index) const
|
||||
{
|
||||
if (index >= 0 && index < getNumLinks())
|
||||
{
|
||||
return getLink(index).m_collider;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
btMultiBodyLinkCollider *getLinkCollider(int index)
|
||||
{
|
||||
if (index >= 0 && index < getNumLinks())
|
||||
|
||||
Reference in New Issue
Block a user