Skip to content

Discrepancies in Dynamics Computation between Raisim and Pinocchio for Quadruped Simulation #2355

Closed Answered by kdyun0118
kdyun0118 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
I found that adding the derivative of the rotation matrix term resolved the errors.

Here's the corrected conversion function:

Eigen::VectorXd RaisimGaToPinocchioGa(Eigen::VectorXd raisim_gc,Eigen::VectorXd raisim_gv,Eigen::VectorXd raisim_ga){
  Eigen::VectorXd pin_ga;pin_ga.setZero(18);
  raisim::Mat<3,3> rot;raisim::quatToRotMat(raisim_gc.segment(3,4),rot);
  Eigen::Matrix3d Rot,dRot;
  Rot.setIdentity(); dRot.setIdentity();
  Rot = rot.e(); dRot = skewMat(raisim_gv.segment(3,3))*Rot;

  pin_ga.head(3) = Rot.transpose()*raisim_ga.head(3) + dRot.transpose()*raisim_gv.head(3); // world frame -> base local frame
  pin_ga.segment(3,3) = Rot.transpose()*raisim_ga.segment(3,3)+ dRot.tr…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kdyun0118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant