We measure the performance of reactive control against
the original Ardupilot. We also apply reactive control to two
other autopilot implementations, namely OpenPilot and
Cleanflight, and repeat the same comparison.
Setup. We use two custom drones, shown in Figure 6,
and a 3D Robotics Y6 drone. The latter is peculiar as it
is equipped with only three arms with two co-axial motor-propellers assemblies at each end, requiring a drastically
different control logic.
We test three environments: (i) a 20×20m indoor lab,
termed Lab, where localization happens using visual
techniques; (ii) a rugby field termed Rugby, using GPS;
and (iii) an archaeological site in Aquileia (Italy) termed
Arch, 16 again using GPS. The sites exhibit increasing
environment influence, from the mere air conditioning in Lab to average wind speeds of 8+ knots in Arch.
The variety of software, hardware, and test environments demonstrates the general applicability of reactive
We test OpenPilot and Cleanflight by replacing
Ardupilot and the Pixhawk board on either the quadcopter or the hexacopter of Figure 6; however, only Ardupilot
supports the Y6. The original time-triggered implementation of OpenPilot and Cleanflight resembles the
design of Ardupilot shown in Figure 2, but the control
logic differs substantially in both sophistication and
tuning. Further, the autopilot hardware for OpenPilot
and Cleanflight differ in processing capabilities and
sensor equipment, compared with the Pixhawk. These
differences are instrumental to investigate the general
applicability of reactive control.
To study the accuracy of motion, we measure the
attitude error, that is, the difference between the desired and
actual 3D orientation of the drone. The former is determined by the autopilot as the desired setpoint, whereas
the actual 3D orientation is recorded through the on-board sensors. Their difference is the figure the control
logic aims at minimizing. If the error was constantly zero,
the control would attain perfect performance; the larger
this figure, the less effective is the autopilot. Measuring
these figures in a minimally-invasive way requires dedicated hardware and software. 7
To understand how the accuracy of flight control
impacts the drone lifetime, we also record the flight time
as the time between the start of an experiment and the
time when the battery falls below a 20% threshold. For
hyperperiod before triggering the traversal, which allows
all inputs in the current hyperperiod to be considered
together. To the best of our knowledge, such a semantics
is not available in any RP implementation, regardless of
Using RP-Embedded. Using RP-Embedded for implementing reactive control requires to reformulate the implementation of the control logic in the form of a dependency
graph. Sensor inputs remain the same as in the original
time-triggered implementation, as well as control outputs
directed to the actuators. The key modification is in processing changes in the sensor inputs: rather than immediately
updating the inputs to the data dependency graph, we first
check whether the corresponding logistic regression model
would indicate the need to execute the control logic, as
explained in Section 3. 1.
Other than that, turning the control logic into a data
dependency graph essentially boils down to a problem
of code refactoring. Software engineering offers a wide
literature on the subject. 13 Even in the absence of dedicated support, our experience indicates that the needed
transformations can be implemented with little manual effort. Figure 5 shows the data dependency graph of
the Ardupilot control loop for copters, which a single
person on our team realized and tested in three days
of work. Ardupilot is one of the most complex autopilot implementations. The other autopilots we test in
Section 4 are simpler, and it took from one to two work
days to refactor them.
(a) Quadcopter. (b) Hexacopter. (c) 3DR Y6.
Figure 6. Aerial drones for performance evaluation.
3D Position Speed Altitude
Attitude control Dynamics
Accel Gyro Magn
To the motors
Figure 5. Ardupilot’s control loop for copters after refactoring to use
RP-Embedded. Squashed rectangles indicate sensor inputs, squared
rectangles indicate global state information.
b The OpenPilot project is currently discontinued. The community behind OpenPilot, however, forked a new project called LibrePilot ( goo.gl/
KnZ3hG) that shares most of the original codebase. Reactive control is
thus equally applicable to LibrePilot, and we expect the performance to
be similar to that we measure with OpenPilot.