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

Generalized velocity of the floating base #2177

Closed
thuuzi opened this issue Mar 19, 2024 · 7 comments
Closed

Generalized velocity of the floating base #2177

thuuzi opened this issue Mar 19, 2024 · 7 comments

Comments

@thuuzi
Copy link

thuuzi commented Mar 19, 2024

Hi,

After reviewing the discussion in #1137, I understand that the velocity of the floating base is typically represented in the LOCAL frame. However, when I replaced a free flyer joint with a combination of JointModelTranslation() and JointModelSphericalZYX(), it appeared that the velocity is instead expressed in the WORLD frame.

To clarify my confusion, I have outputted the Jacobian Matrix in the LOCAL_WORLD_ALIGNED frame, where the section corresponding to the floating base velocity consistently turns out to be a 3x3 identity matrix.Could you please confirm it?

Thank you in advance for your clarification.

@jcarpent
Copy link
Contributor

Could you provide a short Python example to understand what you did exactly?

@thuuzi
Copy link
Author

thuuzi commented Mar 19, 2024

Could you provide a short Python example to understand what you did exactly?

Yes.Here's a pseudocode snippet in C++ to illustrate the issue. First, I construct a floating base model as follows:

pinocchio::JointModelComposite rootJoint(2); rootJoint.addJoint(pinocchio::JointModelTranslation()); rootJoint.addJoint(pinocchio::JointModelSphericalZYX()); pinocchio::urdf::buildModel(my_model_urdf_path, rootJoint, my_model);

then I get the Jacobian Jac

pinocchio::getFrameJacobian(my_model, data, ee_link_number, pinocchio::LOCAL_WORLD_ALIGNED, Jac); Eigen::Matrix3d Jac_v = Jac.topLeftCorner<3, 3>();

I find Jac_v was always an identity matrix. It's corresponding to linear velocity part of the floating base. If the velocity is represented in the LOCAL frame, Jac_v should vary with the floating base pose but it' didn't. So I think the floating base velocity is instead represented in the WORLD frame.

@jcarpent
Copy link
Contributor

Could you give us the value of the configuration vector associated with the FF?

@thuuzi
Copy link
Author

thuuzi commented Mar 19, 2024

Could you give us the value of the configuration vector associated with the FF?

Actually I have tried many configurations randomly, results are the same. And other parts of the jacobian are correct. I just want to know whether the generalized velocity of the floating base is represented in WORLD frame when the root joints are JointModelTranslation() and JointModelSphericalZYX(). Could you clarify this for me?

@fabinsch
Copy link
Contributor

hi @thuuzi, after several discussions we have recently merged a python script in #2143 that could help you. You can easily extend it to have a combination of JointModelTranslation and JointModelSphericalZYX as root joint and visualize it.

@thuuzi
Copy link
Author

thuuzi commented Mar 19, 2024

really appreciate it

@thuuzi
Copy link
Author

thuuzi commented Mar 20, 2024

After test, the floating base velocity is represented in the WORLD frame with JointModelTranslation and JointModelSphericalZYX as root joint

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

3 participants