Why is map_server waiting so long for a map?

asked 2020-07-10 11:15:04 -0500

fabian gravatar image

I would like to create a map which I recorded with a turtlebot3 in simulation. I created a rosbag file with the following infos:

path:        scan_data.bag
version:     2.0
duration:    47.3s
start:       Jan 01 1970 01:01:16.07 (76.07)
end:         Jan 01 1970 01:02:03.37 (123.37)
size:        921.1 KB
messages:    1656
compression: none [2/2 chunks]
types:       sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]
             tf2_msgs/TFMessage    [94810edda583a504dfda3829e70d7eec]
topics:      /scan    236 msgs    : sensor_msgs/LaserScan
            /tf     1420 msgs    : tf2_msgs/TFMessage

I started gmapping with the following command: rosrun gmapping slam_gmapping and replayed the rosbag with rosbag play --clock scan_data.bag. After replaying all the stored message in the robag I stopped playing from the bag and instead started the map_server as follows: rosun map_sever map_saver. The map_server then informs me that it is Waiting for the map. To get a better sense of why the map server waits, I printed the debug messages from both map_server and gmapping. The server says:

[ INFO] [1594396707.145254065]: Waiting for the map
[DEBUG] [1594396796.776397911]: Connection::drop(2)
[DEBUG] [1594396796.776461182]: Socket 10 closed with (ERR|HUP|NVAL) events 8196: Success
[DEBUG] [1594396796.776489017]: TCP socket [10] closed
[DEBUG] [1594396796.776507438]: Connection::drop(0)
[DEBUG] [1594396796.776528051]: Connection::drop(2)
[DEBUG] [1594396796.776564388]: Connection::drop(2)

In contrast, gmapping informs me that:

[DEBUG] [1594396668.036166640, 123.366881203]: Service client [/rqt_gui_py_node_21128] wants service 
[/slam_gmapping/set_logger_level] with md5sum [51da076440d78ca1684d36c868df61ea]
[DEBUG] [1594396770.122118846, 123.366881203]: Connection::drop(2)
[DEBUG] [1594396770.122167596, 123.366881203]: Socket 14 closed with (ERR|HUP|NVAL) events 8196: Success
[DEBUG] [1594396770.122228622, 123.366881203]: TCP socket [14] closed
[DEBUG] [1594396770.122255573, 123.366881203]: Connection::drop(0)
[DEBUG] [1594396770.122268778, 123.366881203]: Connection::drop(2)
[DEBUG] [1594396770.122347180, 123.366881203]: Connection::drop(2)

I also checked the rosgraph and see that the slam_gmapping node is connected to the map_server node through an link with the title /map. There are only two active nodes in the graph.

I am a bit at loss to understand how I can debug the system more. Does somebody have any idea what I can do to understand why the map_server waits for the map? I am grateful for any hints and suggestions!

edit retag flag offensive close merge delete