Skip to content
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

[Diagnostics] Add diagnostics of execution time and periodicity of the controllers and controller_manager #1871

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

saikishor
Copy link
Member

This PR aims to add diagnostics to the controller_manager and the loaded controllers regarding their periodicity and execution time.

Needs: ros-controls/realtime_tools#192

The diagnostics should kinda look like the following screenshots (The following are only to look at the summary):

image
image
image

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I successfully tested the new diagnostics with the demos (synchronous controllers), but as I haven't used them much a note for myself (would have been valid with #1764 already)

  • per default, /diagnostics is sent with 1Hz by the Updater, we don't set a different value in the CM's constructor
  • diagnostics_updater_ lives in a non RT-thread, and so do also the callback methods.

One comment as we are adding more and more parameters: Would it make sense to use generate_parameter_library also for the CM? I think we can't use it for the per-controller parameters because maps do not work well here, and there is no way to "namespace" parameters with GPL. But for the others?

@saikishor
Copy link
Member Author

@christophfroehlich yes, I thought of using the GPL for this, but I wanted to see your opinion here before taking any decision. I'm open to having this

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 74.28571% with 63 lines in your changes missing coverage. Please review.

Project coverage is 87.76%. Comparing base (da167e7) to head (faf9c75).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 59.28% 49 Missing and 8 partials ⚠️
...ontroller_manager/test/test_controller_manager.cpp 93.75% 5 Missing ⚠️
...roller_interface/src/controller_interface_base.cpp 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1871      +/-   ##
==========================================
- Coverage   87.99%   87.76%   -0.24%     
==========================================
  Files         121      122       +1     
  Lines       12398    12609     +211     
  Branches     1105     1120      +15     
==========================================
+ Hits        10910    11066     +156     
- Misses       1083     1130      +47     
- Partials      405      413       +8     
Flag Coverage Δ
unittests 87.76% <74.28%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...controller_interface/controller_interface_base.hpp 92.30% <ø> (ø)
.../include/controller_manager/controller_manager.hpp 100.00% <ø> (ø)
...ger/include/controller_manager/controller_spec.hpp 100.00% <100.00%> (ø)
controller_manager/src/ros2_control_node.cpp 77.77% <100.00%> (ø)
...ler_manager/test/test_hardware_management_srvs.cpp 98.57% <100.00%> (+0.01%) ⬆️
...roller_interface/src/controller_interface_base.cpp 82.47% <94.11%> (-2.90%) ⬇️
...ontroller_manager/test/test_controller_manager.cpp 96.10% <93.75%> (-0.15%) ⬇️
controller_manager/src/controller_manager.cpp 76.70% <59.28%> (-1.62%) ⬇️

... and 1 file with indirect coverage changes

---- 🚨 Try these New Features:

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. For reference, the doc page looks the following:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants