0
$\begingroup$

Rosanswers logo

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

http://www.pirobot.org


Originally posted by Pi Robot on ROS Answers with karma: 4046 on 2012-09-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Pi Robot with karma: 4046 on 2012-09-17

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.