-
Notifications
You must be signed in to change notification settings - Fork 342
Refactor Transport service handlers UserCommands
#2996
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
Merged
Merged
Conversation
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
This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
arjo129
approved these changes
Jul 24, 2025
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.
LGTM, after style fixes.
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
9 tasks
scpeters
reviewed
Jul 24, 2025
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@Mergifyio backport gz-sim9 gz-sim8 Backporting to Ionic and Harmonic to get gazebosim/ros_gz#790 backported all the way to Jazzy. See gazebosim/ros_gz#732 (comment) |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 16, 2025
* Refactor Transport service handlers This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Also refactor code for advertising services Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add back missing function Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Update our usage of workerpools (#2995) In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix linter issues Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix typo Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add missing constructor Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> --------- Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> (cherry picked from commit bf68eae)
mergify bot
pushed a commit
that referenced
this pull request
Oct 16, 2025
* Refactor Transport service handlers This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Also refactor code for advertising services Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add back missing function Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Update our usage of workerpools (#2995) In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix linter issues Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix typo Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add missing constructor Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> --------- Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> (cherry picked from commit bf68eae) # Conflicts: # src/systems/user_commands/UserCommands.cc
This was referenced Oct 16, 2025
azeey
added a commit
that referenced
this pull request
Oct 17, 2025
* Refactor Transport service handlers This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Also refactor code for advertising services Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add back missing function Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Update our usage of workerpools (#2995) In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix linter issues Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix typo Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add missing constructor Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> --------- Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey
added a commit
that referenced
this pull request
Oct 17, 2025
* Refactor Transport service handlers This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Also refactor code for advertising services Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add back missing function Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Update our usage of workerpools (#2995) In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix linter issues Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix typo Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add missing constructor Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> --------- Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> (cherry picked from commit bf68eae)
azeey
added a commit
that referenced
this pull request
Oct 17, 2025
* Refactor Transport service handlers This removes a lot of repetitive code where a service handler simply copies the message, creates and adds the associated command to a command queue. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Also refactor code for advertising services Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add back missing function Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Update our usage of workerpools (#2995) In `SimulationRunner`, we initialize a worker pool but we never actually use it so it's pure overhead. In `ServerPrivate` we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix linter issues Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Fix typo Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add missing constructor Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> --------- Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
This was referenced Oct 17, 2025
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.
🦟 Bug fix
Summary
This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.
This is a precursor to a follow-up PR that changes the service handlers to wait for the execution of the command before returning.
Note: It might be easier to review each commit separately.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.