0
$\begingroup$

Rosanswers logo

Hi all,

I have a map of the environment my robot has to move in. The map is stored in the standard way as an occupancy grid map and served via map_server service. I want to implement a PRM on top of this map so I need to access the value of the occupancy grid from the world coordinate. To be more precise, given a point in the map frame (say [x0,y0]), I need to access the value of the occupancy grid of [x0,y0], that is, I need a conversion from the world coordinate to the index of the vector that represents the occupancy grid.

Do I have to implement everything from scratch or there are already some api that perform this conversion?

Regards


Originally posted by Federico on ROS Answers with karma: 100 on 2014-07-03

Post score: 0

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

http://answers.ros.org/question/10268/where-am-i-in-the-map/

Also, this question should be closed or merged with the other one. I am new so do not know how to do that.


Originally posted by makeBotsNotWar with karma: 16 on 2015-11-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

As far as I know there isn't a generic library that provides this. However, writing this from scratch is not really that complex. You can find examples in some programs that use OccupancyGrid messages. Be aware that sometimes orientation might be (incorrectly) ignored.


Originally posted by dornhege with karma: 31395 on 2014-07-03

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

I think the occupancy_grid_utils package will do what you want (although I haven't used it myself). If you're using Hydro or newer, Clearpath have a Catkinized-version.

If you want to code it yourself, the ROS coordinate frame conventions might be useful.


Originally posted by zsaigol with karma: 225 on 2014-07-22

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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