Skip to content

Allow action servers without execute callback#1219

Merged
ahcorde merged 3 commits intoros2:rollingfrom
nobleo:do-not-force-executive-callback
Nov 13, 2025
Merged

Allow action servers without execute callback#1219
ahcorde merged 3 commits intoros2:rollingfrom
nobleo:do-not-force-executive-callback

Conversation

@Timple
Copy link
Copy Markdown
Contributor

@Timple Timple commented Feb 13, 2024

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.

@Timple Timple force-pushed the do-not-force-executive-callback branch from d6f14c9 to 0dcf078 Compare February 13, 2024 18:10
@Timple Timple force-pushed the do-not-force-executive-callback branch from ac385b9 to d6163dc Compare February 14, 2024 16:57
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.

@Timple thanks for the contribution.

i think this is reasonable and aligns with rclcpp, but i would like to have another review from maintainers.

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Feb 22, 2024

Alright, we'll wait for those 🙂

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Mar 19, 2024

Subtle ping 🙂

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Apr 12, 2024

Sorry for subtle bump again, but Jade is coming up. And I'm afraid breaking changes won't be accepted anymore soon.

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@clalancette @sloretz @ahcorde either of you, can you take a look at this? i think this is reasonable and more flexibility for rclpy client.

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@Timple can you rebase this to rolling? almost 100 commits are behind.

@Timple Timple force-pushed the do-not-force-executive-callback branch from d6163dc to 0cf2d64 Compare April 14, 2024 08:21
@Timple Timple changed the base branch from iron to rolling April 14, 2024 08:21
@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Apr 14, 2024

@Timple can you rebase this to rolling? almost 100 commits are behind.

Done!

@Timple Timple force-pushed the do-not-force-executive-callback branch from 0cf2d64 to 26a7fdc Compare April 14, 2024 08:23
@ros-discourse
Copy link
Copy Markdown

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/upcoming-feature-freeze-for-ros-2-jazzy-jalisco-on-15th-april-2024/37075/2

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Apr 29, 2024

So I missed the jazzy release 😿

But this PR had some proper traction. Can we still get this in rolling?

If everybody is very busy doing release stuff for jazzy, I also fully understand. Then I'll apply some sort of exponential backoff to my pings 🙂

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@Timple sorry we missed this to jazzy. i will start the CI.

CC: @sloretz

@fujitatomoya
Copy link
Copy Markdown
Collaborator

CI:

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

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented May 16, 2024

It's green! 😄

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@sloretz @clalancette friendly ping.

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Jun 25, 2024

Joehoe ❤️

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.

I don't know the status of this PR or if this is still relevant, but I can see some conflicts

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Oct 1, 2025

Well... Only if I can get some guarantee that it will be merged any time soon after fixing it :D

@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Oct 1, 2025

Well... Only if I can get some guarantee that it will be merged any time soon after fixing it :D

Sure, I will review it

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@Mergifyio rebase

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Oct 2, 2025

rebase

☑️ Nothing to do, the required conditions are not met

Details
  • -conflict [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • queue-position = -1 [📌 rebase requirement]
  • any of:
    • #commits > 1 [📌 rebase requirement]
    • #commits-behind > 0 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Oct 2, 2025

That would have been great if that fixed it :).

The rebase should be fairly trivial but I won't get to this until next week. So if someone wants to give it a go..

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
@Timple Timple force-pushed the do-not-force-executive-callback branch from cba9dbb to f823a4d Compare November 11, 2025 07:00
@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Nov 11, 2025

Rebased

@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Nov 11, 2025

Pulls: #1219
Gist: https://gist.githubusercontent.com/ahcorde/71ed983eb296a54593aa3c4727962a2d/raw/9669a71d2cf8597ba6b7140fac6148f2e245a4d0/ros2.repos
BUILD args: --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17453

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

@ahcorde ahcorde merged commit c170282 into ros2:rolling Nov 13, 2025
2 of 3 checks passed
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Nov 13, 2025

Thank you for pushing this @Timple

@Timple
Copy link
Copy Markdown
Contributor Author

Timple commented Dec 4, 2025

Can this be backported to Jazzy & Kilted as well?
It doesn't break existing code and with python we don't have ABI I guess?

@fujitatomoya
Copy link
Copy Markdown
Collaborator

the changes made are backward-compatible and do not break user-space code, maintains existing function signatures

@fujitatomoya
Copy link
Copy Markdown
Collaborator

@Mergifyio backport jazzy kilted

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 5, 2025

backport jazzy kilted

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Dec 5, 2025
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 bot pushed a commit that referenced this pull request Dec 5, 2025
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
(cherry picked from commit c170282)
Timple added a commit to nobleo/rclpy that referenced this pull request Dec 5, 2025
Timple added a commit to nobleo/rclpy that referenced this pull request Dec 5, 2025
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
ahcorde pushed a commit that referenced this pull request Dec 5, 2025
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
ahcorde pushed a commit that referenced this pull request Dec 8, 2025
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl>
ahcorde added a commit that referenced this pull request Dec 9, 2025
* Allow action servers without execute callback (#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>
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>
InvincibleRMC pushed a commit to InvincibleRMC/rclpy that referenced this pull request Jan 12, 2026
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
InvincibleRMC added a commit that referenced this pull request Jan 21, 2026
)

