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

"Waiting for the map" when using map_server and rosbag

asked 2019-03-22 10:57:42 -0500

Tomité gravatar image

updated 2019-03-25 11:14:59 -0500

Hello, I'm currently doing the tutorial teb_local_planner and now I'm trying to build a map with this tutorial. I execute all commands and at the end of this, I have problem with this command :

~/Documents/pts-info2-master/mybot_ws-base_sensors/src$ rosrun map_server map_saver -f my_map
[ INFO] [1553269724.865617557]: Waiting for the map

I never get the map and I must kill the process.

I use Velodyne, Ubuntu 16.04 with ROS Kinetic distribution. Thanks.

I run Gazebo with the robot.

To launch node for odometry roslaunch odometry_pkg start_odom.launch

then :

To launch node for laser_scan

roslaunch sensor_pkg laser_scan.launch

To launch node for point cloud roslaunch sensor_pkg point_cloud.launch

This is my rostopic list :

/clicked_point
/clock
/cloud
/cmd_vel
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/gazebo_gui/parameter_descriptions
/gazebo_gui/parameter_updates
/initialpose
/joint_states
/move_base_simple/goal
/mybot/camera1/camera_info
/mybot/camera1/image_raw
/mybot/camera1/image_raw/compressed
/mybot/camera1/image_raw/compressed/parameter_descriptions
/mybot/camera1/image_raw/compressed/parameter_updates
/mybot/camera1/image_raw/compressedDepth
/mybot/camera1/image_raw/compressedDepth/parameter_descriptions
/mybot/camera1/image_raw/compressedDepth/parameter_updates
/mybot/camera1/image_raw/theora
/mybot/camera1/image_raw/theora/parameter_descriptions
/mybot/camera1/image_raw/theora/parameter_updates
/mybot/camera1/parameter_descriptions
/mybot/camera1/parameter_updates
/odom
/rosout
/rosout_agg
/scan
/tf
/tf_static
/velodyne_points

I tried these commands :

rosbag record -O mylaserdata /base_scan /tf

rosbag record -O mylaserdata /scan /odom /velodyne_points /tf

I kill the process.

rosparam set use_sim_time true

rosrun gmapping slam_gmapping scan:=base_scan _odom_frame:=odom_combined

rosbag play --clock mylaserdata

In the terminal of the last

Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp
Warning: TF_OLD_DATA ignoring data from the past for frame right_wheel at time 1519 according to authority 
unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp
Warning: TF_OLD_DATA ignoring data from the past for frame left_wheel at time 1519 according to authority 
unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp
[ WARN] [1553529895.095733157, 1519.007083163]: Detected jump back in time of 42.4629s. Clearing TF 
buffer.
Warning: TF_OLD_DATA ignoring data from the past for frame odom_combined at time 1519.07 according to 
authority unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp
[ WARN] [1553529895.116016908, 1519.027228311]: Detected jump back in time of 42.4608s. Clearing TF 
buffer.
[ WARN] [1553529895.136380505, 1519.047353639]: Detected jump back in time of 42.4546s. Clearing TF 
buffer.
Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 1519.05 according to authority 
unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
     at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp
[ WARN] [1553529895.145895211, 1519.057411630]: Detected jump back in time of 42.4506s. Clearing TF 
buffer.
[ WARN] [1553529895.166244974, 1519 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-03-22 11:13:49 -0500

ahendrix gravatar image

updated 2019-03-25 11:54:33 -0500

It seems like gmapping is not making a map. I would check to see if it is printing any messages, and that the inputs for it are correct. If you are using a velodyne, you will need to convert the pointcloud to a laserscan so that gmapping can understand it.

Update

It seems like you have a few problems:

  • You're telling gmapping to use the /base_scan topic, but it doesn't exist. You should probably tell it to use the /scan topic instead. (although I still can't tell that the topic types match. You have custom packages, so you should check that they're publishing sensor_msgs/LaserScan )
  • Gmapping is showing a lot of TF errors; this usually indicates some problem with your setup, and can result in a bad map. I suspect you left gazebo running while you were trying to run gmapping, and the two sources of similar TF data are confusing it. When you run gmapping to build the map, you should make sure that there are no other nodes running.
  • You should check that the TF frame used by gmapping is published by your robot. The tutorial indicates that the odom_combined frame isn't used by most robots.

You also listed two rosbag record commands, but didn't say which bag file you were playing back. I assume you get the same results from both?

edit flag offensive delete link more

Comments

Excuse me for the late, can you explain me how to check if it is correct ? Do you want other messages in terminal ?

Tomité gravatar image Tomité  ( 2019-03-23 06:55:42 -0500 )edit

If you edit your question with the list of topics in your bag file and the full commands that you're running, I can help check if they're correct. If slam_gmapping is printing error messages or not printing anything at all, that may also indicate a problem.

ahendrix gravatar image ahendrix  ( 2019-03-23 13:34:17 -0500 )edit

I have updated the question if you want, with all nodes and commands what I launch.

Tomité gravatar image Tomité  ( 2019-03-25 11:15:38 -0500 )edit

Okay so I must kill Gazebo when I'm playing ?

Tomité gravatar image Tomité  ( 2019-03-26 09:00:00 -0500 )edit

For record commands, I used these commands in different records.

Tomité gravatar image Tomité  ( 2019-03-26 09:01:13 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-22 10:57:42 -0500

Seen: 1,956 times

Last updated: Mar 25 '19