Skip to content

Commit

Permalink
adding getCostScalingFactor (ros-navigation#3290)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski authored and Joshua Wallace committed Dec 14, 2022
1 parent ab5dcd9 commit 1f74b4d
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 1f74b4d

Please sign in to comment.