Generated by Generative AI
No response
Operating System:
ros:jazzy-ros-core (ubuntu:noble)
ROS version or commit hash:
Jazzy 7.1.9, Rolling 10.0.3
RMW implementation (if applicable):
rmw_cyclonedds_cpp
RMW Configuration (if applicable):
No response
Client library (if applicable):
rclpy
'ros2 doctor --report' output
No response
Steps to reproduce issue
- Create a service that does not return immediately
- Create a client of the service
- Call the service via asyncio w/
await service.call_async(request)
Expected behavior
Service call is awaited in the client and returns successfully.
Actual behavior
All code that assumes call_async() is awaitable will, as of 7.1.9, exit on exception RuntimeError: Task got bad yield: <rclpy.task.Future object at 0x74d4e2623ef0> if the Future pends.
Additional information
This is a regression in Jazzy 7.1.9 due to the change to Future.__await__ in #1560, backported from #1469, Rolling 10.0.3 @bjsowa.
rclpy.Future implements __await__ indicating it is intended for use with asyncio. Previously, rclpy.Future.__await__ yielded None, which asyncio responds to by checking the future again at the next iteration of the event loop. As of #1560, it yields itself. Because rclpy.Future is not a "Future-like object" due to missing get_loop() and _asyncio_future_blocking apis (as discussed in #1399) asyncio throws the exception.
Noting that #1560 is a backport of #1469 into Rolling.
Generated by Generative AI
No response
Operating System:
ros:jazzy-ros-core (ubuntu:noble)
ROS version or commit hash:
Jazzy 7.1.9, Rolling 10.0.3
RMW implementation (if applicable):
rmw_cyclonedds_cpp
RMW Configuration (if applicable):
No response
Client library (if applicable):
rclpy
'ros2 doctor --report' output
No response
Steps to reproduce issue
await service.call_async(request)Expected behavior
Service call is awaited in the client and returns successfully.
Actual behavior
All code that assumes
call_async()isawaitable will, as of 7.1.9, exit on exceptionRuntimeError: Task got bad yield: <rclpy.task.Future object at 0x74d4e2623ef0>if theFuturepends.Additional information
This is a regression in Jazzy 7.1.9 due to the change to
Future.__await__in #1560, backported from #1469, Rolling 10.0.3 @bjsowa.rclpy.Futureimplements__await__indicating it is intended for use with asyncio. Previously,rclpy.Future.__await__yieldedNone, which asyncio responds to by checking the future again at the next iteration of the event loop. As of #1560, it yields itself. Becauserclpy.Futureis not a "Future-like object" due to missingget_loop()and_asyncio_future_blockingapis (as discussed in #1399) asyncio throws the exception.Noting that #1560 is a backport of #1469 into Rolling.