You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve documentation of nav_msgs GridCells and MapMetaData #95
GridCells
Are the points in cells the center point? It could use some documentation?
MapMetaData:
Is origin the center point of the (0,0) cell? Which direction do cell coordinates increase? Is (0,0) x,y in a right handed coordinate system such that (0,0) is the bottom right cell, or is it row,col such that (0,0) is the top left cell?
On GridCells: I can't find anyone that uses that other than grid_maps. It looks like from their code they use it with RVIZ so I think we should be able to derive any information about it from that implementation.
On MapMetaData: The message has the comment in it
# The origin of the map [m, m, rad]. This is the real-world pose of the
# cell (0,0) in the map.
which I think makes that clear. This diagram gives a good overview of the coordinate system.
GridCells - Are the points in cells the center point? It could use some documentation?
Based on this the coordinates are the same as mapToWorld which is the center. In rviz the grid cells are displayed as a point cloud which confirms that the coordinates are the center.
Is origin the center point of the (0,0) cell?
No it is the bottom left corner of the (0,0) cell
Which direction do cell coordinates increase?
If saying bottom left above wasn't a clue, x to the right, y up
Is (0,0) x,y in a right handed coordinate system such that (0,0) is the bottom right cell, or is it row,col such that (0,0) is the top left cell?
I think a better way to describe it is that it follows the same coordinates as the world if the resolution is 1m.
Activity
[-]Improve documentation of nav_msgs/GridCells[/-][+]Improve documentation of nav_msgs GridCells and MapMetaData[/+]tfoote commentedon May 18, 2020
@SteveMacenski @DLu could you help fill in this documentation for clarity?
SteveMacenski commentedon May 18, 2020
On GridCells: I can't find anyone that uses that other than grid_maps. It looks like from their code they use it with RVIZ so I think we should be able to derive any information about it from that implementation.
On MapMetaData: The message has the comment in it
which I think makes that clear. This diagram gives a good overview of the coordinate system.
DLu commentedon May 18, 2020
Based on this the coordinates are the same as
mapToWorldwhich is the center. Inrvizthe grid cells are displayed as a point cloud which confirms that the coordinates are the center.No it is the bottom left corner of the (0,0) cell
If saying bottom left above wasn't a clue, x to the right, y up
I think a better way to describe it is that it follows the same coordinates as the world if the resolution is 1m.
I have additional documentation here. While not explicitly for the OccupancyGrid, it does use largely the same math.
Back in the day,
costmap_2dused to publish GridCells but that functionality has been removed.