ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What a month it has been but I FINALLY got it! The key piece I was missing was that even though the robots all share the same map, they each still need their own map server. I updated the section as follows:

<group ns="$(arg first_tb3)"> <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"> </node> </group> <group ns="$(arg second_tb3)"> <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"> </node> </group> <group ns="$(arg third_tb3)"> <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"> </node> </group>

I also had to give each robot their own set of params for the move_base file. All the params that look like this <rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load"/> have to be updated so that they use the correct frame with namespace preceding base_link, etc.

What a month it has been but I FINALLY got it! The key piece I was missing was that even though the robots all share the same map, they each still need their own map server. I updated the section as follows:

  <!-- Map server -->
<group ns="$(arg ns = "$(arg first_tb3)">
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
     <param name="global_frame_id" value="map" />
  </node>
  </group>
<group ns="$(arg ns = "$(arg second_tb3)">
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
     <param name="global_frame_id" value="map" />
  </node>
  </group>
<group ns="$(arg ns = "$(arg third_tb3)">
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
     <param name="global_frame_id" value="map" />
  </node>
  </group>

</group>

I also had to give each robot their own set of params for the move_base file. All the params that look like this <rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load"/> have to be updated so that they use the correct frame with namespace preceding base_link, etc. etc.