Skip to content

Fix execution test setup and preemption - #760

Merged
rhaschke merged 1 commit into
moveit:ros2from
ktyang512:fix/issue-759-execution-test
Aug 17, 2026
Merged

Fix execution test setup and preemption#760
rhaschke merged 1 commit into
moveit:ros2from
ktyang512:fix/issue-759-execution-test

Conversation

@ktyang512

@ktyang512 ktyang512 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #759.

The execution test relied on controller-manager ROS arguments being forwarded
to controller nodes. Current ros2_control no longer does that, so the Panda
trajectory controller started without its joints parameter. The controller
failed to load, the combined spawner stopped before starting the joint-state
broadcaster, and the test observed the self-colliding default state.

This passes the existing controller YAML explicitly through the spawner's
--param-file option.

Once controller setup succeeds, the preemption case reaches a second issue:
Task::execute() waits for the cancel response with the free
spin_until_future_complete(node, future) helper even though that node already
belongs to its local executor. Reusing the existing executor avoids adding the
node twice and preserves the expected PREEMPTED result.

Finally, the post-shutdown assertion now checks the actual test executable.
The previous all-process assertion also attributed an existing released
move_group teardown crash to this MTC test; the same crash is present in the
unmodified base CI run after the functional test process stops.

Validation:

  • Rolling focused execution test passed, including five consecutive repeats
  • Jazzy: 6 packages built; 170 tests, 0 failures, 3 skipped
  • Kilted: 6 packages built; 170 tests, 0 failures, 3 skipped
  • Lyrical: 6 packages built; 170 tests, 0 failures, 19 skipped
  • Kilted Clang 18 build, repository clang-tidy checks with warnings as errors,
    and focused execution test passed
  • Rolling ASan build and all 14 sanitizer-enabled C++ test targets passed
    (test_execution is intentionally disabled by the existing CMake condition
    when -fsanitize is present)
  • pre-commit, clang-format, and git diff --check passed

Summary by CodeRabbit

  • Bug Fixes
    • Improved controller startup by ensuring the configured controller parameters are loaded correctly.
    • Refined shutdown validation to check the relevant test process exit code accurately.
    • Improved action cancellation reliability during task execution.

Pass the controller configuration through the spawner, reuse the executor that already owns the action client node while canceling, and only assert the test process exit code.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 430cbda2-3ab3-4ce8-a92c-7c5c987c8982

📥 Commits

Reviewing files that changed from the base of the PR and between d183144 and ed02780.

📒 Files selected for processing (2)
  • capabilities/test/test_execution.launch.py
  • core/src/task.cpp

Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The pull request fixes ROS 2 controller configuration passing, narrows launch-test exit-code validation to the target process, and completes preemption cancellation through the local executor.

Changes

Execution fixes

Layer / File(s) Summary
Execution test launch and validation
capabilities/test/test_execution.launch.py
The controller spawner receives ros2_controllers_path through --param-file. The exit-code test validates the selected test process.
Preemption cancellation completion
core/src/task.cpp
Preemption cancellation uses the local SingleThreadedExecutor to await completion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ed027

The changes correct test setup and preemption handling, with the reported focused, cross-distribution, sanitizer, static-analysis, and formatting checks passing; no actionable merge-blocking risk remains beyond normal review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the execution test setup and preemption fixes.
Linked Issues check ✅ Passed The launch change addresses the controller setup identified as the cause of the colliding start state in [#759].
Out of Scope Changes check ✅ Passed The test setup and cancellation changes directly support the stated execution test and preemption objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@rhaschke rhaschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for handling this issue!

@rhaschke
rhaschke merged commit c411289 into moveit:ros2 Aug 17, 2026
5 of 8 checks passed
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.

Integration test failing due to colliding start state

2 participants