Skip to content

Commit 5fa4abc

Browse files
adding getCostScalingFactor (#3290)
1 parent 50f0e0e commit 5fa4abc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

nav2_costmap_2d/include/nav2_costmap_2d/inflation_layer.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ class InflationLayer : public Layer
172172
return access_;
173173
}
174174

175+
double getCostScalingFactor()
176+
{
177+
return cost_scaling_factor_;
178+
}
179+
175180
protected:
176181
/**
177182
* @brief Process updates on footprint changes to the inflation layer

nav2_costmap_2d/plugins/inflation_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ InflationLayer::dynamicParametersCallback(
442442
need_reinflation_ = true;
443443
need_cache_recompute = true;
444444
} else if (param_name == name_ + "." + "cost_scaling_factor" && // NOLINT
445-
cost_scaling_factor_ != parameter.as_double())
445+
getCostScalingFactor() != parameter.as_double())
446446
{
447447
cost_scaling_factor_ = parameter.as_double();
448448
need_reinflation_ = true;

0 commit comments

Comments
 (0)