Skip to content

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 24, 2025

🦟 Bug fix

Summary

Previously, the services immediately returned true after adding
the command to the pending commands queue which meant that
the return statuses did not reflect the success or failure of
the subsequent execution of the commands.

Needed for gazebosim/ros_gz#790

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 9 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>
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>
… executed command

Previously, the services immediately returned true after adding
the command to the pending commands queue which meant that
the return statuses did not reflect the success or failure of
the subsequent execution of the commands.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Otherwise, there will be a lock up because the service will block waiting for
the command to be executed, but the command won't be executed until the
`Server` is allowed to run.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey added 4 commits July 25, 2025 17:09
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Instead of breaking existing behavior, for each existing service, this adds a new service that
is a blocking version of the service.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey marked this pull request as ready for review July 26, 2025 05:21
@azeey azeey requested a review from mjcarroll as a code owner July 26, 2025 05:21
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested a review from arjo129 as a code owner August 18, 2025 19:56
azeey added 2 commits August 18, 2025 14:58
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested review from iche033 and removed request for mjcarroll August 19, 2025 01:44
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Aug 20, 2025
@azeey
Copy link
Contributor Author

azeey commented Aug 20, 2025

Homebrew failures don't seem to be related to this PR. These tests have started failing in other PRs as well (https://build.osrfoundation.org/job/gz_sim-ci-pr_any-homebrew-amd64/1962) from #3005.

@azeey azeey merged commit 590e0f4 into gazebosim:main Aug 20, 2025
12 of 13 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Aug 20, 2025
@azeey azeey deleted the user_commands_futures branch August 20, 2025 05:07
@azeey
Copy link
Contributor Author

azeey commented Oct 17, 2025

https://github.com/Mergifyio backport gz-sim9 gz-sim8

@mergify
Copy link
Contributor

mergify bot commented Oct 17, 2025

backport gz-sim9 gz-sim8

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 17, 2025
…xecuted command (#2999)

Previously, the services immediately returned true after adding
the command to the pending commands queue which meant that
the return statuses did not reflect the success or failure of
the subsequent execution of the commands.
---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 590e0f4)
mergify bot pushed a commit that referenced this pull request Oct 17, 2025
…xecuted command (#2999)

Previously, the services immediately returned true after adding
the command to the pending commands queue which meant that
the return statuses did not reflect the success or failure of
the subsequent execution of the commands.
---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 590e0f4)
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.

2 participants