Ask Your Question
0

map server problems

asked 2013-03-03 12:19:27 -0500

Astronaut gravatar image

Hello

I wonted to load a map from a bag file using the map server but I could not. First I played the bag file during running the master with roscore. After finishind the play of the bag file in new tab i tried to load the map with rosrun map_server map_saver -f /filename

But I was waiting for the map and nothing. Any help??

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-04-11 07:01:23 -0500

felix k gravatar image

The map_saver saves the map published on /map to a file.

The map_server loads a map and publishes it (latched) on /map.

edit flag offensive delete link more

Comments

ok. Thanks

Astronaut gravatar imageAstronaut ( 2013-04-11 16:38:42 -0500 )edit
1

answered 2013-04-11 08:25:13 -0500

Ben_S gravatar image

updated 2013-04-11 08:26:02 -0500

Even though this question is quite old: You have to run the map_saver while the bag is still playing. If you start it after the bag has finished, there are no messages on the /map topic for the map_saver to capture and save.

If you want to make sure, that you only get the latest map messages out of the bag, use the following procedure:

  • Use rosbag info to determine the length of your bag in seconds
  • Start a roscoreand run the map_saver with the appropriate topic set
  • Play your bag file with rosbag play -s x bagfile.bag where x is the duration of your bag minus 3-5 seconds. (Depends on the rate at which the map is published. If it does not get a map, try to subtract longer timespans)

This way you dont have to manually start the saver at the latest possible moment. :)

edit flag offensive delete link more

Comments

ok. Thanks

Astronaut gravatar imageAstronaut ( 2013-04-11 16:38:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-03 12:19:27 -0500

Seen: 1,565 times

Last updated: Apr 11 '13