Ask Your Question
0

Conversion between world and occupancy grid msg

asked 2014-07-03 09:25:09 -0500

Federico gravatar image

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

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2015-11-12 14:19:57 -0500

makeBotsNotWar gravatar image

http://answers.ros.org/question/10268...

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

edit flag offensive delete link more
1

answered 2014-07-22 10:46:48 -0500

zsaigol gravatar image

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.

edit flag offensive delete link more
1

answered 2014-07-03 18:47:20 -0500

dornhege gravatar image

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.

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

Stats

Asked: 2014-07-03 09:25:09 -0500

Seen: 1,855 times

Last updated: Jul 03 '14