Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade robots to the latest NWS/NWC layers - 4 #324

Merged
merged 6 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/face-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
<param name="CALIB_ORDER"> (0 1 2 3 4) ( 5) </param> <!-- we can calibrate all joints in parallel (for now not the jaw yet)-->

<action phase="startup" level="10" type="calibrate">
<param name="target">face-mc_wrapper</param>
<param name="target">face-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">face-mc_wrapper</param>
<param name="target">face-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/head-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@


<action phase="startup" level="10" type="calibrate">
<param name="target">head-mc_wrapper</param>
<param name="target">head-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">head-mc_wrapper</param>
<param name="target">head-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/left_arm-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
<param name="CALIB_ORDER">(0 1 2 3) (4) (5 6 7) (8 9 11 13) (10 12 14 15) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">left_arm-mc_wrapper</param>
<param name="target">left_arm-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">left_arm-mc_wrapper</param>
<param name="target">left_arm-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/left_leg-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
<param name="CALIB_ORDER"> (0 1 2 3 4 5) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">left_leg-mc_wrapper</param>
<param name="target">left_leg-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">left_leg-mc_wrapper</param>
<param name="target">left_leg-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/right_arm-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
<param name="CALIB_ORDER">(0 1 2 3) (4) (5 6 7) (8 9 11 13) (10 12 14 15) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">right_arm-mc_wrapper</param>
<param name="target">right_arm-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">right_arm-mc_wrapper</param>
<param name="target">right_arm-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/right_leg-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
<param name="CALIB_ORDER">(0 1 2 3 4 5) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">right_leg-mc_wrapper</param>
<param name="target">right_leg-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">right_leg-mc_wrapper</param>
<param name="target">right_leg-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/calibrators/torso-calib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
<param name="CALIB_ORDER"> (0 1 2) </param>

<action phase="startup" level="10" type="calibrate">
<param name="target">torso-mc_wrapper</param>
<param name="target">torso-mc_remapper</param>
</action>

<action phase="interrupt1" level="1" type="park">
<param name="target">torso-mc_wrapper</param>
<param name="target">torso-mc_remapper</param>
</action>

<action phase="interrupt3" level="1" type="abort" />
Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/cartesian/left_arm-cartesian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

<action phase="startup" level="15" type="attach">
<paramlist name="networks">
<elem name="torso">torso-mc_wrapper</elem>
<elem name="left_arm">left_arm-mc_wrapper</elem>
<elem name="torso">torso-mc_remapper</elem>
<elem name="left_arm">left_arm-mc_remapper</elem>
</paramlist>
</action>

Expand Down
4 changes: 2 additions & 2 deletions iCubEdinburgh01/cartesian/right_arm-cartesian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

<action phase="startup" level="15" type="attach">
<paramlist name="networks">
<elem name="torso">torso-mc_wrapper</elem>
<elem name="right_arm">right_arm-mc_wrapper</elem>
<elem name="torso">torso-mc_remapper</elem>
<elem name="right_arm">right_arm-mc_remapper</elem>
</paramlist>
</action>

Expand Down
26 changes: 18 additions & 8 deletions iCubEdinburgh01/icub_all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,54 @@
<robot name="iCubEdinburgh01" portprefix="icub" xmlns:xi="http://www.w3.org/2001/XInclude">

<devices>

<!-- motor controllers wrappers -->
<xi:include href="wrappers/motorControl/left_arm-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/left_leg-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/right_leg-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/head-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/face-mc_wrapper.xml" />
<xi:include href="wrappers/motorControl/torso-mc_wrapper.xml" />

<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/left_leg-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/right_leg-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/head-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/face-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/torso-mc_remapper.xml" />

<!-- HEAD -->
<xi:include href="./hardware/motorControl/head-eb20-j0_1-mc.xml" />
<xi:include href="./hardware/motorControl/head-eb21-j2_5-mc.xml" />
<xi:include href="./wrappers/motorControl/head-mc_wrapper.xml" />

