Conversation
saikishor
approved these changes
Jun 25, 2025
soham2560
approved these changes
Jun 28, 2025
Contributor
soham2560
left a comment
There was a problem hiding this comment.
LGTM, works with current version of gz_ros2_control as well
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jazzy #2339 +/- ##
==========================================
+ Coverage 88.67% 88.69% +0.02%
==========================================
Files 145 148 +3
Lines 16745 16818 +73
Branches 1442 1439 -3
==========================================
+ Hits 14848 14917 +69
- Misses 1339 1345 +6
+ Partials 558 556 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief
This addition is the first step towards solving #2141 (also #1732 in some way).
The concept is simple, we are creating a Struct pathway of sorts all the way from the CM to the
on_init()call in the hardware component. This enables future additions without too harsh API/ABI breaks.An example to show this currently is to give the user access to the MultiThreadedExecutor so that they can add nodes to it and publish if necessary by propogating the
executor_from CM all the way toon_init()(refer ab8d08c). A future PR will add a node by default with the hardware_components nameThree Structs have been added to help in the above
on_init()and parsed by user to get all relevant data (hardware_info and executor at this point)Important Note
This means over time we will have to deprecate and remove the non struct based methods
Side Notes
documentation is yet to be added, in particular about notifying the user to not abuse the executor (since they can use the cancel() call internally and cripple the services etc for the CM basically )This is an automatic backport of pull request Shift to Struct based Method and Constructors, with Executor passed from CM to
on_init()#2323 done by Mergify.