problem with subscribing /map topic

asked 2015-12-31 11:31:51 -0500

David John gravatar image

Hi, I'm working with ROS Indigo.I subscribed the topic /map(occupancy grid) from turtlebot in gazebo and i want to use this data for my path planning program in python.But the subscribed topic is in the form of tuple.I want it in matrix format for path planning calculations(A* algorithm ). ... Is there any method to retrieve the data as matrix form from the topic /map. Can anybody help me to solve this problem.?

edit retag flag offensive close merge delete


Do you have specific format in mind? If so better to share it, by updating your question. If not, then is it a pure Python question? Then for example this might suit your need?

130s gravatar image 130s  ( 2015-12-31 19:41:22 -0500 )edit

i converted that tuple to a matrix and will it be the same as the occupancy grid ?? How can i change the length and width of occupancy grid?

David John gravatar image David John  ( 2016-01-03 03:45:05 -0500 )edit