How to save map programmatically?
I am learning about mapping. I am trying to create a map using slam_gmapping with a simple wanderer code. I would like to save the map after it moving around. I know that I need to use the package map_server with service map_saver but I don't know how to call this programmatically. Another question I have is with this type of wanderer robot, what is the best way to define when it should be stop? Should I based on timing? Thank you very much.
I want to know that. I use this command rosun map_server map_saver -f my_map
but I can not get anything but the wait without end .