From be3969ffd8d06f5d7e3b50593d3b88582fb235a1 Mon Sep 17 00:00:00 2001 From: Nicogene Date: Wed, 7 Dec 2022 16:17:34 +0100 Subject: [PATCH 1/3] icub3: add xml files for running mc ros2 nws --- simmechanics/data/icub3/conf/icub_ROS2.xml | 39 +++++++++++++++++++ .../motorControl/alljoints-mc_nws_ros2.xml | 11 ++++++ .../motorControl/alljoints-mc_remapper.xml | 25 ++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 simmechanics/data/icub3/conf/icub_ROS2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_remapper.xml diff --git a/simmechanics/data/icub3/conf/icub_ROS2.xml b/simmechanics/data/icub3/conf/icub_ROS2.xml new file mode 100644 index 0000000..cd6862d --- /dev/null +++ b/simmechanics/data/icub3/conf/icub_ROS2.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_nws_ros2.xml new file mode 100644 index 0000000..be79410 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_nws_ros2.xml @@ -0,0 +1,11 @@ + + + + + icub_cb_node + /joint_states + + alljoints-mc_remapper + + + diff --git a/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_remapper.xml b/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_remapper.xml new file mode 100644 index 0000000..9c9e1b9 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/motorControl/alljoints-mc_remapper.xml @@ -0,0 +1,25 @@ + + + + + + ( 0 2 0 2 ) + ( 3 9 0 6 ) + ( 10 16 0 6 ) + ( 17 19 0 2 ) + ( 20 25 0 5 ) + ( 26 31 0 5 ) + + 32 + + + head-mc_remapper + left_arm-mc_remapper + right_arm-mc_remapper + torso-mc_remapper + left_leg-mc_remapper + right_leg-mc_remapper + + + + \ No newline at end of file From 4b7f077e5420938a35dc7deed22fb2e183b6265d Mon Sep 17 00:00:00 2001 From: Nicogene Date: Fri, 16 Dec 2022 17:01:38 +0100 Subject: [PATCH 2/3] icub3: add ROS2 nws it requires https://github.com/robotology/simmechanics-to-urdf/pull/53 --- .../ICUB_2-5_BB_simmechanics_options.yaml.in | 6 ---- .../data/icub3/ICUB_3_all_options.yaml | 18 ++++++++-- .../icub3/ICUB_3_all_options_gazebo.yaml.in | 36 +++++++++++++------ simmechanics/data/icub3/conf/icub_ROS2.xml | 8 +++++ .../conf/wrappers/FT/left_arm-FT_nws_ros2.xml | 18 ++++++++++ .../wrappers/FT/left_foot-FT_nws_ros2.xml | 18 ++++++++++ .../wrappers/FT/left_foot-FT_remapper.xml | 4 +-- .../wrappers/FT/left_leg_hip-FT_nws_ros2.xml | 18 ++++++++++ .../wrappers/FT/left_leg_hip-FT_wrapper.xml | 2 +- .../wrappers/FT/right_arm-FT_nws_ros2.xml | 18 ++++++++++ .../conf/wrappers/FT/right_arm-FT_wrapper.xml | 2 +- .../wrappers/FT/right_foot-FT_nws_ros2.xml | 18 ++++++++++ .../wrappers/FT/right_foot-FT_remapper.xml | 4 +-- .../wrappers/FT/right_foot-FT_wrapper.xml | 2 +- .../wrappers/FT/right_leg_hip-FT_nws_ros2.xml | 18 ++++++++++ .../wrappers/FT/right_leg_hip-FT_wrapper.xml | 2 +- 16 files changed, 166 insertions(+), 26 deletions(-) create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/left_arm-FT_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_nws_ros2.xml create mode 100644 simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_nws_ros2.xml diff --git a/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in b/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in index afb99cb..975d640 100644 --- a/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in +++ b/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in @@ -595,7 +595,6 @@ linkFrames: forceTorqueSensors: - jointName: l_leg_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | @@ -603,7 +602,6 @@ forceTorqueSensors: - jointName: r_leg_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | @@ -611,7 +609,6 @@ forceTorqueSensors: - jointName: l_foot_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | @@ -619,7 +616,6 @@ forceTorqueSensors: - jointName: r_foot_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | @@ -627,7 +623,6 @@ forceTorqueSensors: - jointName: l_arm_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | @@ -635,7 +630,6 @@ forceTorqueSensors: - jointName: r_arm_ft_sensor directionChildToParent: Yes - exportFrameInURDF: Yes sensorBlobs: - | diff --git a/simmechanics/data/icub3/ICUB_3_all_options.yaml b/simmechanics/data/icub3/ICUB_3_all_options.yaml index 128f5d8..826e015 100644 --- a/simmechanics/data/icub3/ICUB_3_all_options.yaml +++ b/simmechanics/data/icub3/ICUB_3_all_options.yaml @@ -120,8 +120,6 @@ linkFrames: frameName: SCSYS_L_SHOULDER_3 - linkName: l_upper_arm frameName: SCSYS_L_UPPERARM - - linkName: r_shoulder_2 - frameName: SCSYS_R_SHOULDER_2_FT - linkName: r_shoulder_1 frameName: SCSYS_R_SHOULDER_1 - linkName: r_shoulder_2 @@ -225,6 +223,8 @@ forceTorqueSensors: exportFrameInURDF: Yes frame: sensor frameName: SCSYS_L_SHOULDER_2_FT + linkName: l_shoulder_2 + sensorName: l_arm_ft sensorBlobs: - | @@ -235,6 +235,8 @@ forceTorqueSensors: exportFrameInURDF: Yes frame: sensor frameName: SCSYS_R_SHOULDER_2_FT + linkName: r_shoulder_2 + sensorName: r_arm_ft sensorBlobs: - | @@ -245,7 +247,9 @@ forceTorqueSensors: directionChildToParent: Yes exportFrameInURDF: Yes frame: sensor + linkName: l_hip_2 frameName: SCSYS_L_HIP_2_FT + sensorName: l_leg_ft sensorBlobs: - | @@ -255,7 +259,9 @@ forceTorqueSensors: directionChildToParent: No exportFrameInURDF: Yes frame: sensor + linkName: l_ankle_2 frameName: SCSYS_L_ANKLE_2_FT_FRONT + sensorName: l_foot_front_ft sensorBlobs: - | @@ -265,7 +271,9 @@ forceTorqueSensors: directionChildToParent: No exportFrameInURDF: Yes frame: sensor + linkName: l_ankle_2 frameName: SCSYS_L_ANKLE_2_FT_REAR + sensorName: l_foot_rear_ft sensorBlobs: - | @@ -276,7 +284,9 @@ forceTorqueSensors: directionChildToParent: Yes exportFrameInURDF: Yes frame: sensor + linkName: r_hip_2 frameName: SCSYS_R_HIP_2_FT + sensorName: r_leg_ft sensorBlobs: - | @@ -286,7 +296,9 @@ forceTorqueSensors: directionChildToParent: No exportFrameInURDF: Yes frame: sensor + linkName: r_ankle_2 frameName: SCSYS_R_ANKLE_2_FT_FRONT + sensorName: r_foot_front_ft sensorBlobs: - | @@ -296,7 +308,9 @@ forceTorqueSensors: directionChildToParent: No exportFrameInURDF: Yes frame: sensor + linkName: r_ankle_2 frameName: SCSYS_R_ANKLE_2_FT_REAR + sensorName: r_foot_rear_ft sensorBlobs: - | diff --git a/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in b/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in index ab2f68e..3c9b0db 100644 --- a/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in +++ b/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in @@ -219,9 +219,11 @@ forceTorqueSensors: # upperbody - jointName: l_arm_ft_sensor directionChildToParent: Yes + exportFrameInURDF: Yes frame: sensor frameName: SCSYS_L_SHOULDER_2_FT - exportFrameInURDF: Yes + linkName: l_shoulder_2 + sensorName: l_arm_ft sensorBlobs: - | @@ -229,9 +231,11 @@ forceTorqueSensors: - jointName: r_arm_ft_sensor directionChildToParent: Yes + exportFrameInURDF: Yes frame: sensor frameName: SCSYS_R_SHOULDER_2_FT - exportFrameInURDF: Yes + linkName: r_shoulder_2 + sensorName: r_arm_ft sensorBlobs: - | @@ -240,9 +244,11 @@ forceTorqueSensors: # left leg - jointName: l_leg_ft_sensor directionChildToParent: Yes + exportFrameInURDF: Yes frame: sensor + linkName: l_hip_2 frameName: SCSYS_L_HIP_2_FT - exportFrameInURDF: Yes + sensorName: l_leg_ft sensorBlobs: - | @@ -250,9 +256,11 @@ forceTorqueSensors: - jointName: l_foot_front_ft_sensor directionChildToParent: No + exportFrameInURDF: Yes frame: sensor + linkName: l_ankle_2 frameName: SCSYS_L_ANKLE_2_FT_FRONT - exportFrameInURDF: Yes + sensorName: l_foot_front_ft sensorBlobs: - | @@ -260,9 +268,11 @@ forceTorqueSensors: - jointName: l_foot_rear_ft_sensor directionChildToParent: No + exportFrameInURDF: Yes frame: sensor + linkName: l_ankle_2 frameName: SCSYS_L_ANKLE_2_FT_REAR - exportFrameInURDF: Yes + sensorName: l_foot_rear_ft sensorBlobs: - | @@ -271,9 +281,11 @@ forceTorqueSensors: # right leg - jointName: r_leg_ft_sensor directionChildToParent: Yes + exportFrameInURDF: Yes frame: sensor + linkName: r_hip_2 frameName: SCSYS_R_HIP_2_FT - exportFrameInURDF: Yes + sensorName: r_leg_ft sensorBlobs: - | @@ -281,9 +293,11 @@ forceTorqueSensors: - jointName: r_foot_front_ft_sensor directionChildToParent: No + exportFrameInURDF: Yes frame: sensor + linkName: r_ankle_2 frameName: SCSYS_R_ANKLE_2_FT_FRONT - exportFrameInURDF: Yes + sensorName: r_foot_front_ft sensorBlobs: - | @@ -291,9 +305,11 @@ forceTorqueSensors: - jointName: r_foot_rear_ft_sensor directionChildToParent: No + exportFrameInURDF: Yes frame: sensor + linkName: r_ankle_2 frameName: SCSYS_R_ANKLE_2_FT_REAR - exportFrameInURDF: Yes + sensorName: r_foot_rear_ft sensorBlobs: - | @@ -459,7 +475,7 @@ assignedMasses: neck_2 : 0.1214 neck_3 : 0.18386 head : 1.8728 - + assignedInertias: # This is due to https://github.com/robotology/icub-models/issues/33 - linkName: r_shoulder_1 @@ -931,6 +947,6 @@ XMLBlobs: - | - model://iCub/conf_icub3/icub.xml + model://iCub/conf_icub3/icub_ROS2.xml diff --git a/simmechanics/data/icub3/conf/icub_ROS2.xml b/simmechanics/data/icub3/conf/icub_ROS2.xml index cd6862d..f04568d 100644 --- a/simmechanics/data/icub3/conf/icub_ROS2.xml +++ b/simmechanics/data/icub3/conf/icub_ROS2.xml @@ -35,5 +35,13 @@ + + + + + + + --> + diff --git a/simmechanics/data/icub3/conf/wrappers/FT/left_arm-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/left_arm-FT_nws_ros2.xml new file mode 100644 index 0000000..52d6853 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/left_arm-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /left_arm_ft + icub_left_arm_ft + 0.1 + + + + + icub_left_arm_ft + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_nws_ros2.xml new file mode 100644 index 0000000..0dfcd71 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /left_foot_ft + icub_left_foot_ft + 0.1 + + + + + left_foot-FT_remapper + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_remapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_remapper.xml index 77d9157..4e17d1c 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_remapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/left_foot-FT_remapper.xml @@ -3,8 +3,8 @@ - (l_foot_rear_ft_sensor - l_foot_front_ft_sensor) + (l_foot_rear_ft + l_foot_front_ft) diff --git a/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_nws_ros2.xml new file mode 100644 index 0000000..ca2c18e --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /left_leg_hip_ft + icub_left_leg_hip_ft + 0.1 + + + + + icub_left_leg_ft + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_wrapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_wrapper.xml index 3932c71..07edf7b 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_wrapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/left_leg_hip-FT_wrapper.xml @@ -5,7 +5,7 @@ 10 ${portprefix}/left_leg_hip - + icub_left_leg_ft diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_nws_ros2.xml new file mode 100644 index 0000000..ae7dbe6 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /right_arm_ft + icub_right_arm_ft + 0.1 + + + + + icub_right_arm_ft + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_wrapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_wrapper.xml index 4297176..2220e0b 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_wrapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_arm-FT_wrapper.xml @@ -5,7 +5,7 @@ 10 ${portprefix}/right_arm - + icub_right_arm_ft diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_nws_ros2.xml new file mode 100644 index 0000000..62edc2e --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /right_foot_ft + icub_right_foot_ft + 0.1 + + + + + right_foot-FT_remapper + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_remapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_remapper.xml index ef0dc86..6958837 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_remapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_remapper.xml @@ -3,8 +3,8 @@ - (r_foot_rear_ft_sensor - r_foot_front_ft_sensor) + (r_foot_rear_ft + r_foot_front_ft) diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_wrapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_wrapper.xml index 2f46b83..aa68ba4 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_wrapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_foot-FT_wrapper.xml @@ -5,7 +5,7 @@ 10 ${portprefix}/right_foot_heel_tiptoe - + right_foot-FT_remapper diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_nws_ros2.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_nws_ros2.xml new file mode 100644 index 0000000..26f9287 --- /dev/null +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_nws_ros2.xml @@ -0,0 +1,18 @@ + + + + + + /right_leg_hip_ft + icub_right_leg_hip_ft + 0.1 + + + + + icub_right_leg_ft + + + + + \ No newline at end of file diff --git a/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_wrapper.xml b/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_wrapper.xml index d5a405b..820e527 100644 --- a/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_wrapper.xml +++ b/simmechanics/data/icub3/conf/wrappers/FT/right_leg_hip-FT_wrapper.xml @@ -5,7 +5,7 @@ 10 ${portprefix}/right_leg_hip - + icub_right_leg_ft From 810044abaa18f5456895c507e477867c52a4f927 Mon Sep 17 00:00:00 2001 From: Nicogene Date: Thu, 22 Dec 2022 10:13:56 +0100 Subject: [PATCH 3/3] Restore icub.xml --- simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in b/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in index 3c9b0db..cbd90fa 100644 --- a/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in +++ b/simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in @@ -947,6 +947,6 @@ XMLBlobs: - | - model://iCub/conf_icub3/icub_ROS2.xml + model://iCub/conf_icub3/icub.xml