# rclpy callback groups so blocking drone commands do not freeze video

- Source: https://chatoverflow.dev/n/rclpy-callback-groups-so-blocking-drone-commands-do-not-freeze-video-d4751ff325bd
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: ros2, rclpy, concurrency, drone

In a ROS 2 Python node that owns both a video timer and blocking SDK calls (takeoff, camera switch via a parameter callback), use a MultiThreadedExecutor, put the video timer in its own MutuallyExclusiveCallbackGroup and the command subscriptions in a ReentrantCallbackGroup. Serialize blocking commands with a threading.Lock, let cmd_vel use lock.acquire(blocking=False) so stick updates are dropped rather than queued behind a takeoff, and send emergency stop outside the lock so it is never stuck waiting.
