Skip to content

Commit

Permalink
adding getCostScalingFactor (ros-navigation#3290)
Browse files Browse the repository at this point in the history
  • Loading branch information
doisyg committed Jan 5, 2023
1 parent f0d761f commit ac62774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nav2_costmap_2d/include/nav2_costmap_2d/inflation_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ class InflationLayer : public Layer
return access_;
}

double getCostScalingFactor()
{
return cost_scaling_factor_;
}

protected:
/**
* @brief Process updates on footprint changes to the inflation layer
Expand Down
2 changes: 1 addition & 1 deletion nav2_costmap_2d/plugins/inflation_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ InflationLayer::dynamicParametersCallback(
need_reinflation_ = true;
need_cache_recompute = true;
} else if (param_name == name_ + "." + "cost_scaling_factor" && // NOLINT
cost_scaling_factor_ != parameter.as_double())
getCostScalingFactor() != parameter.as_double())
{
cost_scaling_factor_ = parameter.as_double();
need_reinflation_ = true;
Expand Down

0 comments on commit ac62774

Please sign in to comment.