From cf37236dd42d2a56d154d6fad970b498ee396c10 Mon Sep 17 00:00:00 2001 From: Alberto Tudela Date: Fri, 14 Jun 2024 00:14:58 +0200 Subject: [PATCH] Update controller.cpp Signed-off-by: Alberto Tudela --- nav2_docking/opennav_docking/src/controller.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nav2_docking/opennav_docking/src/controller.cpp b/nav2_docking/opennav_docking/src/controller.cpp index eb298a71eb..8613f2d27f 100644 --- a/nav2_docking/opennav_docking/src/controller.cpp +++ b/nav2_docking/opennav_docking/src/controller.cpp @@ -60,6 +60,7 @@ Controller::Controller(const rclcpp_lifecycle::LifecycleNode::SharedPtr & node) bool Controller::computeVelocityCommand( const geometry_msgs::msg::Pose & pose, geometry_msgs::msg::Twist & cmd, bool backward) { + std::lock_guard lock(dynamic_params_lock_); cmd = control_law_->calculateRegularVelocity(pose, backward); return true; }