ADVRHumanoids / xbot2_examples

Examples and tutorials on the new XBot2 framework -- WIP
9 stars 4 forks source link

Taking only specific joints from urdf #8

Closed torydebra closed 3 years ago

torydebra commented 4 years ago

What we need for ROSEE is distinguish between actuated and not actuated joint. So, as very first step I am trying to figure out how to tell xbot2 to not take all the urdf joint, but take only the ones that I say. I am trying playing with yaml config file:

    joint_gz:
        names: [joint_that_I_want] 
        thread: rt_main  # allocate this device on rt_main thread
        type: joint 

but xbot2 always print all the joints:

info] Floating base model: FALSE
[info] Joint name: BASE__LFB1 RBDL ID: 0
[info] Joint name: LFB1__LFP1_1 RBDL ID: 1
[info] Joint name: LFP1_1__LFP1_2 RBDL ID: 2
[info] Joint name: LFP1_2__LFP1_3 RBDL ID: 3
[info] Joint name: BASE__LFB2 RBDL ID: 4
[info] Joint name: LFB2__LFP2_1 RBDL ID: 5
[info] Joint name: LFP2_1__LFP2_2 RBDL ID: 6
[info] Joint name: LFP2_2__LFP2_3 RBDL ID: 7
[info] Joint name: BASE__LFB3 RBDL ID: 8
[info] Joint name: LFB3__LFP3_1 RBDL ID: 9
[info] Joint name: LFP3_1__LFP3_2 RBDL ID: 10
[info] Joint name: LFP3_2__LFP3_3 RBDL ID: 11
[info] Joint name: BASE__SFB1 RBDL ID: 12
[info] Joint name: SFB1__SFP1_1 RBDL ID: 13
[info] Joint name: SFP1_1__SFP1_2 RBDL ID: 14

I am doing this because I want to use hal2 to communicate with real robot, then I want xbot2 to be aware of only the motors, due to the fact underactuated joints are not controllable neither observable. So my first step was to try move the motors of a hand.

I am also trying to enforcing the joint mapping:

XBotInterface:
  urdf_path: "config/heri_II.urdf"
  srdf_path: "config/heri_II.srdf"
  joint_map_path: "config/heri_II_joint_map.yaml"
joint_map:
  1: joint_that_I_want

unsuccesfully

PS what is the "type" node in joint_gz field?

alaurenzi commented 4 years ago

I would immediately make a distinction between joints used for robot motion, and a hand. The internal joints of a hand, to me, should be separated from the robot, and should be viewed only as an "implementation detail" of the hand. What's your opinion on this regard @liesrock ?

liesrock commented 4 years ago

So my idea on this is that the robot (seen as a collection of kinematic chains composed by joints - fixed, revolute, prismatic... - and links) and its end-effectors should be separated: so inside xbot2 we should have a device (container) for the joints that we use for the motion of the robot itself and some other devices implementing the end-effector capabilities (this can use a different fieldbus e.g. USB).

So I basically agree with @alaurenzi: the joints inside the end-effector should be part of the concrete device implementing the communication with the end-effector and should use/provide the API to the ROS End-Effector (non-RT) on top. The end-effector xbot2 Device can also be RT (e.g. for the HERI II / III mounted on our robots and using the EtherCAT communication).

torydebra commented 3 years ago

I close this for "deprecability", it was an old too generic question which I solved