<!-- FACE -->
<xi:include href="./hardware/motorControl/face-eb22-j0_1-mc.xml" />
<xi:include href="./hardware/motorControl/face-eb23-j2_5-mc.xml" />
<xi:include href="./wrappers/motorControl/face-mc_wrapper.xml" />

<!-- TORSO -->
<xi:include href="hardware/motorControl/torso-eb5-j0_2-mc.xml" />
<xi:include href="wrappers/motorControl/torso-mc_wrapper.xml" />

<!-- LEFT ARM -->
<xi:include href="hardware/motorControl/left_arm-eb1-j0_3-mc.xml" />
<xi:include href="hardware/motorControl/left_arm-eb24-j4_7-mc.xml" />
<xi:include href="hardware/motorControl/left_arm-eb25-j8_11-mc.xml" />
<xi:include href="hardware/motorControl/left_arm-eb26-j12_15-mc.xml" />
<xi:include href="wrappers/motorControl/left_arm-mc_wrapper.xml" />

<!-- RIGHT ARM -->
<xi:include href="hardware/motorControl/right_arm-eb3-j0_3-mc.xml" />
<xi:include href="hardware/motorControl/right_arm-eb27-j4_7-mc.xml" />
<xi:include href="hardware/motorControl/right_arm-eb28-j8_11-mc.xml" />
<xi:include href="hardware/motorControl/right_arm-eb29-j12_15-mc.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_wrapper.xml" />

<!-- LEFT LEG -->
<xi:include href="hardware/motorControl/left_leg-eb6-j0_3-mc.xml" />
<xi:include href="hardware/motorControl/left_leg-eb7-j4_5-mc.xml" />
<xi:include href="wrappers/motorControl/left_leg-mc_wrapper.xml" />

<!-- RIGHT LEG -->
<xi:include href="hardware/motorControl/right_leg-eb8-j0_3-mc.xml" />
<xi:include href="hardware/motorControl/right_leg-eb9-j4_5-mc.xml" />
<xi:include href="wrappers/motorControl/right_leg-mc_wrapper.xml" />


<!-- INERTIAL SENSOR-->
<xi:include href="wrappers/inertials/head-imuFilter_wrapper.xml" />
Expand Down
17 changes: 17 additions & 0 deletions iCubEdinburgh01/wrappers/motorControl/face-mc_remapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="face-mc_remapper" type="controlboardremapper">
<paramlist name="networks">
<elem name="face_joints1">( 0 1 0 1 )</elem>
<elem name="face_joints2">( 2 5 0 3 )</elem>
</paramlist>
<param name="joints"> 6 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="face_joints1"> face-eb22-j0_1-mc </elem>
<elem name="face_joints2"> face-eb23-j2_5-mc </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach" />
</device>
25 changes: 7 additions & 18 deletions iCubEdinburgh01/wrappers/motorControl/face-mc_wrapper.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="face-mc_wrapper" type="controlboardwrapper2">
<paramlist name="networks">
<elem name="FirstSetOfJoints">( 0 1 0 1 )</elem>
<elem name="SecondSetOfJoints">( 2 5 0 3 )</elem>
</paramlist>
<param name="period"> 10 </param>
<param name="name"> /icub/face </param>
<param name="ports"> face </param>
<param name="joints"> 6 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<!-- The param value must match the device name in the corresponding body_part-ebX-jA_B-mc.xml file -->
<elem name="FirstSetOfJoints"> face-eb22-j0_1-mc </elem>
<elem name="SecondSetOfJoints"> face-eb23-j2_5-mc </elem>
<elem name="Calibrator"> head-calibrator </elem>
</paramlist>

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="face-mc_nws_yarp" type="controlBoard_nws_yarp">
<param name="name"> /icub/face </param>
<action phase="startup" level="10" type="attach">
<param name="device"> face-mc_remapper </param>
</action>
<action phase="shutdown" level="5" type="detach" />
</device>
<action phase="shutdown" level="15" type="detach" />
</device>
17 changes: 17 additions & 0 deletions iCubEdinburgh01/wrappers/motorControl/head-mc_remapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="head-mc_remapper" type="controlboardremapper">
<paramlist name="networks">
<elem name="head_joints1">( 0 1 0 1 )</elem>
<elem name="head_joints2">( 2 5 0 3 )</elem>
</paramlist>
<param name="joints"> 6 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="head_joints1"> head-eb20-j0_1-mc </elem>
<elem name="head_joints2"> head-eb21-j2_5-mc </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach" />
</device>
23 changes: 6 additions & 17 deletions iCubEdinburgh01/wrappers/motorControl/head-mc_wrapper.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="head-mc_wrapper" type="controlboardwrapper2">
<paramlist name="networks">
<elem name="FirstSetOfJoints">( 0 1 0 1 )</elem>
<elem name="SecondSetOfJoints">( 2 5 0 3 )</elem>
</paramlist>
<param name="period"> 10 </param>
<param name="name"> /icub/head </param>
<param name="ports"> head </param>
<param name="joints"> 6 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<!-- The param value must match the device name in the corresponding body_part-ebX-jA_B-mc.xml file -->
<elem name="FirstSetOfJoints"> head-eb20-j0_1-mc </elem>
<elem name="SecondSetOfJoints"> head-eb21-j2_5-mc </elem>
<elem name="Calibrator"> head-calibrator </elem>
</paramlist>

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="head-mc_nws_yarp" type="controlBoard_nws_yarp">
<param name="name"> /icub/head </param>
<action phase="startup" level="10" type="attach">
<param name="device"> head-mc_remapper </param>
</action>
<action phase="shutdown" level="5" type="detach" />
<action phase="shutdown" level="15" type="detach" />
</device>
64 changes: 64 additions & 0 deletions iCubEdinburgh01/wrappers/motorControl/icub_ros_wrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="icub_all_joints_mc_wrapper" type="controlboardwrapper2">
<param name="period"> 10 </param>
<param name="name"> /icub04/all_joints </param>
<param name="joints"> 50 </param>
<paramlist name="networks">
<elem name="head_firstset">( 0 1 0 1 )</elem>
<!-- 2 -->
<elem name="head_secondset">( 2 2 0 0 )</elem>
<!-- 1 -->
<elem name="torso">( 3 5 0 2 )</elem>
<!-- 3 -->
<elem name="right_arm_firstset">( 6 9 0 3 )</elem>
<!-- 4 -->
<elem name="right_arm_secondset">( 10 13 0 3 )</elem>
<!-- 4 -->
<elem name="right_arm_thirdset">( 14 17 0 3 )</elem>
<!-- 4 -->
<elem name="right_arm_fourthset">( 18 21 0 3 )</elem>
<!-- 4 -->
<elem name="left_arm_firstset">( 22 25 0 3 )</elem>
<!-- 4 -->
<elem name="left_arm_secondset">( 26 29 0 3 )</elem>
<!-- 4 -->
<elem name="left_arm_thirdset">( 30 33 0 3 )</elem>
<!-- 4 -->
<elem name="left_arm_fourthset">( 34 37 0 3 )</elem>
<!-- 4 -->
<elem name="left_leg_firstset">( 38 41 0 3 )</elem>
<!-- 4 -->
<elem name="left_leg_secondset">( 42 43 0 1 )</elem>
<!-- 2 -->
<elem name="right_leg_firstset">( 44 47 0 3 )</elem>
<!-- 4 -->
<elem name="right_leg_secondset">( 48 49 0 1 )</elem>
<!-- 2 -->
</paramlist>
<group name="ROS">
<param name="useROS"> true </param>
<param name="ROS_topicName"> /icub04/joint_states </param>
<param name="ROS_nodeName"> /icub04/joint_state_publisher </param>
</group>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="head_firstset"> head-eb20-j0_1-mc </elem>
<elem name="head_secondset"> head-eb21-j2_5-mc </elem>
<elem name="torso"> torso-eb5-j0_2-mc </elem>
<elem name="right_arm_firstset"> right_arm-eb3-j0_3-mc </elem>
<elem name="right_arm_secondset"> right_arm-eb27-j4_7-mc </elem>
<elem name="right_arm_thirdset"> right_arm-eb28-j8_11-mc </elem>
<elem name="right_arm_fourthset"> right_arm-eb29-j12_15-mc </elem>
<elem name="left_arm_firstset"> left_arm-eb1-j0_3-mc </elem>
<elem name="left_arm_secondset">left_arm-eb24-j4_7-mc </elem>
<elem name="left_arm_thirdset"> left_arm-eb25-j8_11-mc </elem>
<elem name="left_arm_fourthset"> left_arm-eb26-j12_15-mc </elem>
<elem name="left_leg_firstset"> left_leg-eb6-j0_3-mc </elem>
<elem name="left_leg_secondset"> left_leg-eb7-j4_5-mc </elem>
<elem name="right_leg_firstset"> right_leg-eb8-j0_3-mc </elem>
<elem name="right_leg_secondset"> right_leg-eb9-j4_5-mc </elem>
</paramlist>
</action>
<action phase="shutdown" level="5" type="detach" />
</device>
21 changes: 21 additions & 0 deletions iCubEdinburgh01/wrappers/motorControl/left_arm-mc_remapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_arm-mc_remapper" type="controlboardremapper">
<paramlist name="networks">
<elem name="left_arm_joints1">( 0 3 0 3 )</elem>
<elem name="left_arm_joints2">( 4 7 0 3 )</elem>
<elem name="left_arm_joints3">( 8 11 0 3 )</elem>
<elem name="left_arm_joints4">( 12 15 0 3 )</elem>
</paramlist>
<param name="joints"> 16 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="left_arm_joints1"> left_arm-eb1-j0_3-mc </elem>
<elem name="left_arm_joints2"> left_arm-eb24-j4_7-mc </elem>
<elem name="left_arm_joints3"> left_arm-eb25-j8_11-mc </elem>
<elem name="left_arm_joints4"> left_arm-eb26-j12_15-mc </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach" />
</device>
30 changes: 7 additions & 23 deletions iCubEdinburgh01/wrappers/motorControl/left_arm-mc_wrapper.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_arm-mc_wrapper" type="controlboardwrapper2">
<paramlist name="networks">
<!-- when we'll use entire arm we should use following sets -->
<elem name="FirstSetOfJoints">( 0 3 0 3 )</elem>
<elem name="SecondSetOfJoints">( 4 7 0 3 )</elem>
<elem name="ThirdSetOfJoints">( 8 11 0 3 )</elem>
<elem name="FourthSetOfJoints">( 12 15 0 3 )</elem>
</paramlist>
<param name="period"> 10 </param>
<param name="name"> /icub/left_arm </param>
<param name="ports"> left_arm </param>
<param name="joints"> 16 </param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<!-- The param value must match the device name in the corresponding body_part-ebX-jA_B-mc.xml file -->
<elem name="FirstSetOfJoints"> left_arm-eb1-j0_3-mc </elem>
<elem name="SecondSetOfJoints"> left_arm-eb24-j4_7-mc </elem>
<elem name="ThirdSetOfJoints"> left_arm-eb25-j8_11-mc </elem>
<elem name="FourthSetOfJoints"> left_arm-eb26-j12_15-mc </elem>
<elem name="Calibrator"> left_arm-calibrator </elem>
</paramlist>

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_arm-mc_nws_yarp" type="controlBoard_nws_yarp">
<param name="name"> /icub/left_arm </param>
<action phase="startup" level="10" type="attach">
<param name="device"> left_arm-mc_remapper </param>
</action>
<action phase="shutdown" level="5" type="detach" />
</device>
<action phase="shutdown" level="15" type="detach" />
</device>
Loading