File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
nav2_velocity_smoother/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,9 @@ VelocitySmoother::dynamicParametersCallback(std::vector<rclcpp::Parameter> param
401401 result.successful = false ;
402402 }
403403 }
404- max_accels_ = parameter.as_double_array ();
404+ if (result.successful ) {
405+ max_accels_ = parameter.as_double_array ();
406+ }
405407 } else if (name == " max_decel" ) {
406408 for (unsigned int i = 0 ; i != 3 ; i++) {
407409 if (parameter.as_double_array ()[i] > 0.0 ) {
@@ -411,7 +413,9 @@ VelocitySmoother::dynamicParametersCallback(std::vector<rclcpp::Parameter> param
411413 result.successful = false ;
412414 }
413415 }
414- max_decels_ = parameter.as_double_array ();
416+ if (result.successful ) {
417+ max_decels_ = parameter.as_double_array ();
418+ }
415419 } else if (name == " deadband_velocity" ) {
416420 deadband_velocities_ = parameter.as_double_array ();
417421 }
You can’t perform that action at this time.
0 commit comments