Skip to content

Commit

Permalink
R1SN003nws:
Browse files Browse the repository at this point in the history
* added odometry devices
* fixed lidar actions level in yarprobotinterface
  • Loading branch information
randaz81 committed Nov 9, 2021
1 parent 69fcaec commit 012cc67
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 32 deletions.
5 changes: 5 additions & 0 deletions R1SN003nws/CER.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<robot name="R1SN003" build="1" portprefix="cer" xmlns:xi="http://www.w3.org/2001/XInclude">
<devices>

<!-- ODOMETRY -->
<xi:include href="wrappers/odometry/odometry_nws_yarp.xml" />
<xi:include href="wrappers/odometry/odometry_nws_ros.xml" />
<xi:include href="hardware/odometry/odometry.xml" />

<!-- LASER -->
<xi:include href="hardware/rpLidar/laserA3_hw_back.xml" />
<xi:include href="wrappers/rpLidar/laser_back_nws_yarp.xml" />
Expand Down
12 changes: 12 additions & 0 deletions R1SN003nws/hardware/odometry/odometry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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="cer_odometry" type="cerOdometry">
<param name="geom_r"> 10 </param>
<param name="geom_l"> 10 </param>

<action phase="startup" level="20" type="attach">
<param name="device"> cer_mobile_base_mc_remapper </param>
</action>
<action phase="shutdown" level="5" type="detach" />
</device>
4 changes: 2 additions & 2 deletions R1SN003nws/hardware/rpLidar/laserA3_hw_double.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
<param name="allow_infinity"> 1 </param>
</group>

<action phase="startup" level="3" type="attach">
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="L_Front"> cer_laser_front_device </elem>
<elem name="L_Back"> cer_laser_back_device </elem>
</paramlist>
</action>

<action phase="shutdown" level="3" type="detach"/>
<action phase="shutdown" level="20" type="detach"/>

</device>

Expand Down
14 changes: 14 additions & 0 deletions R1SN003nws/wrappers/odometry/odometry_nws_ros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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="cer_odometry_nws_ros" type="odometry2D_nws_ros">
<param name="topic_name"> /odometry </param>
<param name="node_name"> /cer_odometry_nws_ros </param>
<param name="base_frame"> mobile_base_link </param>
<param name="odom_frame"> odometry </param>

<action phase="startup" level="10" type="attach">
<param name="device"> cer_odometry </param>
</action>
<action phase="shutdown" level="15" type="detach" />
</device>
13 changes: 13 additions & 0 deletions R1SN003nws/wrappers/odometry/odometry_nws_yarp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?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="cer_odometry_nws_yarp" type="odometry2D_nws_yarp">
<param name="odometry_port_name"> /cer/odometry </param>
<param name="odometer_port_name"> /cer/odometer </param>
<param name="velocity_port_name"> /cer/velocity </param>

<action phase="startup" level="10" type="attach">
<param name="device"> cer_odometry </param>
</action>
<action phase="shutdown" level="15" type="detach" />
</device>
12 changes: 2 additions & 10 deletions R1SN003nws/wrappers/rpLidar/laser_back_nws_yarp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@
<param name="period"> 0.01 </param>
<param name="name"> /cer/laser/back:o </param>

<action phase="startup" level="5" type="attach">
<action phase="startup" level="10" type="attach">
<paramlist name="networks">
<elem name="cer_laser"> cer_laser_back_device </elem>
</paramlist>
</action>

<group name ="ROS">
<param name ="useROS"> true </param>
<param name ="ROS_nodeName"> /cer-laserBack </param>
<param name ="ROS_topicName"> /laserBack </param>
<param name ="frame_id"> mobile_base_lidar_B </param>>

</group>

<action phase="shutdown" level="5" type="detach" />
<action phase="shutdown" level="15" type="detach" />
</device>

4 changes: 2 additions & 2 deletions R1SN003nws/wrappers/rpLidar/laser_double_nws_ros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<param name="period"> 0.01 </param>
<param name="name"> /cer/laser:o </param>

<action phase="startup" level="6" type="attach">
<action phase="startup" level="10" type="attach">
<paramlist name="networks">
<elem name="cer_laser"> cer_double_laser_device </elem>
</paramlist>
Expand All @@ -15,6 +15,6 @@
<param name ="topic_name"> /laser</param>
<param name ="frame_id"> mobile_base_double_lidar </param>

<action phase="shutdown" level="5" type="detach" />
<action phase="shutdown" level="15" type="detach" />
</device>

11 changes: 2 additions & 9 deletions R1SN003nws/wrappers/rpLidar/laser_double_nws_yarp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@
<param name="period"> 0.01 </param>
<param name="name"> /cer/laser:o </param>

<action phase="startup" level="6" type="attach">
<action phase="startup" level="10" type="attach">
<paramlist name="networks">
<elem name="cer_laser"> cer_double_laser_device </elem>
</paramlist>
</action>

<group name ="ROS">
<param name ="useROS"> true </param>
<param name ="ROS_nodeName"> /cer-laser </param>
<param name ="ROS_topicName"> /laser</param>
<param name ="frame_id"> mobile_base_double_lidar </param>
</group>

<action phase="shutdown" level="5" type="detach" />
<action phase="shutdown" level="15" type="detach" />
</device>

11 changes: 2 additions & 9 deletions R1SN003nws/wrappers/rpLidar/laser_front_nws_yarp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@
<param name="period"> 0.01 </param>
<param name="name"> /cer/laser/front:o </param>

<action phase="startup" level="5" type="attach">
<action phase="startup" level="10" type="attach">
<paramlist name="networks">
<elem name="cer_laser"> cer_laser_front_device </elem>
</paramlist>
</action>

<group name ="ROS">
<param name ="useROS"> true </param>
<param name ="ROS_nodeName"> /cer-laserFront </param>
<param name ="ROS_topicName"> /laserFront </param>
<param name ="frame_id"> mobile_base_lidar_F </param>
</group>

<action phase="shutdown" level="5" type="detach" />
<action phase="shutdown" level="15" type="detach" />
</device>

0 comments on commit 012cc67

Please sign in to comment.