How to setup a move_base for multiple turtlebots?

asked 2020-03-09 12:00:08 -0500

MarosROS gravatar image


For the past few weeks i am trying to use move_base for turtlebots tb3_0 and tb3_1 for SLAM. Both turtlebots create their own map so i want move_base_tb3_0 to be linked to tb3_0/map and move_base_tb3_1 to be linked to tb3_1/map. This is already working, however, my local costmap is empty and rostopic echo tb3_0/move_base/local_costmap/costmap returns all zeros. I checked all connections and everything seems to be connected how it should, so i do not understand the problem. When using one turtlebot with no namespace there is no problem either.

So my question is, how would you setup a move_base node for a turtlebot with namespace?

This is my setup, which seems to be not completely correct. Can you see why? My navigation params are default one from official github repo. Also a few days ago i posted here a question with a warn message i get when i start this move_base node below.

Thanks for help.


<!-- Arguments -->
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="cmd_vel_topic" default="cmd_vel" />
<arg name="odom_topic" default="odom" />
<arg name="move_forward_only" default="true"/>

<!-- move_base -->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
  <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
<rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
<rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
<rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" />
<rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" />
<param name="global_costmap/robot_base_frame" value="/tb3_0/base_footprint"/>
<param name="global_costmap/global_frame" value="/tb3_0/map"/>
<param name="local_costmap/robot_base_frame" value="/tb3_0/base_footprint"/>
<param name="local_costmap/global_frame" value="/tb3_0/odom"/>

<param name="DWAPlannerROS/min_vel_x" value="0.0" if="$(arg move_forward_only)" />


obstacle_range: 2.5
raytrace_range: 3.5

footprint: [[-0.105, -0.105], [-0.105, 0.105], [0.041, 0.105], [0.041, -0.105]]
#robot_radius: 0.105

inflation_radius: 0.1
cost_scaling_factor: 0.5

map_type: costmap
observation_sources: scan
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}


  global_frame: odom
  robot_base_frame: base_footprint

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5  

  static_map: false  
  rolling_window: true
  width: 3
  height: 3
  resolution: 0.05
edit retag flag offensive close merge delete


What is the output for tb3_0/scan and tb3_1/scan?

skpro19 gravatar image skpro19  ( 2021-02-16 13:39:31 -0500 )edit