Skip to content

Commit

Permalink
Fix ros2 xml after ft refactoring + real robot alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Jun 15, 2023
1 parent 92cb8c4 commit 159cc87
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 45 deletions.
12 changes: 5 additions & 7 deletions urdf/ergoCub/conf/ergocub_ros2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
<xi:include href="wrappers/motorControl/all-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/all-mc_remapper_ros2.xml" />
<!-- ANALOG SENSORS FT -->
<xi:include href="wrappers/FT/left_foot-FT_remapper.xml" />
<xi:include href="wrappers/FT/right_foot-FT_remapper.xml" />
<xi:include href="wrappers/FT/left_foot-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_foot-FT_wrapper.xml" />
<xi:include href="wrappers/FT/left_leg-FT_remapper.xml" />
<xi:include href="wrappers/FT/right_leg-FT_remapper.xml" />
<xi:include href="wrappers/FT/left_leg-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_leg-FT_wrapper.xml" />
<xi:include href="wrappers/FT/left_arm-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_arm-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_leg_hip-FT_wrapper.xml" />
<xi:include href="wrappers/FT/left_leg_hip-FT_wrapper.xml" />

<!-- INERTIAL SENSOR-->
<xi:include href="wrappers/inertials/head-inertials_wrapper.xml" />
Expand All @@ -40,6 +38,6 @@
<xi:include href="sensors/rgbd_camera_wrapper_ros2.xml" />
<xi:include href="sensors/lidar_wrapper.xml" />
<xi:include href="sensors/lidar_wrapper_ros2.xml" />

</devices>
</robot>
28 changes: 9 additions & 19 deletions urdf/ergoCub/conf/wrappers/motorControl/all-mc_remapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints_mc" type="controlboardremapper">
<paramlist name="networks">
<elem name="head_joints1">( 0 3 0 3 )</elem>
<elem name="left_arm_joints1">( 4 10 0 6 )</elem>
<elem name="left_arm_joints2">( 11 16 0 5 )</elem>
<elem name="right_arm_joints1">( 17 23 0 6 )</elem>
<elem name="right_arm_joints2">( 24 29 0 5 )</elem>
<elem name="torso_joints">( 30 31 0 1 )</elem>
<elem name="left_leg_joints1">( 32 37 0 5 )</elem>
<elem name="right_leg_joints1">( 38 43 0 5 )</elem>
</paramlist>
<!-- These are the parameters with torso_pitch removed -->
<param name="axesNames">(neck_pitch,neck_roll,neck_yaw,camera_tilt,l_shoulder_pitch,l_shoulder_roll,l_shoulder_yaw,l_elbow,l_wrist_yaw,l_wrist_roll,l_wrist_pitch,l_thumb_add,l_thumb_oc,l_index_add,l_index_oc,l_middle_oc,l_ring_pinky_oc,r_shoulder_pitch,r_shoulder_roll,r_shoulder_yaw,r_elbow,r_wrist_yaw,r_wrist_roll,r_wrist_pitch,r_thumb_add,r_thumb_oc,r_index_add,r_index_oc,r_middle_oc,r_ring_pinky_oc,torso_roll,torso_yaw,l_hip_pitch,l_hip_roll,l_hip_yaw,l_knee,l_ankle_pitch,l_ankle_roll,r_hip_pitch,r_hip_roll,r_hip_yaw,r_knee,r_ankle_pitch,r_ankle_roll)</param>
<param name="period"> 0.010 </param>
<param name="joints"> 44 </param>
<action phase="startup" level="5" type="attach">
<action phase="startup" level="6" type="attach">
<paramlist name="networks">
<elem name="head_joints1">head_hardware_device</elem>
<elem name="left_arm_joints1">left_arm_hardware_device</elem>
<elem name="left_arm_joints2">left_hand_hardware_device</elem>
<elem name="right_arm_joints1">right_arm_hardware_device</elem>
<elem name="right_arm_joints2">right_hand_hardware_device</elem>
<elem name="torso_joints">torso_hardware_device</elem>
<elem name="left_leg_joints1">left_leg-mc_remapper</elem>
<elem name="right_leg_joints1">right_leg-mc_remapper</elem>
<elem name="head_joints"> head-mc_remapper </elem>
<elem name="left_arm_joints"> left_arm-mc_remapper</elem>
<elem name="right_arm_joints"> right_arm-mc_remapper </elem>
<elem name="torso_joints"> torso-mc_remapper </elem>
<elem name="left_leg_joints"> left_leg-mc_remapper </elem>
<elem name="right_leg_joints"> right_leg-mc_remapper </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach" />
Expand Down
43 changes: 43 additions & 0 deletions urdf/simmechanics/data/ergocub/conf/ergocub_ros2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<robot name="ergocubGazebo" build="1" portprefix="/ergocubSim" xmlns:xi="http://www.w3.org/2001/XInclude">

