Indeed, we have services that implement the following messages: https://github.com/ros-planning/navig...
Included there are full and partial costmap clearing operations. You can see an example of these in use in the BT navigator's clearing costmap BT node plugins. That's where we handle that logic in Nav2 rather than move_base
. You can see a pythonic example in the nav2_simple_navigator
I added last year which implements the core action APIs for using Nav2 in python without worrying about the ROS details (for the basic use-case): https://github.com/ros-planning/navig...
Eloquent is very old and unsupported now however, though the BT node was one of the first we added so it should be available in Eloquent (but you wouldn't have other extremely significant new features and bug fixes in Eloquent). Please upgrade to at least Galactic, by my personal recommendation. These features are worth it.