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

map_saver: fix saved raw image being too dark #4712

Commits on Oct 7, 2024

  1. nav2_map_server: map_io: fix Magick::Quantum value when saving raw map

    The map cell value comes from an OccupancyGrid and ranges from -1 to
    100. So, it makes no sense to divide this value by 255 when computing
    the intensity ratio.
    DylanDeCoeyer-Quimesis committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    ca1970b View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. nav2_map_server: map_io: generalize computation of raw map pixel value

    This implementation is inspired from the Costmap2D implementation [1].
    It remains valid even if the LETHAL_OBSTACLE, FREE_SPACE,
    OCC_GRID_OCCUPIED, and OCC_GRID_FREE constants are modified in the
    future. Unfortunately, the nav2_costmap_2d namespace cannot be accessed
    from this module, so the LETHAL_OBSTACLE and FREE_SPACE constants had
    to be hard-coded.
    
    By the same way, this commit fixes an issue in the output image where
    the areas of NO_INFORMATION and LETHAL_OBSTACLES cannot be distinguished
    as they both use the same value: 255. Now, the LETHAL_OBSTACLES pixels
    are restored to their rightful value: 254.
    
    [1] https://github.com/ros-navigation/navigation2/blob/main/nav2_costmap_2d/src/costmap_2d.cpp#L80
    DylanDeCoeyer-Quimesis committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    8c8c10b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32d7fc0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6654d52 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3356872 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    93a7f0b View commit details
    Browse the repository at this point in the history