Skip to content

Commit

Permalink
make laser scanner module-specific instead of robot-specific
Browse files Browse the repository at this point in the history
  • Loading branch information
fmessmer committed Apr 14, 2017
1 parent 4de09df commit dd47599
Show file tree
Hide file tree
Showing 39 changed files with 255 additions and 203 deletions.
2 changes: 1 addition & 1 deletion cob_bringup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(CATKIN_ENABLE_TESTING)
endif()

### INSTALL ###
install(DIRECTORY components controllers drivers robots tools
install(DIRECTORY components controllers drivers modules robots tools
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

Expand Down
5 changes: 2 additions & 3 deletions cob_bringup/drivers/laser_scan_filter.launch
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0"?>
<launch>

<arg name="robot"/>
<arg name="pkg_hardware_config" default="$(find cob_hardware_config)"/>
<arg name="name"/>
<arg name="scan_intervals"/>

<!-- scan filters-->
<rosparam ns="$(arg name)" command="load" file="$(arg pkg_hardware_config)/robots/$(arg robot)/config/$(arg name).yaml"/>
<rosparam ns="$(arg name)" param="scan_intervals" subst_value="True">$(arg scan_intervals)</rosparam>
<node ns="$(arg name)" pkg="cob_sick_s300" type="cob_scan_filter" name="scan_filter" respawn="false" output="screen">
<remap from="scan_in" to="scan_raw"/>
<remap from="scan_out" to="scan"/>
Expand Down
23 changes: 15 additions & 8 deletions cob_bringup/drivers/sick_lms1xx.launch
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
<?xml version="1.0"?>
<launch>

<arg name="robot" default="$(optenv ROBOT !!NO_ROBOT_SET!!)"/>
<arg name="pkg_hardware_config" default="$(find cob_hardware_config)"/>
<arg name="name"/>
<arg name="host"/>
<arg name="inverted"/>
<arg name="frame_id" default="$(arg name)_link"/>
<arg name="scan_intervals"/>
<arg name="sim" default="false"/>

<!-- load parameter -->
<rosparam ns="$(arg name)" command="load" file="$(arg pkg_hardware_config)/robots/$(arg robot)/config/$(arg name).yaml"/>
<group ns="$(arg name)">
<rosparam command="load" file="$(arg pkg_hardware_config)/components/sick_lms1xx/sick_lms1xx.yaml"/>
<rosparam param="host" subst_value="True">$(arg host)</rosparam>
<rosparam param="inverted" subst_value="True">$(arg inverted)</rosparam>
<rosparam param="frame_id" subst_value="True">$(arg frame_id)</rosparam>

<!-- start laser driver -->
<node unless="$(arg sim)" ns="$(arg name)" pkg="cob_sick_lms1xx" type="lms100" name="driver" respawn="false" output="screen">
<remap from="scan" to="scan_raw"/>
</node>
<!-- start laser driver -->
<node unless="$(arg sim)" pkg="cob_sick_lms1xx" type="lms100" name="driver" respawn="false" output="screen">
<remap from="scan" to="scan_raw"/>
</node>
</group>

<!-- laser filter -->
<include file="$(find cob_bringup)/drivers/laser_scan_filter.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="pkg_hardware_config" value="$(arg pkg_hardware_config)"/>
<arg name="name" value="$(arg name)"/>
<arg name="scan_intervals" value="$(arg scan_intervals)"/>
</include>

</launch>
25 changes: 17 additions & 8 deletions cob_bringup/drivers/sick_s300.launch
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
<?xml version="1.0"?>
<launch>

<arg name="robot" default="$(optenv ROBOT !!NO_ROBOT_SET!!)"/>
<arg name="pkg_hardware_config" default="$(find cob_hardware_config)"/>
<arg name="name"/>
<arg name="port"/>
<arg name="inverted"/>
<arg name="scan_id"/>
<arg name="frame_id" default="$(arg name)_link"/>
<arg name="scan_intervals"/>
<arg name="sim" default="false"/>

<!-- load parameter -->
<rosparam ns="$(arg name)" command="load" file="$(arg pkg_hardware_config)/robots/$(arg robot)/config/$(arg name).yaml"/>
<group ns="$(arg name)">
<rosparam command="load" file="$(arg pkg_hardware_config)/components/sick_s300/sick_s300.yaml"/>
<rosparam param="port" subst_value="True">$(arg port)</rosparam>
<rosparam param="inverted" subst_value="True">$(arg inverted)</rosparam>
<rosparam param="scan_id" subst_value="True">$(arg scan_id)</rosparam>
<rosparam param="frame_id" subst_value="True">$(arg frame_id)</rosparam>

<!-- start laser driver -->
<node unless="$(arg sim)" ns="$(arg name)" pkg="cob_sick_s300" type="cob_sick_s300" name="driver" respawn="false" output="screen">
<remap from="scan" to="scan_raw"/>
</node>
<!-- start laser driver -->
<node unless="$(arg sim)" pkg="cob_sick_s300" type="cob_sick_s300" name="driver" respawn="false" output="screen">
<remap from="scan" to="scan_raw"/>
</node>
</group>

<!-- laser filter -->
<include file="$(find cob_bringup)/drivers/laser_scan_filter.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="pkg_hardware_config" value="$(arg pkg_hardware_config)"/>
<arg name="name" value="$(arg name)"/>
<arg name="scan_intervals" value="$(arg scan_intervals)"/>
</include>

</launch>
5 changes: 5 additions & 0 deletions cob_bringup/modules/cob4-b3.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

</launch>
5 changes: 5 additions & 0 deletions cob_bringup/modules/cob4-b4.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

</launch>
30 changes: 30 additions & 0 deletions cob_bringup/modules/cob4-b5.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_front"/>
<arg name="port" value="/dev/ttyScanFront"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_left"/>
<arg name="port" value="/dev/ttyScanLeft"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_right"/>
<arg name="port" value="/dev/ttyScanRight"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="8"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
5 changes: 5 additions & 0 deletions cob_bringup/modules/cob4-b6.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

</launch>
30 changes: 30 additions & 0 deletions cob_bringup/modules/cob4-b7.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_front"/>
<arg name="port" value="/dev/ttyScanFront"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_left"/>
<arg name="port" value="/dev/ttyScanLeft"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_right"/>
<arg name="port" value="/dev/ttyScanRight"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="8"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
30 changes: 30 additions & 0 deletions cob_bringup/modules/cob4-b8.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_front"/>
<arg name="port" value="/dev/ttyScanFront"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_left"/>
<arg name="port" value="/dev/ttyScanLeft"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_right"/>
<arg name="port" value="/dev/ttyScanRight"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="8"/>
<arg name="scan_intervals" value="[[-1.5, 1.5]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
22 changes: 22 additions & 0 deletions cob_bringup/modules/raw3-b1.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_front"/>
<arg name="port" value="/dev/ttyScan0"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value=" [[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_rear"/>
<arg name="port" value="/dev/ttyScan1"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
22 changes: 22 additions & 0 deletions cob_bringup/modules/raw3-b3.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_front"/>
<arg name="port" value="/dev/ttyScan0"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value=" [[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="name" value="base_laser_rear"/>
<arg name="port" value="/dev/ttyScan1"/>
<arg name="inverted" value="false"/>
<arg name="scan_id" value="7"/>
<arg name="scan_intervals" value="[[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
20 changes: 20 additions & 0 deletions cob_bringup/modules/raw3-b5.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<launch>
<arg name="sim" default="false"/>

<include file="$(find cob_bringup)/drivers/sick_lms1xx.launch">
<arg name="name" value="base_laser_left"/>
<arg name="host" value="141.3.80.116"/>
<arg name="inverted" value="true"/>
<arg name="scan_intervals" value="[[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_lms1xx.launch">
<arg name="name" value="base_laser_rear"/>
<arg name="host" value="141.3.80.115"/>
<arg name="inverted" value="true"/>
<arg name="scan_intervals" value="[[-2.0, 2.0]]"/>
<arg name="sim" value="$(arg sim)"/>
</include>

</launch>
21 changes: 6 additions & 15 deletions cob_bringup/robots/cob4-2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>

<arg name="base" value="cob4-b7"/>

<!-- upload robot description -->
<include file="$(find cob_hardware_config)/upload_robot.launch">
<arg name="robot" value="$(arg robot)"/>
Expand All @@ -38,27 +40,16 @@
</include>
</group>

<include file="$(find cob_bringup)/drivers/sick_flexisoft.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/bms.launch">
<arg name="robot" value="$(arg robot)"/>
<include file="$(find cob_bringup)/modules/$(arg base).launch">
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="name" value="base_laser_front"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">

<include file="$(find cob_bringup)/drivers/sick_flexisoft.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="name" value="base_laser_right"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/drivers/sick_s300.launch">
<include file="$(find cob_bringup)/drivers/bms.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="name" value="base_laser_left"/>
<arg name="sim" value="$(arg sim)"/>
</include>

Expand Down
6 changes: 6 additions & 0 deletions cob_bringup/robots/cob4-3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>

<arg name="base" value="cob4-b3"/>

<!-- upload robot description -->
<include file="$(find cob_hardware_config)/upload_robot.launch">
<arg name="robot" value="$(arg robot)"/>
Expand All @@ -26,6 +28,10 @@
</include>
</group>

<include file="$(find cob_bringup)/modules/$(arg base).launch">
<arg name="sim" value="$(arg sim)"/>
</include>

<include file="$(find cob_bringup)/drivers/bms.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="sim" value="$(arg sim)"/>
Expand Down
6 changes: 6 additions & 0 deletions cob_bringup/robots/cob4-4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>

<arg name="base" value="cob4-b4"/>

<!-- upload robot description -->
<include file="$(find cob_hardware_config)/upload_robot.launch">
<arg name="robot" value="$(arg robot)"/>
Expand All @@ -27,6 +29,10 @@
</include>
</group>

<include file="$(find cob_bringup)/modules/$(arg base).launch">
<arg name="sim" value="$(arg sim)"/>
</include>

<include file="$(find cob_bringup)/drivers/bms.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="sim" value="$(arg sim)"/>
Expand Down
6 changes: 6 additions & 0 deletions cob_bringup/robots/cob4-5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>

<arg name="base" value="cob4-b5"/>

<!-- upload robot description -->
<include file="$(find cob_hardware_config)/upload_robot.launch">
<arg name="robot" value="$(arg robot)"/>
Expand All @@ -38,6 +40,10 @@
</include>
</group>

<include file="$(find cob_bringup)/modules/$(arg base).launch">
<arg name="sim" value="$(arg sim)"/>
</include>

<include file="$(find cob_bringup)/drivers/sick_flexisoft.launch">
<arg name="robot" value="$(arg robot)"/>
<arg name="sim" value="$(arg sim)"/>
Expand Down
Loading

0 comments on commit dd47599

Please sign in to comment.