Skip to content

Commit

Permalink
Fix obstacle layer reporting current after reset even if it is not cu…
Browse files Browse the repository at this point in the history
…rrent
  • Loading branch information
schupf2 committed Dec 17, 2024
1 parent cf5f9f3 commit 458a20e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nav2_costmap_2d/plugins/obstacle_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,9 @@ ObstacleLayer::updateCosts(
return;
}

// if not current due to reset, set current now after clearing
// set was_reset to false again
if (!current_ && was_reset_) {
was_reset_ = false;
current_ = true;
}

if (footprint_clearing_enabled_) {
Expand Down Expand Up @@ -758,7 +757,6 @@ void
ObstacleLayer::reset()
{
resetMaps();
resetBuffersLastUpdated();
current_ = false;
was_reset_ = true;
}
Expand Down

0 comments on commit 458a20e

Please sign in to comment.