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 movebase, for instance the global and local planner/costmaps. Only `movebase_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
- rqttftree: https://imgur.com/a/5pAAu70
Asked by davidem on 2019-11-12 07:10:05 UTC
Answers
Hi,
The parameter robot_base_frame
defaults to base_link
which is on the error message you are getting. So I think you are not setting the correct parameter. You need to include the namespaces of both local and global costmaps, as well as the robot name when setting the parameter, something like
<param name="$(arg robot_name)/move_base/global_costmap/robot_base_frame" value="$(arg robot_name)/base_footprint" />
Of course you should double check the parameter names. You can verify the name and value of each parameter on the parameter server, using rosparam list
and rosparam get
commands.
A work around this, is to create different costmap configuration files for each robot, including the robot's name at the end. Then I can call them on the launch files.
Regards,
Asked by Mario Garzon on 2019-11-14 05:38:31 UTC
Comments