From d6a4fbcf43494b548342ef32191482f51a848180 Mon Sep 17 00:00:00 2001 From: RBT22 Date: Thu, 30 Jan 2025 07:59:00 +0000 Subject: [PATCH] Reset last_angular_vel_ in activate method Signed-off-by: RBT22 --- .../src/nav2_rotation_shim_controller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp b/nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp index dcf2ea31ea..206c70d743 100644 --- a/nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp +++ b/nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp @@ -122,6 +122,7 @@ void RotationShimController::activate() primary_controller_->activate(); in_rotation_ = false; + last_angular_vel_ = std::numeric_limits::max(); auto node = node_.lock(); dyn_params_handler_ = node->add_on_set_parameters_callback( @@ -144,8 +145,6 @@ void RotationShimController::deactivate() node->remove_on_set_parameters_callback(dyn_params_handler_.get()); } dyn_params_handler_.reset(); - - last_angular_vel_ = std::numeric_limits::max(); } void RotationShimController::cleanup()