ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

New Software Release - Cost Map

Dear ROS community,

Following on from Peter’s announcement of the Grid Map Package, we’re happy to announce it’s partner in crime - CostMap. We’ve worked with Peter over the last few months to put together a package that is as compatible as possible with grid maps in terms of conventions, definitions and api, but provides these for maps with an unsigned char storage element (as opposed to grid map’s float).


Like the grid_map library, cost_map is also built on top of Eigen and comes with iterators, converters and visualisers. There is also a helper library to do conversions from Navi Stacks Costmap2D library so you can do a step by step migration to much richer cost map containers with many debugging utilities and visualisations that also directly convert to float based containers for calculations (grid_map) with a common api. Together, these can help accelerate the development of your planners and controllers.


Start with cost_map/ Since they share so much in common (iterators, api, …) a browse of grid_map/ is also recommended.


0.3.0 is already available for kinetic from the OSRF build farm. 0.3.1 is in the pipeline for both indigo and kinetic on their next respective syncs.


It’s a first iteration to explore where it should be taken. While existing in parallel, as many templates methods as possible are shared with the grid map library to eliminate code duplication. Future development could (should) develop an independent shared library for both packages rather than having a grid map dependency for cost maps, or even roll both together in a single CRTP eigen style format. These directions were delayed to enable rapid development and usage before committing to a more extensive framework upgrade.

The package is reasonably stable. It has been road tested on Yujin’s GoCarts for the last six months.


Many thanks must go to Péter Fankhauser for his great grid_map library and enthusiastic collaboration. It’s a very useful tool with all the bells and whistles of modern programming techniques.

1 Like

The link at the bottom “inflation demo program” seems broken

EDIT: missing ‘s’ in inflationS.cpp also lots of link are not relative i.e. https://…

Exactly right, forgot about relative links when updating recently. Thanks.