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 hardware components #2005

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

Conversation

saikishor
Copy link
Member

@saikishor saikishor commented Jan 16, 2025

This PR aims to add diagnostics to the hardware components regarding their periodicity and execution time.

This PR also fixes the Async HW components runnings at different frequencies and also the periodicity of the main async components that run at mainline frequency

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

image
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.

just some documentation comments at the moment. And is the failing downstream test related?

controller_manager/src/controller_manager_parameters.yaml Outdated Show resolved Hide resolved
error: {
type: double,
default_value: 10.0,
description: "The error threshold for the mean error of the hardware component's read/write loop. If the mean error exceeds this threshold, an error diagnostic will be published. This diagnostics will be published only for the asynchronous hardware component, because any affect to the synchronous hardware components will be reflected directly in the controller manager's periodicity.",
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move some parts of the description to the parameters_context.yaml file, because they are repeating a lot? but I see that it is not sorted correctly in the rst, I'll have a look to fix that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with you. Let's get this in as it is consistent with others for now, and let's fix it in a different PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

the sorting is fixed now with ros-controls/control.ros.org#384

Copy link
Member Author

Choose a reason for hiding this comment

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

Awesome. I fixed the paramters_context.yaml as you suggested :)

@saikishor
Copy link
Member Author

just some documentation comments at the moment. And is the failing downstream test related?

I'm not sure. I'll take a look

Co-authored-by: Christoph Fröhlich <[email protected]>
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 78.93462% with 87 lines in your changes missing coverage. Please review.

Project coverage is 89.01%. Comparing base (f8c03cc) to head (a59873f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 52.68% 36 Missing and 8 partials ⚠️
.../include/hardware_interface/actuator_interface.hpp 81.25% 4 Missing and 5 partials ⚠️
...ce/include/hardware_interface/system_interface.hpp 81.25% 4 Missing and 5 partials ⚠️
hardware_interface/src/actuator.cpp 82.35% 2 Missing and 4 partials ⚠️
hardware_interface/src/system.cpp 82.35% 2 Missing and 4 partials ⚠️
...ce/include/hardware_interface/sensor_interface.hpp 81.81% 2 Missing and 2 partials ⚠️
...lude/hardware_interface/types/statistics_types.hpp 90.32% 1 Missing and 2 partials ⚠️
hardware_interface/src/resource_manager.cpp 91.17% 0 Missing and 3 partials ⚠️
hardware_interface/src/sensor.cpp 82.35% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2005      +/-   ##
==========================================
- Coverage   89.35%   89.01%   -0.34%     
==========================================
  Files         130      131       +1     
  Lines       14576    14887     +311     
  Branches     1258     1303      +45     
==========================================
+ Hits        13024    13252     +228     
- Misses       1088     1138      +50     
- Partials      464      497      +33     
Flag Coverage Δ
unittests 89.01% <78.93%> (-0.34%) ⬇️

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

Files with missing lines Coverage Δ
..._interface/include/hardware_interface/actuator.hpp 100.00% <ø> (ø)
...re_interface/include/hardware_interface/sensor.hpp 100.00% <ø> (ø)
...re_interface/include/hardware_interface/system.hpp 100.00% <ø> (ø)
...e_interface_testing/test/test_resource_manager.cpp 99.50% <100.00%> (+0.03%) ⬆️
...lude/hardware_interface/types/statistics_types.hpp 90.32% <90.32%> (ø)
hardware_interface/src/resource_manager.cpp 75.18% <91.17%> (+0.15%) ⬆️
hardware_interface/src/sensor.cpp 75.57% <82.35%> (-0.47%) ⬇️
...ce/include/hardware_interface/sensor_interface.hpp 90.00% <81.81%> (-5.39%) ⬇️
hardware_interface/src/actuator.cpp 79.41% <82.35%> (-1.26%) ⬇️
hardware_interface/src/system.cpp 79.41% <82.35%> (-1.26%) ⬇️
... and 3 more

... and 4 files with indirect coverage changes

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