We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0be2f25 commit aaedb05Copy full SHA for aaedb05
nav2_mppi_controller/src/critics/cost_critic.cpp
@@ -34,6 +34,12 @@ void CostCritic::initialize()
34
// Normalized by cost value to put in same regime as other weights
35
weight_ /= 254.0f;
36
37
+ // Normalize weight when parameter is changed dynamically as well
38
+ auto weightDynamicCb = [&](const rclcpp::Parameter & weight) {
39
+ weight_ = weight.as_double() / 254.0f;
40
+ };
41
+ parameters_handler_->addDynamicParamCallback(name_ + ".cost_weight", weightDynamicCb);
42
+
43
collision_checker_.setCostmap(costmap_);
44
possible_collision_cost_ = findCircumscribedCost(costmap_ros_);
45
0 commit comments