Skip to content

Update realtime containers #1721

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Update realtime containers #1721

wants to merge 2 commits into from

Conversation

christophfroehlich
Copy link
Contributor

Apply changes from the guidelines added with ros-controls/realtime_tools#347

Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 97.46835% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.70%. Comparing base (483d6ac) to head (f093e00).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
..._drive_controller/src/mecanum_drive_controller.cpp 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1721   +/-   ##
=======================================
  Coverage   85.69%   85.70%           
=======================================
  Files         123      123           
  Lines       11897    11912   +15     
  Branches     1015     1015           
=======================================
+ Hits        10195    10209   +14     
- Misses       1379     1380    +1     
  Partials      323      323           
Flag Coverage Δ
unittests 85.70% <97.46%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...ller/include/mecanum_drive_controller/odometry.hpp 100.00% <ø> (ø)
..._controller/test/test_mecanum_drive_controller.cpp 100.00% <100.00%> (ø)
..._drive_controller/src/mecanum_drive_controller.cpp 90.23% <94.28%> (-0.46%) ⬇️

... and 1 file with indirect coverage changes

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

// If this fails, then another command will be received soon anyways.
ControllerReferenceMsg emtpy_msg;
reset_controller_reference_msg(emtpy_msg, get_node());
input_ref_.try_set(emtpy_msg);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
input_ref_.try_set(emtpy_msg);
input_ref_.set(emtpy_msg);

Shouldn't it be a set in this case? As we are in the activate callback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on_activate is in the rt thread, isn't it?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you are right. In this particular case, it is wiser to use a set, as you want the controller to start with a zero state. Moreover, it is hard to have it blocking, unless you keep spamming the topic even before the controller started

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but if the lock fails here, wouldn't it be very likely that the recently received command can be read with the try_get at the beginning of the update method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

then this blocking set here has no use

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