automate ros map_server from a python node subscriber/publisher
what is the recommended way to load maps for navigation (of a turtlebot2) from a python node?
I'm writing an app that uses python and some instructions from an online source to direct the robot. I'd like to make it so that the user can see a list of files and choose one as the map, then start the robot along to a given destination. Is there a way to call 'rosrun map_server map_server filename.yaml
' from inside another node (in this case written in python)? I realize that python has tools for executing other programs from within, using 'subprocess' for example, but is there a ros way to do this? The filename may not always be the same.
I think an android app does something like this, though not in python, but sadly I cannot get my "map" android app to work with the turtlebot.
The map_store package can do this, but it's mostly undocumented: http://wiki.ros.org/map_store (hence not a real answer)
What I do know is that it replaces map_server, stores maps in some sort of database, and has service calls for publishing and saving maps.