-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Period calculation in controller_manager incorrect? #1769
Labels
Comments
saikishor
added a commit
to pal-robotics-forks/ros2_control
that referenced
this issue
Oct 1, 2024
…e to unify with RM Fixes ros-controls#1769
saikishor
added a commit
to pal-robotics-forks/ros2_control
that referenced
this issue
Oct 16, 2024
…e to unify with RM Fixes ros-controls#1769
saikishor
added a commit
to pal-robotics-forks/ros2_control
that referenced
this issue
Oct 17, 2024
…e to unify with RM Fixes ros-controls#1769
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I do have the impression that the period calculation introduced in #1140 actually causes some problems. This is maybe related to #1574 but I am not completely sure, hence a new issue.
When implementing a controller I realized that the periods reported to the controller were way too large (roughly factor 2), while a debug statement printing those periods was printed in the correct frequency. To debug this further I added a couple of logging statements to the controller_manager:
https://github.com/fmauch/ros2_control/tree/debug_periods
Some example output:
Similar output can straightforward be produced using
What I realized: At some point there is a control cycle where the controller doesn't receive an update (
update time:
) is printed at the beginning of CM'supdate
method, while the other logs are from the inner loop over the controllers.So, a skipped controller update due to a cm cycle time under the desired period due to some system jitter results in an all-time wrong period.
What basically happens with a cm rate == controller rate == 5 Hz with some jitter:
Expected behavior
I would expect that the period times normalize again after such an incident.
One way to achieve this could be to increment the next cycletime as such
but I think this wouldn't do any controller justice for which the controller update times would not exactly match the controller_manager rate.
E.g.: Controller manager running with 10 Hz, controller running with 3 Hz
Correctly:
With the proposed approach:
The text was updated successfully, but these errors were encountered: