Skip to content

Commit

Permalink
Changed demo launch files to use tuw_traj_pid instead of old local co…
Browse files Browse the repository at this point in the history
…ntroller.

Can be enabled with "use_default" flag.
TODO: fix localization in tuw_multi_robot_ctrl
  • Loading branch information
axelbr committed Sep 30, 2019
1 parent 31d016e commit 5714647
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tuw_multi_robot_demo/launch/local_controller_recursive.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
<launch>
<arg name="nr_of_robots" default="1"/>
<arg name="robot_name_prefix" default="robot_"/>
<arg name="use_default" default="true" />

<!-- reduce the loop counter "nr_of_robots-1" = robot_id -->
<arg name="robot_id" value="$(eval arg('nr_of_robots') - 1)"/>

<!-- launch the controller -->
<include file="$(find tuw_multi_robot_demo)/launch/local_controller.launch">
<group if="$(arg use_default)">
<include file="$(find tuw_multi_robot_demo)/launch/local_controller.launch">
<arg name="robot_name" value="$(arg robot_name_prefix)$(arg robot_id)" />
</include>
</include>
</group>
<group unless="$(arg use_default)">
<include file="$(find tuw_multi_robot_demo)/launch/pid_local_controller.launch">
<arg name="robot_name" value="$(arg robot_name_prefix)$(arg robot_id)" />
</include>
</group>

<!-- recursive call -->
<include file="$(find tuw_multi_robot_demo)/launch/local_controller_recursive.launch" if="$(eval arg('robot_id') > 0)">
Expand Down
25 changes: 25 additions & 0 deletions tuw_multi_robot_demo/launch/pid_local_controller.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>

<launch>
<arg name="robot_name" default="robot_0"/>
<arg name="update_rate_info" value="1.0" />

<group ns="$(arg robot_name)">

<node pkg="tf" type="static_transform_publisher" name="odom_bc" args="0 0 0 0 0 0 1 map $(arg robot_name)/odom 10" />

<param name="base_frame" value="$(arg robot_name)/base_link" />
<include file="$(find tuw_traj_pid)/launch/traj_pid_nodelet.launch">
</include>

<node pkg="tuw_multi_robot_local_behavior_controller" type="tuw_local_behavior_controller_node" name="local_behavior" output="screen">
<param name="robot_name" value="$(arg robot_name)" />
<param name="robot_radius" value="0.3" />
<remap from="robot_info" to="/robot_info" />
</node>

<node pkg="nodelet" type="nodelet" name="self_localization" args="standalone FakePoseEstimationNodelet"/>

</group>

</launch>

0 comments on commit 5714647

Please sign in to comment.