Skip to content

Commit 082fb3f

Browse files
committed
Support joints publishing on ROS 2 for iCubGazeboV2_5_visuomanip
1 parent bbf40bd commit 082fb3f

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed
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="15" type="attach">
8+
<param name="device"> alljoints-mc_remapper </param>
9+
</action>
10+
<action phase="shutdown" level="20" type="detach" />
11+
</device>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<paramlist name="networks">
6+
<elem name="head_joints"> ( 0 2 0 2 )</elem>
7+
<elem name="left_arm_joints"> ( 3 9 0 6 )</elem>
8+
<elem name="right_arm_joints"> ( 10 16 0 6 )</elem>
9+
<elem name="torso_joints"> ( 17 19 0 2 )</elem>
10+
</paramlist>
11+
<param name="joints"> 20 </param>
12+
<action phase="startup" level="6" type="attach">
13+
<paramlist name="networks">
14+
<elem name="head_joints"> head_hardware_device </elem>
15+
<elem name="left_arm_joints"> left_arm_hardware_device</elem>
16+
<elem name="right_arm_joints"> right_arm_hardware_device </elem>
17+
<elem name="torso_joints"> torso_hardware_device </elem>
18+
</paramlist>
19+
</action>
20+
<action phase="shutdown" level="19" type="detach" />
21+
</device>

0 commit comments

Comments
 (0)