How to resolve error "Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101251 timeout was 0.1"

asked 2018-01-24 19:58:35 -0500

nhoque gravatar image

updated 2018-01-24 21:26:38 -0500

jayess gravatar image

Hi, Please accept my apologies. Part of my capstone project I need to move around a fetch robot to collect data samples. So far, I have built a map of the lab and pass this map from the command line by

$roslaunch fetch_navigation fetch_nav.launch map_file:=/home/nhoque/maps/lab400.yaml

Then I get the error,

Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101251 timeout was 0.1

From the error I do understand that the map is expecting tf data from the base_link. Any help will be highly appreciated. Thank you.

edit retag flag offensive close merge delete

Comments

Well, it is expecting to have the transform from map -> ??? -> base_link. Typically, this error occurs if the localization is not running or not initialized. Can you check that everything is up and running, and that you can see the Robot localized in the map? You might have to set the inital pose.

mgruhler gravatar image mgruhler  ( 2018-01-25 01:12:32 -0500 )edit

Hi, Thank you. Before your advise I had navigaton stack and map server running but now I've navigation stack, map server and amcl running. The amcl saying nothing is published to /scan topic. It is asking me to verify. In Rviz I can see laser scan, how do I confirm it's publishing to /scan topic.

nhoque gravatar image nhoque  ( 2018-01-31 16:27:31 -0500 )edit

Check the tutorials: http://wiki.ros.org/ROS/Tutorials . Especially number 1.1.5 and 1.1.6 about Topics and nodes. And therein, the command line tools rostopic and rosnode.

mgruhler gravatar image mgruhler  ( 2018-02-01 00:54:21 -0500 )edit

The error I get now is
"You must specify at least three points for the robot footprint, reverting to previous footprint" Then a warring "Costmap2DROS transform timeout" How do I get around this? I have read about costmaps but couldn't solve the issue. Thank you

nhoque gravatar image nhoque  ( 2018-02-04 02:04:19 -0500 )edit

more info about the error please, exact paste of error message incl. context. please edit your question.

mgruhler gravatar image mgruhler  ( 2018-02-05 00:52:31 -0500 )edit

hello nhoque. I am also facing the same problem(Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error:canTransform: target_frame map does not exist..canTransform returned after 0.102 timeout was 0.1.) Can you tell me how you have solved this?

Mifta gravatar image Mifta  ( 2018-03-06 23:49:31 -0500 )edit

Hi, This error comes up when the navigation stack could not find a map. Please check your map_name.yaml is looking at the right map_name.pgm file (correct .pgm file path in the .yaml file).

nhoque gravatar image nhoque  ( 2018-03-07 19:09:42 -0500 )edit

thanks nhoque. I checked the map_name.yaml file. image name is correct in .yaml file. Do i need to include the full directory? (my map.yaml and map.pgm file is in "/home/mifta/catkin_ws/src/chapter6_tutorials/maps" folder)

Mifta gravatar image Mifta  ( 2018-03-07 21:07:26 -0500 )edit