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

First step towards modernizing the rt publisher #210

Merged
merged 8 commits into from
Dec 13, 2024

Conversation

firesurfer
Copy link
Contributor

I think the rt publisher is one of the most commonly used tools in this package.
When ever I was using it I stumbled upon its "weird" API.

This PR is a first step towards modernizing the RealtimePublisher class, providing a tiny bit of comfort by adding a tryPublish method and providing some typedefs similar to the rclcpp::Publisher.

I plan to add a follow up PR where I refactor the NON_POLLING define into a template parameter.

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.16%. Comparing base (be039a0) to head (60f2854).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   72.72%   73.16%   +0.43%     
==========================================
  Files           7        7              
  Lines         429      436       +7     
  Branches       71       72       +1     
==========================================
+ Hits          312      319       +7     
  Misses         73       73              
  Partials       44       44              
Flag Coverage Δ
unittests 73.16% <100.00%> (+0.43%) ⬆️

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

Files with missing lines Coverage Δ
include/realtime_tools/realtime_publisher.hpp 96.36% <100.00%> (+0.53%) ⬆️

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.

Makes sense to me

@firesurfer
Copy link
Contributor Author

@christophfroehlich anything missing in order to get this merged?
The CI checks fail due to some flaky tests of the AsyncFunctionHandler.

@christophfroehlich
Copy link
Contributor

another review ;)

@firesurfer
Copy link
Contributor Author

And I just added a test for the tryPublish method :)

@saikishor would you mind reviewing this PR ?

@saikishor
Copy link
Member

And I just added a test for the tryPublish method :)

@saikishor would you mind reviewing this PR ?

I'll check it during the day. I have some pending review already

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.

In general LGTM!

I left some minor comments

include/realtime_tools/realtime_publisher.hpp Show resolved Hide resolved
include/realtime_tools/realtime_publisher.hpp Outdated Show resolved Hide resolved
@christophfroehlich christophfroehlich added the backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble. label Dec 13, 2024
@christophfroehlich christophfroehlich merged commit e58c7ad into ros-controls:master Dec 13, 2024
18 checks passed
mergify bot pushed a commit that referenced this pull request Dec 13, 2024
christophfroehlich pushed a commit that referenced this pull request Dec 19, 2024
Co-authored-by: Lennart Nachtigall <firesurfer127@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants