Robotics StackExchange | Archived questions

Nav2 Costmap plugin - How to make cost changes persistent?

Hi all,

I'm currently writing a plugin for the Nav2 costmap. The goal is to set costs for the global costmap. Unfortunately, the costs need to be updated in the exact same place on every iteration. Is there a workaround so that I only have to set the costs once and the costmap keeps the changes for every other iteration?

Many thanks in andvance!

Asked by ChWa02 on 2023-08-02 03:47:48 UTC

Comments

Answers

The internal data structure to the costmap layers stores your layer's information that is to persist. When we do update cycles to update the costs, that is what's called upon in the current window of updates to provide its values. If you want persistence, you need to persist the data in the layer so its updated as static information for each subsequent update cycle.

Asked by stevemacenski on 2023-08-02 14:27:53 UTC

Comments