ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Retrieving map data as an image for a rosbridge app

asked 2012-09-17 07:09:13 -0500

Pi Robot gravatar image


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!


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-09-17 15:36:52 -0500

Pi Robot gravatar image

I found a workaround that doesn't require getting the image directly. Instead I set the filename of the map as a parameter in the move_base launch file and then use the rosbridge get_param service to read the filename into my javascript client and KineticJS to get the image from the webserver.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2012-09-17 07:09:13 -0500

Seen: 492 times

Last updated: Sep 17 '12