Skip to content

Commit

Permalink
Fix bug in DynamicsLinearization due to use of ; in place of +
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Mar 8, 2024
1 parent 759fd71 commit 3fb5e06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/src/DynamicsLinearization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void ForwardDynamicsLinearizationWrtJointPos(const Model& model,
double invD = 1/(bufs.aba.D(dofIndex));
double d_invD = - invD * bufs.dPos[dofDeriv].D(dofIndex) * invD;
double dPos_ddq =
(bufs.aba.u(dofIndex)-bufs.aba.U(dofIndex).dot(bufs.aba.linksAccelerations(visitedLinkIndex)))*d_invD;
(bufs.aba.u(dofIndex)-bufs.aba.U(dofIndex).dot(bufs.aba.linksAccelerations(visitedLinkIndex)))*d_invD+
(bufs.dPos[dofDeriv].u(dofIndex)
-bufs.dPos[dofDeriv].U(dofIndex).dot(bufs.aba.linksAccelerations(visitedLinkIndex))
-bufs.aba.U(dofIndex).dot(bufs.dPos[dofDeriv].linksAccelerations(visitedLinkIndex)))*invD;
Expand Down

0 comments on commit 3fb5e06

Please sign in to comment.