From 7938f830cd9f4fd86cb13ee8c3ecc0caa5451b4b Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Wed, 26 Jul 2023 17:20:32 +0200 Subject: [PATCH] fix the issue with the period when the controller update rate is higher than the controller manager --- controller_manager/src/controller_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index dfaf9f68ce..33df081f14 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -1911,7 +1911,7 @@ controller_interface::return_type ControllerManager::update( if (controller_go) { auto controller_ret = loaded_controller.c->update( - time, (controller_update_rate != update_rate_ && controller_update_rate != 0) + time, (controller_update_factor != 1u) ? rclcpp::Duration::from_seconds(1.0 / controller_update_rate) : period);