Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of nav_msgs GridCells and MapMetaData #95

Closed
tfoote opened this issue Apr 7, 2020 · 3 comments · Fixed by #117
Closed

Improve documentation of nav_msgs GridCells and MapMetaData #95

tfoote opened this issue Apr 7, 2020 · 3 comments · Fixed by #117

Comments

@tfoote
Copy link
Contributor

tfoote commented Apr 7, 2020

This is a follwup to the pre Foxy Message API review

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?

@tfoote tfoote changed the title Improve documentation of nav_msgs/GridCells Improve documentation of nav_msgs GridCells and MapMetaData Apr 7, 2020
@tfoote
Copy link
Contributor Author

tfoote commented May 18, 2020

@SteveMacenski @DLu could you help fill in this documentation for clarity?

@SteveMacenski
Copy link
Contributor

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.

@DLu
Copy link
Contributor

DLu commented May 18, 2020

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.

I have additional documentation here. While not explicitly for the OccupancyGrid, it does use largely the same math.

Back in the day, costmap_2d used to publish GridCells but that functionality has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants