Skip to content

Fix set_simulation_state STOPPED timeout - #10

Draft
nekomario28 wants to merge 4 commits into
ros2from
fix/919-upstream-final
Draft

Fix set_simulation_state STOPPED timeout#10
nekomario28 wants to merge 4 commits into
ros2from
fix/919-upstream-final

Conversation

@nekomario28

@nekomario28 nekomario28 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Fork-local evidence carrier for upstream gazebosim#950 / issue gazebosim#919. Do not merge this fork PR.

Current base: upstream-aligned ros2 at 2ee8a5c716d1838de0b7ac817638ad5e9304955e.
Current head: 2e830dd25172f1a066c04ff85e79cf8389cf91b7.

Scope

  • arm reset detection before issuing reset requests, avoiding a lost completion notification between action and wait;
  • make ResetSimulation use the same arm -> request -> wait contract;
  • preserve pause during canonical-link state synchronization for released gz-sim versions;
  • implement STOPPED as pause-and-confirm, reset-with-pause, then require reset detection and paused && iterations == 0;
  • add public-interface PLAYING -> STOPPED regression coverage and restore PLAYING afterward.

The attempted PAUSED -> STOPPED / repeated STOPPED -> STOPPED expansion was reverted because the fixture incorrectly expected PAUSED immediately after a STOPPED reset, while the public classifier still reports STOPPED for paused && iterations == 0.

Validation

Current-tree fork ROS2 CI run 32841870243:

  • Pre-commit: PASS (job 97782959967)
  • ros_gz CI (ubuntu:resolute, rolling) Build and Test: PASS (job 97782959680)

The run event is pull_request. Its synthetic merge tree is identical to the current head tree, so this is current-tree validation; it should not be described as exact-head-commit execution.

Earlier Jazzy / Gazebo Harmonic (gz-sim8) minimized candidate, run 32483225071 / job 96773957402:

  • build: PASS
  • ros_gz_sim tests: PASS
  • real gzserver PLAYING -> STOPPED: PASS

Earlier subtractive evidence:

  • removing pause preservation: build/tests PASS, real gzserver FAIL with Timed out while trying to stop simulation (32470884388 / 96737207002);
  • collapsing STOPPED to one pause+reset request while retaining pause preservation and reset arming: build/tests PASS, real gzserver FAIL at the final STOPPED condition (32479212955 / 96761787242).

Backport

The bug was reproduced and fixed on ROS 2 Jazzy + Gazebo Harmonic / gz-sim8, so a Jazzy backport remains justified after the mainline change is accepted.

GenAI assistance is disclosed in commit trailers with Assisted-by: ChatGPT (GPT-5.6 Sol).

Signed-off-by: Yuu <206304251+nekomario28@users.noreply.github.com>
Assisted-by: ChatGPT (GPT-5.6 Sol)
Exercise PLAYING and PAUSED transitions to STOPPED and repeated STOPPED requests through the public simulation interfaces.

Signed-off-by: Yuu <206304251+nekomario28@users.noreply.github.com>
Assisted-by: ChatGPT (GPT-5.6 Sol)
The expanded regression tried to classify PAUSED immediately after a STOPPED reset, but GetSimulationState intentionally reports paused iteration-zero worlds as STOPPED. Restore the previously validated PLAYING -> STOPPED regression instead of encoding an invalid state transition assumption.

Signed-off-by: Yuu <206304251+nekomario28@users.noreply.github.com>
Assisted-by: ChatGPT (GPT-5.6 Sol)
Bring the branch ancestry up to upstream ros2 at 2ee8a5c without rewriting the existing fix history. The merge tree matches the clean merge computed for upstream PR gazebosim#950.

Signed-off-by: Yuu <206304251+nekomario28@users.noreply.github.com>
Assisted-by: ChatGPT (GPT-5.6 Sol)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant