Canceling queued action goals - cancel_callback not getting called

asked 2022-06-24 08:19:24 -0500

märve gravatar image

Hello,

I'm trying to create an ActionServer, which uses a queue to handle the goals sequentially. The problem I'm having is that I cannot cancel goals in the queue while another goal is being executed. More specifically: the cancel_callback is not getting called.

To reproduce it:

  1. use the server_queue_goals.py as action server
  2. send two goals from two different terminals (the second gets queued by action server): ros2 action send_goal /fibonacci example_interfaces/action/Fibonacci "{order: 10}"
  3. cancel the second goal while the first one is still running: ctrl + c

Expected behaviour: The first goal finishes, and the second one immediately terminates since it got cancelled while in the queue.

Actual behaviour: cancel_callback of the second goal doesn't get invoked, and after the first goal is finished, the second one gets executed.

I'm using foxy on Ubuntu 20.04.4. and python3.8.10.

Thanks for your time!

edit retag flag offensive close merge delete