Skip to content

Commit

Permalink
Added the fix to solve inconsistency w.r.t controller update rate
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jul 1, 2023
1 parent 0748e1e commit a622517
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,9 @@ controller_interface::return_type ControllerManager::update(
{
const auto controller_update_rate = loaded_controller.c->get_update_rate();

bool controller_go =
controller_update_rate == 0 || ((update_loop_counter_ % controller_update_rate) == 0);
bool controller_go = controller_update_rate == 0 ||
((update_loop_counter_ % controller_update_rate) == 0) ||
(controller_update_rate >= update_rate_);
RCLCPP_DEBUG(
get_logger(), "update_loop_counter: '%d ' controller_go: '%s ' controller_name: '%s '",
update_loop_counter_, controller_go ? "True" : "False",
Expand Down

0 comments on commit a622517

Please sign in to comment.