Closed DavidYaonanZhu closed 2 years ago
Could you provide a full example? I will provide a complete answer then
De: "DavidYaonanZhu" @.> À: "stack-of-tasks" @.> Cc: "Subscribed" @.***> Envoyé: Mardi 26 Avril 2022 08:45:02 Objet: [stack-of-tasks/pinocchio] Fixed joint in URDF seems being merged when loading model (Issue #1638)
Fixed joint in URDF seems to be merged when loading model.
I loaded a tiago dual arm robot URDF,
model = pinocchio.buildModelFromUrdf(self.urdf_filename) then, model.njoints it gives 34, however If I, model.getJointId("arm_left_tool_joint")
some of the joints give the same ID.
In addition, does this library support Jacobian acquisition of different base_link and tool_link, like KDL?
— Reply to this email directly, [ https://github.com/stack-of-tasks/pinocchio/issues/1638 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AAL6UVKIVQYGM4QKALEYHDTVG6GG5ANCNFSM5UKYVJIA | unsubscribe ] . You are receiving this because you are subscribed to this thread. Message ID: @.***>
In addition, does this library support Jacobian acquisition of different base_link and tool_link, like KDL?
I don't the API of KDL, but for sure, you can retrieve the Jacobian of any link with Pinocchio.
https://github.com/stack-of-tasks/pinocchio/issues/1638#issuecomment-1109464867
How to do that? can you give me some examples?
suppose the urdf is base_link - torso_link- arm_link1 - arm_link2 For example, I want to get jacobian from base_link to arm_link2, and also torso_link to arm_link1 how to do that?
with normal model loading it assumes the starting link of the jacobian is base_link, but how to change that starting link?
There is not direct tool in Pinocchio which allows that, but you can do that indirectly. Could you give the name of such a tool in KDL?
We will try to add it to the main API ;)
Yes, can you give some hints on how to do that indirectly?
I will update information of KDL tool shortly
You just need to collect the column indexes which are related to the joints supporting the path between the two links in questions
For a given joint, you can retrieve its starting index and the size of the motion subspace by using model.joints[joint_id].idx_v, model.joints[joint_id].nv
Fixed joint in URDF seems to be merged when loading model.
I loaded a tiago dual arm robot URDF,
model = pinocchio.buildModelFromUrdf(self.urdf_filename)
then,model.njoints
it gives 34, however If I,model.getJointId("arm_left_tool_joint")
some of the joints give the same ID.
In addition, does this library support Jacobian acquisition of different base_link and tool_link, like KDL?