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

Revision history [back]

click to hide/show revision 1
initial version

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 make sure, that you only get the last 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. :)

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 last 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. :)