Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in using derivatives of ZYX Euler angle vs. angular velocity in rnea() and dccrba() of Pinocchio #71

Open
YangLiu-tum opened this issue Apr 12, 2023 · 0 comments

Comments

@YangLiu-tum
Copy link

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.

return pinocchio::rnea(model, data, qDesired, vDesired, aAugmented, fextDesired);

const auto Adot = pinocchio::dccrba(model, data, qPinocchio, vPinocchio);

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.

* Pinocchio Joint Velocities: vPinocchio = [ base_linear_velocity, base_orientation_zyx_derivatives, joint_velocities ]'

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().

vDesired << desiredBaseVelocity, centroidal_model::getJointVelocities(desiredInput, info);

baseVelocity.tail<3>() = getGlobalAngularVelocityFromEulerAnglesZyxDerivatives<scalar_t>(baseOrientation, derivativeEulerAnglesZyx);

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant