Skip to content

Commit e50f538

Browse files
committed
Support joints publishing on ROS 2 for iCubGazeboV2_5_visuomanip
1 parent 9f5e04b commit e50f538

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo
55

66
## [Unreleased]
77

8+
### Changed
9+
* Enable publishing of robot joints in ROS 2 via `controlBoard_nws_ros2` for `iCubGazeboV2_5_visuomanip` (https://github.com/robotology/icub-models/pull/211).
10+
811
# [2.3.0] - 2023-09-11
912

1013
### Fixed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
3+
4+
<robot name="iCubGazeboV3" build="1" portprefix="/icubSim" xmlns:xi="http://www.w3.org/2001/XInclude">
5+
<devices>
6+
7+
<!-- MOTOR CONTROLLERS -->
8+
9+
<!-- wrapper are all inherited from automatically generated models -->
10+
<xi:include href="../../../iCub/conf/wrappers/motorControl/torso-mc_wrapper.xml" />
11+
<xi:include href="../../../iCub/conf/wrappers/motorControl/head-mc_wrapper.xml" />
12+
<xi:include href="../../../iCub/conf/wrappers/motorControl/left_arm-mc_wrapper.xml" />
13+
<xi:include href="../../../iCub/conf/wrappers/motorControl/right_arm-mc_wrapper.xml" />
14+
15+
<!-- only the torso remapper is inherited from automatically generated models -->
16+
<xi:include href="../../../iCub/conf/wrappers/motorControl/torso-mc_remapper.xml" />
17+
18+
<!-- all the other remappers are specific to this model due to eyes and fingers -->
19+
<xi:include href="wrappers/motorControl/head-mc_remapper.xml" />
20+
<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" />
21+
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" />
22+
<!-- -->
23+
24+
<!-- HEAD SENSORS -->
25+
26+
<xi:include href="wrappers/camera/left_camera-rgbd_wrapper.xml" />
27+
<xi:include href="wrappers/camera/right_camera-rgb_wrapper.xml" />
28+
29+
<!-- -->
30+
31+
<!-- INERTIAL SENSORS -->
32+
33+
<!-- this wrapper is inherited from automatically generated models -->
34+
<xi:include href="../../../iCub/conf/wrappers/inertials/head-inertials_wrapper.xml" />
35+
36+
<!-- -->
37+
38+
<!-- ROS 2 entries -->
39+
<xi:include href="wrappers/motorControl/alljoints-mc_remapper.xml" />
40+
<xi:include href="wrappers/motorControl/alljoints-mc_nws_ros2.xml" />
41+
42+
</devices>
43+
</robot>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
3+
4+
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints-mc_nws_ros2" type="controlBoard_nws_ros2">
5+
<param name="node_name"> icub_cb_node </param>
6+
<param name="topic_name"> /joint_states </param>
7+
<action phase="startup" level="10" type="attach">
8+
<param name="device"> alljoints-mc_remapper </param>
9+
</action>
10+
<action phase="shutdown" level="15" type="detach" />
11+
</device>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
3+
4+
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints-mc_remapper" type="controlboardremapper">
5+
<param name="axesNames">(neck_pitch neck_roll neck_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw l_elbow l_wrist_prosup l_wrist_pitch l_wrist_yaw r_shoulder_pitch r_shoulder_roll r_shoulder_yaw r_elbow r_wrist_prosup r_wrist_pitch r_wrist_yaw torso_yaw torso_roll torso_pitch)</param>
6+
<action phase="startup" level="5" type="attach">
7+
<paramlist name="networks">
8+
<elem name="head_joints"> head_hardware_device </elem>
9+
<elem name="left_arm_joints"> left_arm_hardware_device</elem>
10+
<elem name="right_arm_joints"> right_arm_hardware_device </elem>
11+
<elem name="torso_joints"> torso_hardware_device </elem>
12+
</paramlist>
13+
</action>
14+
<action phase="shutdown" level="20" type="detach"/>
15+
</device>

0 commit comments

Comments
 (0)