Skip to content

Allow action servers without execute callback (backport #1219)#1556

Merged
ahcorde merged 3 commits intojazzyfrom
mergify/bp/jazzy/pr-1219
Dec 9, 2025
Merged

Allow action servers without execute callback (backport #1219)#1556
ahcorde merged 3 commits intojazzyfrom
mergify/bp/jazzy/pr-1219

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Dec 5, 2025

Just like rclcpp and ros1, allow action servers without execute callback.

Example like:

  • Display a message until a button is pressed
  • Actuate a motor until an endstop is reached

are typical cases where an action is succeeded based on information outside of the execute_cb.

It makes more sense to succeed these from outside the execute_cb in this case. And this would be in line with ros1 and rclcpp where this is possible.

I kept the execute_callback in args for backwards compatibility.


This is an automatic backport of pull request #1219 done by Mergify.

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
(cherry picked from commit c170282)

# Conflicts:
#	rclpy/rclpy/action/server.py
#	rclpy/test/test_action_server.py
@mergify mergify bot added the conflicts label Dec 5, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Dec 5, 2025

Cherry-pick of c170282 has failed:

On branch mergify/bp/jazzy/pr-1219
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit c170282.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rclpy/rclpy/action/server.py
	both modified:   rclpy/test/test_action_server.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

@Timple do you mind to take a look ?

@Timple
Copy link
Copy Markdown
Contributor

Timple commented Dec 5, 2025

#1558

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Dec 5, 2025

Pulls: #1556
Gist: https://gist.githubusercontent.com/ahcorde/400f504ff64418bdcb285a87398cb927/raw/2ba62259041e7cbe926cde7503c481d1dc26e240/ros2.repos
BUILD args: --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17697

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Copy Markdown
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm

@fujitatomoya
Copy link
Copy Markdown
Collaborator

fujitatomoya commented Dec 5, 2025

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Dec 8, 2025

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit e547fad into jazzy Dec 9, 2025
3 checks passed
@ahcorde ahcorde deleted the mergify/bp/jazzy/pr-1219 branch December 9, 2025 09:36
jplapp pushed a commit to pixel-robotics/rclpy that referenced this pull request Dec 12, 2025
…os2#1556)

* Allow action servers without execute callback (ros2#1219)

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
(cherry picked from commit c170282)
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants