From aef063e59e0ab827d45be795ca533da2308bf769 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Sun, 6 Aug 2023 17:28:59 +0200 Subject: [PATCH] add comments explaining the unsigned integer division --- controller_manager/src/controller_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index 33df081f14..0c47febf27 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -623,6 +623,9 @@ controller_interface::return_type ControllerManager::configure_controller( } else if (controller_update_rate != 0 && cm_update_rate % controller_update_rate != 0) { + // NOTE: The following computation is done to compute the approx controller update that can be + // achieved w.r.t to the CM's update rate. This is done this way to take into account the + // unsigned integer division. const auto act_ctrl_update_rate = cm_update_rate / (cm_update_rate / controller_update_rate); RCLCPP_WARN( get_logger(),