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

gmapping with "Waiting for the map"

asked 2019-05-06 19:36:34 -0500

xj yang gravatar image

updated 2019-05-07 18:34:21 -0500

jayess gravatar image

Here is a clip of the bagfile: test.bag

My steps are as follows:

roscore

rosparam set use_sim_time true

rosrun gmapping slam_gmapping scan:=scan

add a fixed frame [map] as the original tf only has: odom -> base_link

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map odom 100

rosbag play --clock test.bag 

rosrun map_server map_saver

then appears "Waiting for the map". I am confused...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-07 12:43:45 -0500

xj yang gravatar image

Okay so I found that the fram_id of the /scan is not the end of existing tf tree - base_link, so by adding static_transform_publisher, link the /scan frame with base_link, the gmapping starts working

edit flag offensive delete link more

Comments

Good. Different names for the map topic could be a problem, as well. I have already this problem because I was using a different namespace for it.

Lucas Marins gravatar image Lucas Marins  ( 2019-05-07 13:03:59 -0500 )edit
1

this one rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map odom 100 would help to create a static map frame

xj yang gravatar image xj yang  ( 2019-05-07 13:10:58 -0500 )edit

Also can I ask have you tried the gmapping tutorial? I followed the steps and found the map it creates only has the first-frame scan result, which is weird...

xj yang gravatar image xj yang  ( 2019-05-07 13:14:03 -0500 )edit

You may wait a little bit because the robot needs to create the map, while moves around the space. Try to run the map_saver command at the end of rosbag time.

Lucas Marins gravatar image Lucas Marins  ( 2019-05-07 13:22:50 -0500 )edit

Well I tried it and there was no difference, gonna search a little bit more...

xj yang gravatar image xj yang  ( 2019-05-07 13:29:25 -0500 )edit

You may use Rviz to check your map topic that is created.

Lucas Marins gravatar image Lucas Marins  ( 2019-05-07 13:32:40 -0500 )edit

Yeah Rviz created the first snapshot and froze there. Seems that a few people also have this problem, though I tried the solutions and it is still not working

xj yang gravatar image xj yang  ( 2019-05-07 13:51:45 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-05-06 19:36:34 -0500

Seen: 1,280 times

Last updated: May 07 '19