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

Merged

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

@saikishor saikishor force-pushed the add/statistics/diagnostics branch from 30744f3 to faf9c75 Compare November 17, 2024 19:49
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 73.87755% with 64 lines in your changes missing coverage. Please review.

Project coverage is 87.59%. Comparing base (2b22d0c) to head (18e67f6).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 58.57% 49 Missing and 9 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.83%   87.59%   -0.25%     
==========================================
  Files         121      122       +1     
  Lines       12555    12766     +211     
  Branches     1131     1146      +15     
==========================================
+ Hits        11028    11182     +154     
- Misses       1108     1155      +47     
- Partials      419      429      +10     
Flag Coverage Δ
unittests 87.59% <73.87%> (-0.25%) ⬇️

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 76.08% <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.61% <58.57%> (-1.69%) ⬇️

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

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

Generally looks really good but I posted a few questions sir

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

thank you!

@bmagyar bmagyar merged commit 89fd4ef into ros-controls:master Dec 3, 2024
15 of 21 checks passed
@saikishor saikishor deleted the add/statistics/diagnostics branch December 3, 2024 15:58
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.

3 participants