Getting a 2D matrix from nav_msg/OccupancyGrid

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

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

Comments

1

You reviewed the message documentation here: http://docs.ros.org/kinetic/api/nav_m... ?

BrannonKing gravatar image BrannonKing  ( 2017-06-18 19:46:22 -0600 )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 -0600 )edit
1

It sounds like you need some basic programming instruction: https://www.gamedev.net/forums/topic/...

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

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

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