claudeDroneteam-docs
documentation · reference
Docs reference

Structured knowledge from collected_doc_media/claudedrone_docs/. Browse the tree on the left; the source of truth is markdown in the repo.

Latency management in the control loop

Sources of latency in the ROS 2 ↔ ArduPilot ↔ Gazebo loop and how to compensate.

stabledoc-seoupdated 2026-05-11T00:00:00.000ZClaudeDrone

The control loop has three latency contributors and they compound: sensor pipeline (ToF reading → ROS 2 topic), policy compute (inference → action message), and command pipeline (action → MAVROS → MAVLink → ArduPilot → motor PWM). Total budget for a responsive indoor drone is on the order of 50–100 ms one-way; anything past that and the policy is reacting to a stale picture of the world.

This page is currently a placeholder — the detailed breakdown lives in ROS 2 latency tuning, which covers the DDS layer (RMW choice, QoS profiles, transport overhead) and the practical tuning recipe we use on D2. For the sensor side, see TF-Luna driver for the UART pipeline timing characteristics, and for the command side, MAVROS theory covers the MAVLink translation cost.

Three quick rules from experience:

  1. Don’t fight individual µs. A 5 ms improvement in DDS publish latency is irrelevant if you’re also waiting 50 ms for the next TF-Luna frame. Measure the longest pole first.
  2. Sensor data → BestEffort QoS. Reliable QoS adds retransmit overhead for messages that get superseded by the next reading anyway. The full QoS table is on the ROS 2 latency tuning page.
  3. Co-locate the tight loop. frontier_picker + mission_fsm + state_publisher live in one process (composition); only SLAM and MAVROS run in separate processes for crash isolation.

Where to go next

© 2026 claudeDrone Team · auto-pipeline · Nuxt 3 SSR