Skip to content

Commit

Permalink
apply joint forces patch (by Ian Chen)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Apr 22, 2024
1 parent e36ded2 commit 63121dd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 63121dd

Please sign in to comment.