  This paper develops an adaptive PID autotuner for multicopters, and presents
simulation and experimental results. The autotuner consists of adaptive digital
control laws based on retrospective cost adaptive control implemented in the
PX4 flight stack. A learning trajectory is used to optimize the autopilot
during a single flight. The autotuned autopilot is then compared with the
default PX4 autopilot by flying a test trajectory constructed using the
second-order Hilbert curve. In order to investigate the sensitivity of the
autotuner to the quadcopter dynamics, the mass of the quadcopter is varied, and
the performance of the autotuned and default autopilot is compared. It is
observed that the autotuned autopilot outperforms the default autopilot.
