Closed ompugao closed 4 years ago
when a user load costmap_2d plugins with nav_core_adapter, 'costmap_2d::Costmap2D::resetMap' does not reset plugins' costmaps. instead, we need to use 'costmap_2d_ros::Costmap2DROS::resetLayers'.
we can mimic the way move_base does: https://github.com/ros-planning/navigation/blob/melodic-devel/move_base/src/move_base.cpp#L333
implementation of resetLayers: https://github.com/ros-planning/navigation/blob/melodic-devel/costmap_2d/src/costmap_2d_ros.cpp#L557
Thanks for the contribution!
when a user load costmap_2d plugins with nav_core_adapter, 'costmap_2d::Costmap2D::resetMap' does not reset plugins' costmaps. instead, we need to use 'costmap_2d_ros::Costmap2DROS::resetLayers'.
we can mimic the way move_base does: https://github.com/ros-planning/navigation/blob/melodic-devel/move_base/src/move_base.cpp#L333
implementation of resetLayers: https://github.com/ros-planning/navigation/blob/melodic-devel/costmap_2d/src/costmap_2d_ros.cpp#L557