Skip to content

Commit

Permalink
iCub3: add realsense imu (#187)
Browse files Browse the repository at this point in the history
* icub3: add imu in the realsense in the chest

* tests: fix cmake deprecation warning
  • Loading branch information
Nicogene authored Dec 7, 2020
1 parent 95f0079 commit 36a8ac4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
12 changes: 11 additions & 1 deletion simmechanics/data/icub3/ICUB_3_all_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,17 @@ sensors:
<plugin name="iCub_yarp_gazebo_plugin_camera" filename="libgazebo_yarp_camera.so">
<yarpConfigurationFile>model://iCub/conf_icub3/gazebo_icub_rgb_camera.ini</yarpConfigurationFile>
</plugin>
# According to https://github.com/IntelRealSense/realsense-ros/issues/927 in the realsense
# the imu measurements are referred to the depth frame.
- frameName: SCSYS_CHEST_DEPTH
linkName: chest
sensorName: chest_imu_acc_1x1
sensorType: "accelerometer"
sensorBlobs:
- |
<plugin name="iCub_yarp_gazebo_plugin_IMU" filename="libgazebo_yarp_imu.so">
<yarpConfigurationFile>model://iCub/conf_icub3/gazebo_icub_chest_inertial.ini</yarpConfigurationFile>
</plugin>
assignedMasses:
# It fixes the right/left asymmetry for the legs
r_hip_1: 2.48546
Expand Down
13 changes: 13 additions & 0 deletions simmechanics/data/icub3/ICUB_3_all_options_gazebo.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,19 @@ sensors:
<plugin name="iCub_yarp_gazebo_plugin_camera" filename="libgazebo_yarp_camera.so">
<yarpConfigurationFile>model://iCub/conf_icub3/gazebo_icub_rgb_camera.ini</yarpConfigurationFile>
</plugin>
# According to https://github.com/IntelRealSense/realsense-ros/issues/927 in the realsense
# the imu measurements are referred to the depth frame.
- frameName: SCSYS_CHEST_DEPTH
linkName: chest
sensorName: chest_imu_acc_1x1
sensorType: "accelerometer"
sensorBlobs:
- |
<plugin name="iCub_yarp_gazebo_plugin_IMU" filename="libgazebo_yarp_imu.so">
<yarpConfigurationFile>model://iCub/conf_icub3/gazebo_icub_chest_inertial.ini</yarpConfigurationFile>
</plugin>



@ASSIGNED_COLLISION_GEOMETRIES@

Expand Down
14 changes: 14 additions & 0 deletions simmechanics/data/icub3/conf/gazebo_icub_chest_inertial.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[include "gazebo_icub_robotname.ini"]

[WRAPPER]
device multipleanalogsensorsserver
name /${gazeboYarpPluginsRobotName}/chest/inertials
period 10

[ADDITIONAL_WRAPPER]
device inertial
name /${gazeboYarpPluginsRobotName}/chest/inertial
period 0.01

[IMU_DRIVER]
device gazebo_imu
3 changes: 1 addition & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ find_package(iDynTree REQUIRED)
find_package(YARP REQUIRED)

add_executable(icub-model-test icub-model-test.cpp)
include_directories(${YARP_INCLUDE_DIRS})
target_link_libraries(icub-model-test ${iDynTree_LIBRARIES} ${YARP_LIBRARIES})
target_link_libraries(icub-model-test ${iDynTree_LIBRARIES} YARP::YARP_os)

macro(add_icub_model_test yarpRobotName)
add_test(NAME ${yarpRobotName}ConsistencyCheck
Expand Down

0 comments on commit 36a8ac4

Please sign in to comment.