Skip to content

Commit

Permalink
added the actual controller update period computation
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Oct 22, 2023
1 parent bc6c158 commit 95fc622
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,9 @@ controller_interface::return_type ControllerManager::update(

if (controller_go)
{
auto controller_ret = loaded_controller.c->update(time, controller_period);
const auto controller_actual_period =
(time - *loaded_controller.next_update_cycle_time) + controller_period;
auto controller_ret = loaded_controller.c->update(time, controller_actual_period);

if (
*loaded_controller.next_update_cycle_time ==
Expand Down

0 comments on commit 95fc622

Please sign in to comment.