Getting a 2D matrix from nav_msg/OccupancyGrid

asked 2017-06-16 17:43:58 -0500

GrimTS gravatar image

Hello there! I am trying to "extract" a 2D matrix from OccupancyGrid data, so that i can create some random points for a pathfinding algorithm i am working on for my University Thesis, but i cant seem to find any good documentation on the subject. I am relatively new to ROS and i was wondering there are any suggestions on where i could look it up.

I running the hector_quadrotor_demo package,on ROS Indigo for Ubuntu 14.04 Trusty, and trying to get the data from the /map topic (hector_mapping package).

Any help would be greatly appreciated!

edit retag flag offensive close merge delete



You reviewed the message documentation here: ?

BrannonKing gravatar image BrannonKing  ( 2017-06-18 19:46:22 -0500 )edit

Yes i did, but i couldnt find a way to turn it from its data type into something closer to a 2D matrix. Sorry if i am missing something here, but i was under the impression i needed to manage the data in a certain way so i could generate the random points i need?

GrimTS gravatar image GrimTS  ( 2017-06-20 12:30:12 -0500 )edit

It sounds like you need some basic programming instruction:

BrannonKing gravatar image BrannonKing  ( 2017-06-20 17:41:37 -0500 )edit

Great! I'll give it a look! Thanks!

GrimTS gravatar image GrimTS  ( 2017-06-20 18:38:56 -0500 )edit