-
Notifications
You must be signed in to change notification settings - Fork 77
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
Replace existing RealtimeBox implementation with RealtimeBoxBestEffort implementation #146
base: master
Are you sure you want to change the base?
Conversation
…meBox, enable/disable certain methods for pointer types, Box is now usable for pointer types
…tests into a single file and adapted the naming of the existing tests for the RealtimeBox
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #146 +/- ##
==========================================
+ Coverage 72.97% 73.34% +0.36%
==========================================
Files 8 7 -1
Lines 396 409 +13
Branches 65 67 +2
==========================================
+ Hits 289 300 +11
Misses 68 68
- Partials 39 41 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@christophfroehlich I will update this PR as soon as #139 is finished |
Fixes #138 |
@christophfroehlich Given that #139 is now merged I updated this PR. Also pinging @saikishor |
@christophfroehlich Just a note about the CI. Interestingly I just had the case that pre-commit in the CI failed but did run sucessfully on my system. (Note about using the right include guard - REALTIME_TOOLS__REALTIME_BOX_H_) |
Please just add another line to the copyright claim and don't remove the old one if old code remained inside (at least I saw this in other ROS repos) |
@saikishor Perhaps you'll find some time for another review? It will now handle pointers types as before but print a deprecation warning |
Just a friendly ping :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@firesurfer few minor comments.
Thank you and sorry for the huge delay
Co-authored-by: Sai Kishor Kothakota <[email protected]>
hi @firesurfer! after the big changes to ros2_control are done, we now really want to get this PR merged soon.
If we manage to merge this within next week, it might go into the final iron release as well. |
@christophfroehlich I'll try to find sometime to work on this this week |
I can do that. But then I would really like to remove the pointer deprecation message workaround we introduced earlier on - if we are going to break API/ABI by changing the method names. |
@christophfroehlich @bmagyar |
I just realized that I forgot to add copy and move constructors (needed due to the std::mutex not being copyable/movable) and added them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@firesurfer sorry for not getting back sooner. Do you think it is possible to add deprecation notes to the older methods? I think it's better to have a smoother transition to others. What do you think?
BTW do you know which packages we will break with not supporting raw pointers anymore?
@saikishor Could you please elaborate what you mean with "older methods" and by "pages" ? |
@firesurfer I mean the CamelCase methods that you removed in the recent commits. Can we add a deprecation notice to them? "Pages" is a typo here, I just fixed it. I was referring to the packages. Do you know which packages we will break with not supporting raw pointers anymore? |
afaik (according to index.ros.org) there is no package listing realtime_tools as a direct dependency using the RealtimeBox. Apart from that it is hard to track dependencies if they aren't released. |
@saikishor I don't think that is necessary. They were added just recently with the RealtimeBoxBestEffort and I think nobody is using them yet. Regarding the second question: |
Got it. I see that there are none of these methods in the original implementation and so it is backward compatible. Thanks for the explanation.
I could see these released packages are using it in rolling, we just have to make sure that all of these are using shared_ptrs instead of raw pointers. We will have to check the same for
|
Hi as said in #139 this PR replaces the existing RealtimeBox implementation with the new implementation provided in #139 . I merged the tests into a single file and they work fine (even though the existing implementation had only a very small amount of tests)
The implementation of the get/set methods matches exactly the one from the existing implementation apart from some template magic which disables the standard get/set methods for pointer types. (For which they wouldnt provide any thread safety btw from my point of view - see #138)
TLDR: Merging this has the potential to break existing code if someone used pointer types with the RealtimeBox. For everything else it should work just fine.
I would also be happy to provide some documentation on how to use this implementation but I am not sure where in the repository it should go.
This PR should be merged after #139
EDIT: One question regarding the copyright notice for the existing tests. How should this be handled? At the moment I didn't copy any of it to the merged file.