From dbd3190760ff86299942a23721240a90939daf2f Mon Sep 17 00:00:00 2001 From: Martina Gloria <114698424+martinaxgloria@users.noreply.github.com> Date: Fri, 5 May 2023 17:57:36 +0200 Subject: [PATCH] Add waist_imu in urdf file (#99) --- urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml | 1 + .../conf/launch_wholebodydynamics_ecub.xml | 8 +++- .../data/ergocub/ERGOCUB_all_options.yaml | 45 ++++++++++++++++++- .../ERGOCUB_all_options_gazebo.yaml.in | 38 ++++++++++++++++ .../data/ergocub/conf/ergocub.xml | 1 + .../conf/gazebo_ergocub_waist_inertial.ini | 2 + .../inertials/waist-inertials_wrapper.xml | 17 +++++++ 7 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 urdf/simmechanics/data/ergocub/conf/gazebo_ergocub_waist_inertial.ini create mode 100644 urdf/simmechanics/data/ergocub/conf/wrappers/inertials/waist-inertials_wrapper.xml diff --git a/urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml b/urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml index 5975bda9..75a19224 100644 --- a/urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml +++ b/urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml @@ -57,6 +57,7 @@ left_arm-mc_wrapper head_inertial_hardware_device + waist_inertial_hardware_device ergocub_left_arm_ft ergocub_right_arm_ft diff --git a/urdf/ergoCub/conf/launch_wholebodydynamics_ecub.xml b/urdf/ergoCub/conf/launch_wholebodydynamics_ecub.xml index d5389ca5..ebf5b78c 100644 --- a/urdf/ergoCub/conf/launch_wholebodydynamics_ecub.xml +++ b/urdf/ergoCub/conf/launch_wholebodydynamics_ecub.xml @@ -39,8 +39,12 @@ /ergocubSim/head/inertials /wholeBodyDynamics/imu - - + + + /ergocubSim/waist/inertials + /wholeBodyDynamics/waist_imu + + /ergocubSim/left_arm diff --git a/urdf/simmechanics/data/ergocub/ERGOCUB_all_options.yaml b/urdf/simmechanics/data/ergocub/ERGOCUB_all_options.yaml index b6a931c2..2fb139d9 100644 --- a/urdf/simmechanics/data/ergocub/ERGOCUB_all_options.yaml +++ b/urdf/simmechanics/data/ergocub/ERGOCUB_all_options.yaml @@ -808,8 +808,7 @@ sensors: - | model://ergoCub/conf/gazebo_ergocub_inertial.ini - - + - sensorName: default exportFrameInURDF: No sensorType: "depth" @@ -937,6 +936,16 @@ sensors: model://ergoCub/conf/sensors/gazebo_ergocub_lidar.ini +assignedMasses: + torso_1 : 2.0645667 + +assignedInertias: + # This is due to https://github.com/robotology/icub-models/issues/33 + - linkName: torso_1 + xx: 0.0074060860 + yy: 0.0059470733 + zz: 0.0031780111 + assignedColors: root_link : [0.70, 0.70, 0.70, 1] torso_1 : [0.70, 0.70, 0.70, 1] @@ -1018,6 +1027,38 @@ reverseRotationAxis: # neck_yaw XMLBlobs: + # imu waist (workaround since simmechanics was not updated) + - | + + - | + + + + + + + - | + + + model://ergoCub/conf/gazebo_ergocub_waist_inertial.ini + + + - | + + + 1 + 100 + 0.0354497 0.00639688 0.060600 -1.5707322 1.5707963 0 + + model://ergoCub/conf/gazebo_ergocub_waist_inertial.ini + + + + - | + + + + # upperbody - | diff --git a/urdf/simmechanics/data/ergocub/ERGOCUB_all_options_gazebo.yaml.in b/urdf/simmechanics/data/ergocub/ERGOCUB_all_options_gazebo.yaml.in index 70899f37..6b967edd 100644 --- a/urdf/simmechanics/data/ergocub/ERGOCUB_all_options_gazebo.yaml.in +++ b/urdf/simmechanics/data/ergocub/ERGOCUB_all_options_gazebo.yaml.in @@ -936,9 +936,15 @@ sensors: @ASSIGNED_COLLISION_GEOMETRIES@ +assignedMasses: + torso_1 : 2.0645667 assignedInertias: # This is due to https://github.com/robotology/icub-models/issues/33 + - linkName: torso_1 + xx: 0.0074060860 + yy: 0.0059470733 + zz: 0.0031780111 - linkName: realsense xx: 0.01 yy: 0.01 @@ -1216,6 +1222,38 @@ reverseRotationAxis: # neck_yaw XMLBlobs: + # imu waist (workaround since simmechanics was not updated) + - | + + - | + + + + + + + - | + + + model://ergoCub/conf/gazebo_ergocub_waist_inertial.ini + + + - | + + + 1 + 100 + 0.0354497 0.00639688 0.060600 -1.5707322 1.5707963 0 + + model://ergoCub/conf/gazebo_ergocub_waist_inertial.ini + + + + - | + + + + # upperbody - | diff --git a/urdf/simmechanics/data/ergocub/conf/ergocub.xml b/urdf/simmechanics/data/ergocub/conf/ergocub.xml index 252e8706..28a89503 100644 --- a/urdf/simmechanics/data/ergocub/conf/ergocub.xml +++ b/urdf/simmechanics/data/ergocub/conf/ergocub.xml @@ -31,6 +31,7 @@ + diff --git a/urdf/simmechanics/data/ergocub/conf/gazebo_ergocub_waist_inertial.ini b/urdf/simmechanics/data/ergocub/conf/gazebo_ergocub_waist_inertial.ini new file mode 100644 index 00000000..1c03fc88 --- /dev/null +++ b/urdf/simmechanics/data/ergocub/conf/gazebo_ergocub_waist_inertial.ini @@ -0,0 +1,2 @@ +disableImplicitNetworkWrapper +yarpDeviceName waist_inertial_hardware_device \ No newline at end of file diff --git a/urdf/simmechanics/data/ergocub/conf/wrappers/inertials/waist-inertials_wrapper.xml b/urdf/simmechanics/data/ergocub/conf/wrappers/inertials/waist-inertials_wrapper.xml new file mode 100644 index 00000000..38101a19 --- /dev/null +++ b/urdf/simmechanics/data/ergocub/conf/wrappers/inertials/waist-inertials_wrapper.xml @@ -0,0 +1,17 @@ + + + + + + 10 + ${portprefix}/waist/inertials + + + + + waist_inertial_hardware_device + + + + + \ No newline at end of file