Retrieving map data as an image for a rosbridge app
Hello,
I am programming a javascript/rosbridge move_base interface to use with a tablet and I can successfully retrieve the map metadata by subscribing to the /map_metadata topic. What I need now is the map image data (occupancy grid) in a format that I can use in my javascript program.
Currently I am using KineticJS to load the map image using a URL that points to the .png file that resides on the rosbridge webserver. However, this requires knowing the name of the map file on the webserver and as far as I can tell, this filename is not published by the map_server. So I'd like to get the image directly from the /map topic. I see that map_server provides a service called static_map which will give me the image. But then I'm not sure how to turn this into an image object inside my javascript/rosbridge client.
Any ideas would be appreciated!
--patrick