Callback queue and executor shutdown
Hello, i have a question regarding the interaction of callback queues and shutdown of the executor in ros2 python. Do all callbacks in the callback queues of subscribers get executed when i call executor.shutdown, or only the callbacks that are already started? The documentation ( https://docs.ros2.org/foxy/api/rclpy/api/execution_and_callbacks.html ) states that shutdown "Stops executing callbacks and waits for their completion.", so what does happen to callbacks that are in the queue but not yet started?
Asked by askuih on 2023-03-07 08:05:39 UTC
Answers
So i think the answer is that the callbacks in queue don't get executed once the node shuts down. I have a node that is subscribed to a webcam stream, and saves the stream as video. The node sometimes starts dropping messages, because (i am assuming, but am quit sure) the queue is full. I stopped execution of the node the moment the messages started dropping, which also saves the video. The video was missing an amount of frames at the end which was roughly the same as my queue size, so i assume the messages with the missing frames in the Queue just got dropped.
Asked by askuih on 2023-03-21 06:45:58 UTC
Comments