Handling long actions in rclpy (with cancellation)
The Fibonacci action demo is nice, but it doesn't support cancellation.
I added a custom cancel_callback
, called it from ros2 action send_goal
, and tried to cancel by hitting ctrl-C, but it doesn't seem to work. I suspect that's because execute_callback
is blocking.
What is a preferred pattern for handling long-running actions in rclpy with cancellation? Any examples / demos / tutorials?
Thanks.