* Fix warnings from gcc. (#1501)

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Update type_support to use new abcs

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Cleanup old test cases to use new automatic inference

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add content-filtered-topic interfaces (#1506)

Signed-off-by: Barry Xu <Barry.Xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Added lock to protect futures for multithreaded executor (#1477)

Signed-off-by: brennanmk <brennanmk2200@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* EventsExecutor: Handle async callbacks for services and subscriptions (#1478)

Closes #1473

Signed-off-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* add spinning state for the Executor classes. (#1510)

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Fixes Action.*_async futures never complete (#1308)

Per rclpy:1123 If two seperate client server actions are running in seperate executors the future given to the ActionClient will never complete due to a race condition
This fixes  the calls to rcl handles potentially leading to deadlock scenarios by adding locks to there references
Co-authored-by: Aditya Agarwal <aditya.kgp25@gmail.com>
Co-authored-by: Jonathan Blixt <jmblixt3@gmail.com>
Signed-off-by: Jonathan Blixt <jmblixt3@gmail.com>

Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove unused 'param_type' (#1524)

'param_type' is set but never used

Signed-off-by: Christian Rauch <Christian.Rauch@unileoben.ac.at>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Changelog

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* 10.0.1

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Remove duplicate future handling from send_goal_async (#1532)

A recent change intended to move this logic into a lock context, but
actually ended up duplicating it instead. This fixes that by removing
the duplicated logic outside of the lock. It also preserves the explicit
typing annotation on the future.

Signed-off-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix(test_events_executor): destroy all nodes before shutdown (#1538)

Signed-off-by: yuanyuyuan <az6980522@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* add BaseImpl

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add ImplT Support

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix changelong

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Remove accidental tuple (#1542)

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Allow action servers without execute callback (#1219)

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>

* add : get clients, servers info (#1307)

Signed-off-by: Minju, Lee <dlalswn531@naver.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* 10.0.2

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* update tests

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* ParameterEventHandler support ContentFiltering (#1531)

* ParameterEventHandler support ContentFiltering

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Address review comments

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Fix issues with resuming async tasks awaiting a future (#1469)

Signed-off-by: Błażej Sowa <bsowa123@gmail.com>
Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Co-authored-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* 10.0.3

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Increase clock accuracy (#1564)

Signed-off-by: Florian Vahl <git@flova.de>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Use unconditional wait when possible. (#1563)

Previously the max() value of the steady time was used as the default deadline. In some environments this results in overflows in the underlying pthread_cond_timedwait call, which waits for the conditional variable in the events queue implementation. Consequently, this lead to freezes in the executor. Reducing the deadline significantly helped, but using `cv.wait` instead of `cv_.wait_until` seems to be the cleaner solution.

Signed-off-by: Florian Vahl <florian.vahl@dlr.de>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Remove default from switch with enum, so that compiler warns. (#1566)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Fix parameter parsing for unspecified target nodes (#1552)

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Improve the compatibility of processing YAML parameter files (#1548)

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Improve wildcard parsing and optimize the logic for parsing YAML para… (#1571)

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Expose action graph functions as Node class methods. (#1574)

* Expose action graph functions as Node class methods.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* address review comments to keep the warning consistent.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* Fix performance bug in MultiThreadedExecutor (hopefully) (#1547)

Signed-off-by: Michael Tandy <git@mjt.me.uk>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Changelog

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* 10.0.4

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* use Msg over BaseMessage

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Use Srv over BaseService

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Use Action over BaseAction

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* lint

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Update rclpy/rclpy/type_support.py

Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Barry Xu <Barry.Xu@sony.com>
Signed-off-by: brennanmk <brennanmk2200@gmail.com>
Signed-off-by: Brad Martin <bmartin@fatlxception.org>
Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Signed-off-by: Christian Rauch <Christian.Rauch@unileoben.ac.at>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Signed-off-by: yuanyuyuan <az6980522@gmail.com>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Signed-off-by: Minju, Lee <dlalswn531@naver.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Błażej Sowa <bsowa123@gmail.com>
Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Florian Vahl <git@flova.de>
Signed-off-by: Florian Vahl <florian.vahl@dlr.de>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Michael Tandy <git@mjt.me.uk>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Barry Xu <barry.xu@sony.com>
Co-authored-by: Brennan Miller-Klugman <55165406+brennanmk@users.noreply.github.com>
Co-authored-by: Brad Martin <52003535+bmartin427@users.noreply.github.com>
Co-authored-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Jonathan <jmblixt3@gmail.com>
Co-authored-by: Christian Rauch <Christian.Rauch@unileoben.ac.at>
Co-authored-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Co-authored-by: Yuyuan Yuan <az6980522@gmail.com>
Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl>
Co-authored-by: Minju, Lee <70446214+leeminju531@users.noreply.github.com>
Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
Co-authored-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com>
Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Florian Vahl <git@flova.de>
Co-authored-by: Michael Tandy <git@mjt.me.uk>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
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.

5 participants