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

Use Clock instead of Rate for backward compatibility of rolling #1864

Conversation

saikishor
Copy link
Member

The recently merged : #1810 breaks the backward compatibility of rolling in Humble, as the Humble rclcpp doesn't have the implementation of the Rate using Clock -> https://github.com/ros2/rclcpp/blob/humble/rclcpp/include/rclcpp/rate.hpp#L115

This PR proposes a fix by using the Clock's sleep_until method which is backward compatible and works the same

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.99%. Comparing base (93a2a68) to head (b0d35fb).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/ros2_control_node.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1864      +/-   ##
==========================================
- Coverage   88.01%   87.99%   -0.03%     
==========================================
  Files         121      121              
  Lines       12410    12410              
  Branches     1108     1108              
==========================================
- Hits        10923    10920       -3     
- Misses       1083     1085       +2     
- Partials      404      405       +1     
Flag Coverage Δ
unittests 87.99% <50.00%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
controller_manager/src/ros2_control_node.cpp 77.77% <50.00%> (-0.49%) ⬇️

... and 1 file with indirect coverage changes

@bmagyar
Copy link
Member

bmagyar commented Nov 8, 2024

To avoid this in the future, I think we should add a semi-binary job for Humble too for the master branch.

@bmagyar bmagyar merged commit 5d36d99 into ros-controls:master Nov 8, 2024
18 of 20 checks passed
@saikishor saikishor deleted the use/clock_directly_instead_of_rate branch November 8, 2024 10:19
@christophfroehlich
Copy link
Contributor

To avoid this in the future, I think we should add a semi-binary job for Humble too for the master branch.

I would have done this already, but someone argued against it 😉

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