<devices>

<!-- MOTOR CONTROLLERS -->
<xi:include href="wrappers/motorControl/left_arm-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/left_leg-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/right_leg-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/head-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/torso-mc_wrapper.xml" />

<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/left_leg-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/right_leg-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/head-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/torso-mc_remapper.xml" />

<xi:include href="wrappers/motorControl/all-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/all-mc_remapper_ros2.xml" />
<!-- ANALOG SENSORS FT -->
<xi:include href="wrappers/FT/left_leg-FT_remapper.xml" />
<xi:include href="wrappers/FT/right_leg-FT_remapper.xml" />
<xi:include href="wrappers/FT/left_leg-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_leg-FT_wrapper.xml" />
<xi:include href="wrappers/FT/left_arm-FT_wrapper.xml" />
<xi:include href="wrappers/FT/right_arm-FT_wrapper.xml" />

<!-- INERTIAL SENSOR-->
<xi:include href="wrappers/inertials/head-inertials_wrapper.xml" />

<!-- HEAD SENSORS -->
<xi:include href="sensors/rgbd_camera_wrapper.xml" />
<xi:include href="sensors/rgbd_camera_wrapper_ros2.xml" />
<xi:include href="sensors/lidar_wrapper.xml" />
<xi:include href="sensors/lidar_wrapper_ros2.xml" />

</devices>
</robot>
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints_mc" type="controlboardremapper">
<paramlist name="networks">
<elem name="head_joints1">( 0 3 0 3 )</elem>
<elem name="left_arm_joints1">( 4 10 0 6 )</elem>
<elem name="left_arm_joints2">( 11 16 0 5 )</elem>
<elem name="right_arm_joints1">( 17 23 0 6 )</elem>
<elem name="right_arm_joints2">( 24 29 0 5 )</elem>
<elem name="torso_joints">( 30 31 0 1 )</elem>
<elem name="left_leg_joints1">( 32 37 0 5 )</elem>
<elem name="right_leg_joints1">( 38 43 0 5 )</elem>
</paramlist>
<!-- These are the parameters with torso_pitch removed -->
<param name="axesNames">(neck_pitch,neck_roll,neck_yaw,camera_tilt,l_shoulder_pitch,l_shoulder_roll,l_shoulder_yaw,l_elbow,l_wrist_yaw,l_wrist_roll,l_wrist_pitch,l_thumb_add,l_thumb_oc,l_index_add,l_index_oc,l_middle_oc,l_ring_pinky_oc,r_shoulder_pitch,r_shoulder_roll,r_shoulder_yaw,r_elbow,r_wrist_yaw,r_wrist_roll,r_wrist_pitch,r_thumb_add,r_thumb_oc,r_index_add,r_index_oc,r_middle_oc,r_ring_pinky_oc,torso_roll,torso_yaw,l_hip_pitch,l_hip_roll,l_hip_yaw,l_knee,l_ankle_pitch,l_ankle_roll,r_hip_pitch,r_hip_roll,r_hip_yaw,r_knee,r_ankle_pitch,r_ankle_roll)</param>
<param name="period"> 0.010 </param>
<param name="joints"> 44 </param>
<action phase="startup" level="5" type="attach">
<action phase="startup" level="6" type="attach">
<paramlist name="networks">
<elem name="head_joints1">head_hardware_device</elem>
<elem name="left_arm_joints1">left_arm_hardware_device</elem>
<elem name="left_arm_joints2">left_hand_hardware_device</elem>
<elem name="right_arm_joints1">right_arm_hardware_device</elem>
<elem name="right_arm_joints2">right_hand_hardware_device</elem>
<elem name="torso_joints">torso_hardware_device</elem>
<elem name="left_leg_joints1">left_leg-mc_remapper</elem>
<elem name="right_leg_joints1">right_leg-mc_remapper</elem>
<elem name="head_joints"> head-mc_remapper </elem>
<elem name="left_arm_joints"> left_arm-mc_remapper</elem>
<elem name="right_arm_joints"> right_arm-mc_remapper </elem>
<elem name="torso_joints"> torso-mc_remapper </elem>
<elem name="left_leg_joints"> left_leg-mc_remapper </elem>
<elem name="right_leg_joints"> right_leg-mc_remapper </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach" />
Expand Down

0 comments on commit 159cc87

Please sign in to comment.