Skip to content

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 24, 2025

🦟 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

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

azeey added 2 commits July 23, 2025 20:02
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>
@azeey azeey requested a review from mjcarroll as a code owner July 24, 2025 01:30
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label Jul 24, 2025
Copy link
Contributor

@arjo129 arjo129 left a 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.

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Jul 24, 2025
azeey added 4 commits July 23, 2025 21:03
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>
azeey added 2 commits July 25, 2025 17:09
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey added this to the Jetty Release milestone Jul 28, 2025
@azeey azeey merged commit bf68eae into gazebosim:main Aug 18, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Aug 18, 2025
@azeey
Copy link
Contributor Author

azeey commented Oct 16, 2025

@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)

@mergify
Copy link
Contributor

mergify bot commented Oct 16, 2025

backport gz-sim9 gz-sim8

✅ 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
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants