How to get the axis of a revolute joint?
2352878630 opened this issue · comments
2352878630 commented
I want to get a Vector3
type variable that represents the axis of a revolute joint.
For example, in URDF file, I already have a joint with <axis xyz="1 0 0"/>
. Now I want to get a variable with a value of 1 0 0
and a type of Vector3
Thank you very much !
Justin Carpentier commented
Unfortunately, there is not yet a direct helper to extract it.
Yet, you can recover this information partially as follows:
import pinocchio as pin
joint_model = pin.JointModelRX()
joint_data = joint_model.createData()
axis = joint_data.S[3:]
@jorisv Will you have time to add the getMotionAxis
helper to all revolute and prismatic joints in Pinocchio and expose it to Python?