Skip to content

Commit

Permalink
Merge pull request #4583 from iche033/iche033/joint_force_torque
Browse files Browse the repository at this point in the history
Fix joint force/torque feedback
  • Loading branch information
erwincoumans authored Apr 9, 2024
2 parents 6bb8d11 + d7f9d66 commit 5e89410
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/BulletDynamics/Featherstone/btMultiBody.cpp
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 5e89410

Please sign in to comment.