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

Update plugin lib exception handling #263

Merged

Conversation

Juliaj
Copy link
Contributor

@Juliaj Juliaj commented Jan 7, 2025

Address #257

@christophfroehlich , regarding to catch(...), I left it out since I am not sure what would be useful to log. I'm open to add it if you could provide some suggestions.

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.

Project coverage is 74.88%. Comparing base (e7049ab) to head (1ee9a9c).

Files with missing lines Patch % Lines
include/control_filters/exponential_filter.hpp 50.00% 2 Missing ⚠️
include/control_filters/low_pass_filter.hpp 50.00% 2 Missing ⚠️
include/control_filters/rate_limiter.hpp 50.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           ros2-master     #263      +/-   ##
===============================================
+ Coverage        74.81%   74.88%   +0.06%     
===============================================
  Files               24       24              
  Lines             1104     1107       +3     
  Branches            86       86              
===============================================
+ Hits               826      829       +3     
  Misses             231      231              
  Partials            47       47              
Flag Coverage Δ
unittests 74.88% <64.70%> (+0.06%) ⬆️

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

Files with missing lines Coverage Δ
test/control_filters/test_exponential_filter.cpp 100.00% <100.00%> (ø)
include/control_filters/exponential_filter.hpp 68.42% <50.00%> (+21.05%) ⬆️
include/control_filters/low_pass_filter.hpp 59.37% <50.00%> (-12.50%) ⬇️
include/control_filters/rate_limiter.hpp 73.07% <50.00%> (ø)

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.

Thank you for your contribution!

Please fix the pre-commit issues (see the failing CI jobs). You can check that locally by pre-commit run --all, instructions for that you can find in the good first issue text or the contribution guidelines on control.ros.org

Regarding catch (...): I suggest adding a similar log like in the controller_manager?

bmagyar
bmagyar previously approved these changes Jan 7, 2025
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.

Ah this is much nicer, thank you!

Copy link
Member

@saikishor saikishor 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 good to me.

Just pre-commit fixes

@Juliaj
Copy link
Contributor Author

Juliaj commented Jan 7, 2025

@christophfroehlich , thanks for the pre-commit pointer. My bad, I didn't run it with --all. Fix made.

As for catch(...), thanks for sharing an example. The load_controller takes in two the input parameters which are logged as part of the catch all log statement. For our use case, the method configure() takes no parameter. I made an update to log a general statement. Feedback is appreciated.

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.

Thanks!

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

Looks great.
Thanks for adding tests!

@christophfroehlich christophfroehlich merged commit ec19b21 into ros-controls:ros2-master Jan 8, 2025
27 checks passed
@Juliaj Juliaj deleted the plugin_exception branch January 8, 2025 16:19
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.

5 participants