move_base doesn't recognise transforms being correctly published
I am using ROS Melodic and I'm trying to set up the navigation stack for multirobot exploration. I have mapped, using a single robot, a portion of the environment using gmapping and saved the map as mymap.yaml
. Now what I'm trying to do is to deploy more than one robot on the same map, thus using a shared map but different AMCL
and move_base
nodes.
The issue I'm encountering is that, even just running a single robot I get this message on the log (sender: robot_1/move_base
):
[ WARN] [1573556920.087568294, 15.021000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: source_frame base_link does not exist.. canTransform returned after 0.1 timeout was 0.1.
This happens only if I run the move_base node, otherwise it doesn't show.
From some other questions regarding this same matter I've learned that it might be caused by the /scan
topic not being published, which in my case is robot_N/scan
, but I've checked it through Rviz and data is showing flawlessly.
This same error also happened with base_footprint
instead of base_link
, and the solution I found was to add this parameter, relative to the move_base's local and global costmaps
:
<param name="robot_base_frame" value="$(arg robot_name)/base_footprint" />
I don't include it in the .yaml
file because I wouldn't be able to insert the namespace robot_name
unless I hardcode it (but that wouldn't work for all the different robots) and place a remap
tag, whose purpose is, in this case, equivalent.
Moreover, I also noticed that doing rostopic list
doesn't show all the topics that are called by move_base, for instance the global and local planner/costmaps. Only move_base_simple/goal
is shown, in the correct namespace.
My files (pastebin)
Parameters:
- local costmap: https://pastebin.com/ia5gEGpS
- global costmap: https://pastebin.com/0g8EhH8w
- costmap common params (loaded in the "global" and "local" ns): https://pastebin.com/CcVTZxnK
- dwa planner: https://pastebin.com/Y8DgZNTQ
- move_base: https://pastebin.com/9d8c2Uwi
Launch files
- one_robot.launch: https://pastebin.com/jhSvEbHR
- multirobot.launch: https://pastebin.com/zDz27Rnq
Ros debugging tools (imgur)
- rqt_graph: https://imgur.com/a/FHJymyV
- rqt_tf_tree: https://imgur.com/a/5pAAu70