Multiple turtlebot3 navigation base_footprint to map solution

asked 2019-05-11 12:36:44 -0600

francimala gravatar image

updated 2019-05-12 03:23:26 -0600

jayess gravatar image

I worked with some colleagues to a university project that was aimed at simulating the navigation of multiple turtlebot3 on a single machine and (afterward) across three different PC. During the development of this project we faced the following problem:

[ WARN] [1413488778.937642524]: Waiting on transform from /base_footprint to /map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 203.264 timeout was 0.1

Apparently, on the other ROSanswer questions there was no explicit solution, hence I would like to share what worked for us. The main problem was that the tf_tree was not connecting the odom frame of each robot to the map frame, they were like two separate and uncorrelated branches.

The solution was to remap 3 parameters inside two param files, that were by default set outside the namespace of the two robots. The above mentioned files are in the folder turtlebo3_navigation/param and are:

  • local_costmap_params.yaml
  • global_costmap_params.yaml

Inside the first one:

  • global_fram: odom

  • robot_base_frame: base_footprint

Inside the second one:

  • robot_base_frame: base_footprint

To not change such param files, we decided to create new amcl and move_base launch files (one for each robot) with the following modifications (only the modification are reported):

[In our case the namespaces were tb3_0 for the first robot, and tb3_1 for the second robot.]

amcl_tb3_0.launch

<param name="odom_frame_id"             value="/tb3_0/odom"/>
<param name="base_frame_id"             value="/tb3_0/base_footprint"/>
<param name="global_frame_id"           value="/map"/>

amcl_tb3_1.launch

<param name="odom_frame_id"             value="/tb3_1/odom"/>
<param name="base_frame_id"             value="/tb3_1/base_footprint"/>
<param name="global_frame_id"           value="/map"/>

move_base_tb3_0.launch

<param name="global_costmap/robot_base_frame" value="tb3_0/base_footprint"/>
<param name="local_costmap/robot_base_frame" value="tb3_0/base_footprint"/>
<param name="local_costmap/global_frame" value="tb3_0/odom"/>

move_base_tb3_1.launch

<param name="global_costmap/robot_base_frame" value="tb3_1/base_footprint"/>
<param name="local_costmap/robot_base_frame" value="tb3_1/base_footprint"/>
<param name="local_costmap/global_frame" value="tb3_1/odom"/>

Definitely, this is not the best solution, but it worked for our purposes. If you have to do a similar project, check our documentation, maybe you can find some hints, since we have explained step by step what we did.

https://github.com/francimala/ROS_mul...

I'm using ROS melodic and the Turtlebot3 packages.

edit retag flag offensive close merge delete

Comments

Is this a question?

jayess gravatar image jayess  ( 2019-05-12 03:24:41 -0600 )edit

No, this is the solution that worked for us. If you have a more elegant one, please share it with us.

francimala gravatar image francimala  ( 2019-05-12 03:54:14 -0600 )edit
1

Hey! It would be better if you could post the question and answer separately in their given sections. This would let one know that such a problem has been answered, and people can recreate it.

parzival gravatar image parzival  ( 2019-06-10 02:16:17 -0600 )edit