Skip to content

Improve documentation of nav_msgs GridCells and MapMetaData #95

Closed

Description

@tfoote

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?

Activity

  1. changed the title [-]Improve documentation of nav_msgs/GridCells[/-] [+]Improve documentation of nav_msgs GridCells and MapMetaData[/+] on Apr 7, 2020
  2. tfoote commented on May 18, 2020

    @tfoote
    ContributorAuthor

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

  3. SteveMacenski commented on May 18, 2020

    @SteveMacenski
    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.

  4. DLu commented on May 18, 2020

    @DLu
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions