Map Message C++
Does anyone have some sample code for publishing a map given a set of coordinates? I am in need... I figured it would be pretty straight forward, then the documentation confused me... Any advice?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Does anyone have some sample code for publishing a map given a set of coordinates? I am in need... I figured it would be pretty straight forward, then the documentation confused me... Any advice?
The OccupancyGrid message contains three parts:
1) The Header information. This will include the frame_id of the map. When specifying the origin of the map in the MapMetaData, the Pose that you use will be in this frame.
2) The meta data tells you the map resolution, the height, the width, and the time it was created. It also contains the origin of the map in the frame specified in the header's frame_id.
3) The actual data for the map. It's in row-major order, which means you will fill the data array like so: [row0, column0, row1, column1, row2, column2 ...].
NOTE: The catch with this message is that the data array only supports signed 8-bit integers (i.e. char) and can only be filled with values from -128 to +127. I'm not sure what you're trying to do with this map, but keep that in mind.
I don't have sample code, but my interpretation of the message semantics are as follows:
Asked: 2012-08-08 03:55:55 -0600
Seen: 694 times
Last updated: Aug 08 '12