Skip to content

Commit

Permalink
don't update costs if inflation radius is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Aug 1, 2017
1 parent 25eeaf5 commit 3dc59cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion costmap_2d/plugins/inflation_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void InflationLayer::onFootprintChanged()
void InflationLayer::updateCosts(costmap_2d::Costmap2D& master_grid, int min_i, int min_j, int max_i, int max_j)
{
boost::unique_lock < boost::recursive_mutex > lock(*inflation_access_);
if (!enabled_)
if (!enabled_ || (cell_inflation_radius_ == 0))
return;

// make sure the inflation list is empty at the beginning of the cycle (should always be true)
Expand Down

0 comments on commit 3dc59cc

Please sign in to comment.