Skip to content

[Diagnostics] Add diagnostics of execution time and periodicity of the hardware components #2086

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

Merged

Conversation

saikishor
Copy link
Member

@saikishor saikishor commented Mar 1, 2025

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

This PR also publishes the periodicity of controller and HW components that run at different rate

This PR also adds new tests for the asynchronous hardware components that were pending in #2076

Tested (#2005) on the real hardware and it seems to work as expected

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

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

Changes look fine, and tested with the demos. Thanks!

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 81.01266% with 60 lines in your changes missing coverage. Please review.

Project coverage is 88.90%. Comparing base (7d81236) to head (91fefea).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 51.61% 36 Missing and 9 partials ⚠️
hardware_interface/src/system.cpp 81.81% 0 Missing and 4 partials ⚠️
...lude/hardware_interface/types/statistics_types.hpp 90.32% 1 Missing and 2 partials ⚠️
hardware_interface/src/actuator.cpp 86.36% 0 Missing and 3 partials ⚠️
hardware_interface/src/resource_manager.cpp 80.00% 0 Missing and 3 partials ⚠️
hardware_interface/src/sensor.cpp 81.81% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2086      +/-   ##
==========================================
- Coverage   89.12%   88.90%   -0.23%     
==========================================
  Files         139      140       +1     
  Lines       16117    16410     +293     
  Branches     1389     1430      +41     
==========================================
+ Hits        14364    14589     +225     
- Misses       1224     1267      +43     
- Partials      529      554      +25     
Flag Coverage Δ
unittests 88.90% <81.01%> (-0.23%) ⬇️

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% <ø> (ø)
...ace_testing/test/test_components/test_actuator.cpp 89.55% <100.00%> (+1.02%) ⬆️
...rface_testing/test/test_components/test_system.cpp 87.87% <100.00%> (+1.21%) ⬆️
...e_interface_testing/test/test_resource_manager.cpp 99.47% <100.00%> (+0.06%) ⬆️
hardware_interface/src/sensor.cpp 76.66% <81.81%> (+0.23%) ⬆️
...lude/hardware_interface/types/statistics_types.hpp 90.32% <90.32%> (ø)
hardware_interface/src/actuator.cpp 80.52% <86.36%> (+0.52%) ⬆️
hardware_interface/src/resource_manager.cpp 76.84% <80.00%> (-0.37%) ⬇️
... and 2 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 tested this successfully on my robot today. It gave me strange results, but it was the first time that I was able to introspect this ;)

Copy link
Contributor

@Juliaj Juliaj left a comment

Choose a reason for hiding this comment

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

LGTM.

@christophfroehlich christophfroehlich moved this from Kilted to Jazzy in Roadmap / Features Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants