File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
nav2_regulated_pure_pursuit_controller/src Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,17 @@ rcl_interfaces::msg::SetParametersResult ParameterHandler::validateParameterUpda
221221 const auto & name = parameter.get_name ();
222222
223223 if (type == ParameterType::PARAMETER_DOUBLE) {
224- if (name == plugin_name_ + " .inflation_cost_scaling_factor" ) {
225- if (parameter.as_double () <= 0.0 ) {
226- RCLCPP_WARN (
227- logger_, " The value inflation_cost_scaling_factor is incorrectly set, "
228- " it should be >0. Ignoring parameter update." );
229- result.successful = false ;
230- }
224+ if (name == plugin_name_ + " .inflation_cost_scaling_factor" && parameter.as_double () <= 0.0 ) {
225+ RCLCPP_WARN (
226+ logger_, " The value inflation_cost_scaling_factor is incorrectly set, "
227+ " it should be >0. Ignoring parameter update." );
228+ result.successful = false ;
229+ } else if (parameter.as_double () < 0.0 ) {
230+ RCLCPP_WARN (
231+ logger_, " The value of parameter '%s' is incorrectly set to %f, "
232+ " it should be >=0. Ignoring parameter update." ,
233+ name.c_str (), parameter.as_double ());
234+ result.successful = false ;
231235 }
232236 } else if (type == ParameterType::PARAMETER_BOOL) {
233237 if (name == plugin_name_ + " .allow_reversing" ) {
You can’t perform that action at this time.
0 commit comments