Grid Map is a C++ library with ROS interface that manages two-dimensional grid maps with multiple data layers for mobile robotic mapping.
The library solves the problem of efficiently storing and manipulating diverse spatial data types—such as elevation, variance, color, friction coefficients, and traversability metrics—across a robot's operational area. It uses a two-dimensional circular buffer for data storage, which allows the map to shift position without copying data in memory, making it well-suited for robots that need to follow terrain or reposition their reference frame. Data is stored as Eigen types, enabling direct application of Eigen algorithms for efficient manipulation. The tool provides convenience functions for safe cell access, including iterators for rectangular, circular, polygonal, and linear regions.
Developers should adopt this tool if they are building navigation or mapping systems for mobile robots operating in complex terrain. It is particularly valuable for rough terrain navigation where elevation and surface properties matter. The library integrates directly with ROS ecosystems through message conversions to PointCloud2, OccupancyGrid, GridCells, and a custom GridMap message. It also provides seamless conversion to and from OpenCV image types and compatibility with costmap_2d, PCL, and OctoMap data types. The project includes visualization support through an RViz plugin that renders grid maps as 3D surface plots, plus a filtering framework for processing maps through sequences of operations like thresholding, smoothing, and convolutions. Note that PointCloud2 conversion is currently one-way only.
The project maintains active engagement with its codebase through regular updates and responsive issue tracking. Development is distributed across multiple contributors working on enhancements and bug fixes. The maintainers actively address user-reported issues and incorporate feedback into the library. The codebase shows consistent refinement of core functionality and expansion of integration capabilities with the broader robotics ecosystem.