apply joint forces patch

Signed-off-by: Ian Chen <ichen@openrobotics.org>
This commit is contained in:
Ian Chen 2024-02-22 23:59:39 +00:00
parent 6bb8d1123d
commit d7f9d66207

View File

@ -984,7 +984,11 @@ void btMultiBody::computeAccelerationsArticulatedBodyAlgorithmMultiDof(btScalar
//
hDof = spatInertia[i + 1] * m_links[i].m_axes[dof];
//
Y[m_links[i].m_dofOffset + dof] = m_links[i].m_jointTorque[dof] - m_links[i].m_axes[dof].dot(zeroAccSpatFrc[i + 1]) - spatCoriolisAcc[i].dot(hDof);
btScalar jointTorque = 0;
if (isConstraintPass) jointTorque = 0;
else jointTorque = m_links[i].m_jointTorque[dof];
Y[m_links[i].m_dofOffset + dof] = jointTorque - m_links[i].m_axes[dof].dot(zeroAccSpatFrc[i + 1]) - spatCoriolisAcc[i].dot(hDof);
}
for (int dof = 0; dof < m_links[i].m_dofCount; ++dof)
{