Skip to content

Commit

Permalink
add comments explaining the unsigned integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Aug 6, 2023
1 parent 7938f83 commit aef063e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit aef063e

Please sign in to comment.