-
Notifications
You must be signed in to change notification settings - Fork 266
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Generated by Generative AI
No response
Operating System:
Doesn't matter (Ubuntu 24.04)
ROS version or commit hash:
jazzy, rolling
RMW implementation (if applicable):
N/A
RMW Configuration (if applicable):
No response
Client library (if applicable):
rclpy
'ros2 doctor --report' output
N/A
Steps to reproduce issue
Attempt to implement a service server with an async handler and the experimental EventsExecutor
Expected behavior
Service works
Actual behavior
(Abbreviating from actual output)
Traceback (most recent call last):
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/service.py", line 75, in send_response
raise TypeError()
TypeError
sys:1: RuntimeWarning: coroutine 'handle_request' was never awaited
Additional information
This is my fault, I failed to handle or test async service servers when I implemented EventsExecutor. There was a fair amount of existing test coverage of async stuff already in tree, and I didn't realize this was missing.
The fix is probably very straightforward, HandleServiceReady() just needs to check if the thing returned from the callback was a coroutine and schedule a task, just like HandleTimerReady() does. For that matter, the other entity types probably need similar handling.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working