I’ve created an alternative to the costmap_2d::InflationLayer.
It implements the distance transform algorithm from Felzenszwalb and Huttenlocher and might give you a performance improvement. Consider trying it out, especially if you have a “large” robot-footprint (compared with your costmap resolution).
Currently this layer does not support unknown costs
Is there a specific technical reason it couldn’t support this, or just not in your implementation?
I’d be interested in some more benchmarking and if it indeed outperforms, perhaps replacing the nav2 inflation layer with this algorithm. We did make some 25% speed ups last year in accordance to a pending Nav1 PR. This looks like it could be a great addition!
That’s correct! Awesome, I’ll schedule in a block of time for you.
I’ve also been looking for excuses to have more distance transform in Nav2 after seeing @Jeremie 's work with distance maps. The big thing blocking that has been the char * that costmap used which wasn’t really great for storing distances, but this is a great usage. I figured at some point in the medium term future we’d get to working on environmental models and at that point start integrating it without char * but we haven’t gotten there yet.
Excited to hear about it and learning a bit about how you see things!