Skip to content

Commit

Permalink
added check on costmap layer to see if it is clearable first
Browse files Browse the repository at this point in the history
Signed-off-by: alexander <[email protected]>
  • Loading branch information
alexanderjyuen committed Dec 11, 2024
1 parent b2926d1 commit ce437aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nav2_costmap_2d/plugins/plugin_container_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void PluginContainerLayer::clearArea(int start_x, int start_y, int end_x, int en
++plugin)
{
auto costmap_layer = std::dynamic_pointer_cast<nav2_costmap_2d::CostmapLayer>(*plugin);
if (costmap_layer != nullptr) {
if ((*plugin)->isClearable() && costmap_layer != nullptr) {
costmap_layer->clearArea(start_x, start_y, end_x, end_y, invert);
}
}
Expand Down

0 comments on commit ce437aa

Please sign in to comment.