Really appreciate for the efforts and work in creating and sharing this valuable repo with the robotics community! It has been a great resource for many developers and researchers!
Recently I have been reading and learning the code of ocs2. And I've just come across an tiny inconsistency in the way the angular velocities are represented in the code. Particularly when calculating the inverse dynamics per rnea() and the derivative of the centroidal momentum matrix Adot using Pinocchio library functions.
Hi ocs2 team,
Really appreciate for the efforts and work in creating and sharing this valuable repo with the robotics community! It has been a great resource for many developers and researchers!
Recently I have been reading and learning the code of ocs2. And I've just come across an tiny inconsistency in the way the angular velocities are represented in the code. Particularly when calculating the inverse dynamics per rnea() and the derivative of the centroidal momentum matrix Adot using Pinocchio library functions.
https://github.com/leggedrobotics/ocs2/blob/ebde452b10d0eceaac45364f7bb8f0ac1038b637/ocs2_pinocchio/ocs2_centroidal_model/src/CentroidalModelRbdConversions.cpp#L225
https://github.com/leggedrobotics/ocs2/blob/ebde452b10d0eceaac45364f7bb8f0ac1038b637/ocs2_pinocchio/ocs2_centroidal_model/src/CentroidalModelRbdConversions.cpp#L84
In computing the Adot, the vPinocchio is used as function input. The vPinocchio is defined in as follows, where base_orientation_zyx_derivatives is used to represent the change of base orientation. https://github.com/leggedrobotics/ocs2/blob/ebde452b10d0eceaac45364f7bb8f0ac1038b637/ocs2_pinocchio/ocs2_centroidal_model/include/ocs2_centroidal_model/CentroidalModelPinocchioMapping.h#L58
However, when computing the rnea(), the vDesired contains the base angular velocities expressed in the world frame, since it consists of the output from computeBaseKinematicsFromCentroidalModel(). https://github.com/leggedrobotics/ocs2/blob/ebde452b10d0eceaac45364f7bb8f0ac1038b637/ocs2_pinocchio/ocs2_centroidal_model/src/CentroidalModelRbdConversions.cpp#L186
https://github.com/leggedrobotics/ocs2/blob/ebde452b10d0eceaac45364f7bb8f0ac1038b637/ocs2_pinocchio/ocs2_centroidal_model/src/CentroidalModelRbdConversions.cpp#L82
I'm curious as to the convention used here. Is there something crucial I'm missing or some specific requirements related to the Pinocchio library?