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

[RTPublisher] use NON_POLLING as default for the realtime pubisher (backport #280) #282

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 19, 2025

Fixes: #212

As reported by @bijoua29

I ran some tests with non-polling in some controllers and perf doesn't even report the sleep anymore. Most of the work is now in the DDS publish() method.

I did another test where I compiled realtime_tools from source and set it to non-polling. When I ran my full stack, the CPU usage of ros2 control node reduced from ~75% to ~52% CPU i.e. around a 30% reduction in CPU usage. Note: this is percent of 1 CPU so since I have 32 CPUs the actual usage is 1/32 of that.


This is an automatic backport of pull request #280 done by Mergify.

)

* Remove the non_polling tests as they are redundant now
* scope instead of calling unlock method
* Use memory orders with atomic State
* Change the turn_ to be aligned with the corresponding loop

(cherry picked from commit 386282f)

# Conflicts:
#	CMakeLists.txt
Copy link
Author

mergify bot commented Feb 19, 2025

Cherry-pick of 386282f has failed:

On branch mergify/bp/jazzy/pr-280
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit 386282f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/realtime_tools/realtime_publisher.hpp
	deleted:    test/realtime_publisher_non_polling.test
	deleted:    test/realtime_publisher_tests_non_polling.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts label Feb 19, 2025
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 70.23%. Comparing base (02d6794) to head (0835663).

Files with missing lines Patch % Lines
include/realtime_tools/realtime_publisher.hpp 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy     #282      +/-   ##
==========================================
- Coverage   70.72%   70.23%   -0.49%     
==========================================
  Files           9        9              
  Lines         526      514      -12     
  Branches       87       84       -3     
==========================================
- Hits          372      361      -11     
+ Misses         99       98       -1     
  Partials       55       55              
Flag Coverage Δ
unittests 70.23% <87.50%> (-0.49%) ⬇️

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 97.67% <87.50%> (+1.31%) ⬆️

@destogl destogl merged commit 9b63c04 into jazzy Feb 19, 2025
11 checks passed
@destogl destogl deleted the mergify/bp/jazzy/pr-280 branch February 19, 2025 18:20
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.

4 participants