Crazyswarm PDF
Crazyswarm PDF
Crazyswarm PDF
VICON
15 1.5
10 1.0
5 0.5
0 0.0
0 10 20 30 40 50 1 2x2 3x3 4x4 5x5 6x6 7x7
Number of Crazyflies Crazyflie Formation
Fig. 3. Software-estimated latency for different swarm sizes, averaged Fig. 4. Measured tracking performance for different swarm sizes, averaged
over 2000 measurements. The actual latency is 3 ms higher in all cases. over the swarm and duration of the flight. The error bars show the standard
The latency grows linearly with the swarm size and the largest portion is deviation. The performance decreases in bigger swarms because of the
due to the motion-capture system. additional aerodynamic effects between the quadcopters.
To ease this problem, we structure major onboard procedures overall runtime. The communication latency increases in
as platform-independent modules. We use the SWIG package increments of four added Crazyflies per radio because of
to generate Python bindings to these modules, allowing our compression algorithm (see section VIII.) Estimated total
firmware-in-the-loop testing in simulation via Python scripts. latency ranges from 8 ms to 23 ms.
The physical measurements show that the actual latency
XI. EXPERIMENTS
is a fixed 3 ms longer than the estimated numbers, resulting
Our experiments quantify system performance and demon- in an actual latency of 26 ms for the full 49-vehicle swarm.
strate the overall capabilities of our architecture. All experi-
ments are conducted in a 6 m 6 m 3 m motion-capture B. Tracking performance
space using a VICON Vantage system with 24 cameras.
We estimate the tracking performance by integrating the
Vicon Tracker obtains the marker point clouds on a
overall Euclidean position error for a flight, excluding takeoff
PC with Windows 7, Xeon E5-2630 2.2 GHz, and 16 GB
and landing. The flight path for each Crazyflie is a figure-8
RAM. Our software is written in C++ using ROS Kinetic
repeated three times, with 0.76 m/s average speed and 1.5 m/s
for visualization and scripting and is running on a PC with
maximum speed. This trajectory is moderately fast for a
Ubuntu 16.04, Xeon E5-2630 2.2 GHz, and 32 GB RAM.
small quadcopter, reaching a maximum roll angle of 20 deg.
To reduce latency, we do not use any ROS messages in the
We try different square swarm sizes, ranging from 1 to
critical path between receiving data from the motion-capture
7 7, in a grid layout with 0.5 m spacing, flying at the same
system and broadcasting estimated poses to the Crazyflies.
height. This tight formation causes additional aerodynamic
Sample flight videos are part of the supplemental material.
disturbances, which affect the controller performance.
A. Latency Our average error is shown in Fig. 4. The error is below
The total time delay between physical movement and 2 cm per quadcopter even when the whole swarm is flying.
arrival of the corresponding position feedback message to the However, as visible in the supplemental video, the attitude
firmware significantly affects overall system performance [3]. controller starts to oscillate more to compensate for the
Latency increases with swarm size due to both computational additional airflow.
and communication overhead. We estimate the latency in
C. Effect of Position Update Rate on Hover Stability
two ways: first, we use the Vicon DataStream SDK to
query an estimate of the motion-capture system latency, and We quantify the effect of position update rate on stability
instrument our code to estimate the runtime of our own by varying the update rate from the maximal 100 Hz down
software components. Second, we verify those numbers in to 2 Hz and measuring the mean Euclidean position error at
the physical setup by inducing a sudden change in yaw to the hover state. Results are shown in Table II. The range between
Crazyflie. The delay between the immediate onboard IMU 100 Hz and 10 Hz shows virtually no change. At 2 Hz, the
response and the corresponding change in external position system is still stable but shows significant oscillations. This
measurement captures the full system latency. We read these demonstrates our systems robustness against communication
values in real time via a JTAG debug adapter. loss during operation.
The estimated latencies from the base station software
are shown in Fig. 3. The latency grows roughly linearly TABLE II
with the number of objects to track, with the largest portion H OVER POSITION ERROR AS A FUNCTION OF POSITION UPDATE RATE .
caused by the motion-capture system (up to 14 ms for the
Position Rate [Hz] 100 10 5 3.3 2.5 2
49-robot case). Object tracking and communication using Avg. Tracking Error [cm] 0.58 0.68 0.91 1.48 1.95 2.18
the Crazyradio is done in separate threads, reducing the
such as EKF variances and controller gains, is available at
https://github.com/USC-ACTLab/crazyswarm.
In future work, we plan to improve reliability by detecting
controller failures, improving object tracking failure recov-
ery, and including better planning methods which take aero-
dynamic effects such as downwash into account explicitly.
We have made all software components available as open-
source, and hope that our work will have a significant impact
as a testbed for experimental verification of existing and new
UAV swarming algorithms. In general, our system can serve
as a foundation for a wide range of future work in multi-
robot planning, coordination, and control.
R EFERENCES
Fig. 5. Forty-nine Crazyflies flying in a 4-layer rotating pyramid formation.
The bottom layer is 3 m 3 m with 0.5 m spacing between vehicles. [1] A. Kushleyev, D. Mellinger, C. Powers, and V. Kumar, Towards a
swarm of agile micro quadrotors, Autonomous Robots, vol. 35, no. 4,
pp. 287300, 2013.
D. Coordinated Formation Flight [2] N. Michael, D. Mellinger, Q. Lindsey, and V. Kumar, The grasp
multiple micro-uav testbed, IEEE Robotics & Automation Magazine,
To demonstrate our scripting layer, we use a formation vol. 17, no. 3, pp. 5665, 2010.
of 49 Crazyflies flying in a rotating pyramid as shown in [3] S. Lupashin, M. Hehn, M. W. Mueller, A. P. Schoellig, M. Sherback,
Fig 5. The Crazyflies are initially placed in a 7 7 grid with and R. DAndrea, A platform for aerial robotics research and demon-
stration: The flying machine arena, Mechatronics, vol. 24, no. 1, pp.
0.5 m spacing. The takeoff is done in four different layers, 4154, 2014.
with the user triggering the next action using a joystick or [4] S. Hauert, S. Leven, M. Varga, F. Ruini, A. Cangelosi, J. Zufferey, and
keyboard. The script initially assigns each Crazyflie a group D. Floreano, Reynolds flocking in reality with fixed-wing robots:
Communication range vs. maximum turning rate, in IEEE/RSJ Int.
number, according to its layer, and uploads the parameters Conf. on Intelligent Robots and Systems (IROS), 2011, pp. 50155020.
for its ellipse to execute later. Because of the grouping, the [5] T. H. Chung, M. R. Clement, M. A. Day, K. D. Jones, D. Davis,
takeoff of a whole layer can be achieved at the same time and M. Jones, Live-fly, large-scale field experimentation for large
numbers of fixed-wing UAVs, in IEEE Int. Conf. on Robotics and
with broadcast messages. After all Crazyflies are in the air, Automation (ICRA), 2016, pp. 12551262.
the online planner plans a trajectory to smoothly enter the [6] G. Vasarhelyi, C. Viragh, G. Somorjai, N. Tarcai, T. Szorenyi,
ellipse. The user can decide when to end the rotation, which T. Nepusz, and T. Vicsek, Outdoor flocking and formation flight
with autonomous aerial robots, in IEEE/RSJ Int. Conf. on Intelligent
causes another replanning onboard to reach a hover state Robots and Systems (IROS), 2014, pp. 38663873.
above the initial takeoff location. Finally, landing is done [7] Intel and Ars Electronica Futurelab, Drone 100, world record for
using the same groups, minimizing aerodynamic disturbances the most UAVs airborne simultaneously, http://www.spaxels.at/show
drone100.html, 2015.
during landing. [8] R. DAndrea, Meet the dazzling flying machines of the future, TED
Talk, 2016.
E. Swarm Interaction [9] B. Landry, Planning and control for quadrotor flight through cluttered
environments, Masters thesis, MIT, 2015.
A human operator is holding (or wearing) an object [10] J. Forster, System identification of the crazyflie 2.0 nano quadro-
with motion-capture markers. We track the position of that copter, Bachelors Thesis, ETH Zurich, 2015.
[11] A. Ledergerber, M. Hamer, and R. DAndrea, A robot self-
object and broadcast its position alongside the positions of localization system using one-way ultra-wideband communication, in
all quadcopters over the radio. Using the onboard planner IEEE/RSJ Int. Conf. on Intelligent Robots and Systems (IROS), 2015,
described in section VII-D, each Crazyflie computes its pp. 31313137.
[12] M. Faessler, F. Fontana, C. Forster, E. Mueggler, M. Pizzoli, and
desired position, which avoids collisions with the obstacle D. Scaramuzza, Autonomous, vision-based flight and live dense 3d
or other quadcopters. mapping with a quadrotor micro aerial vehicle, Journal of Field
Robotics, vol. 1, 2015.
[13] P. J. Besl and N. D. McKay, A method for registration of 3-d shapes,
XII. CONCLUSIONS Trans. Pattern Anal. Mach. Intell., vol. 14, no. 2, pp. 239256, 1992.
[14] N. Trawny and S. I. Roumeliotis, Indirect Kalman filter for 3D
We have described a system architecture for robust, syn- attitude estimation, University of Minnesota, Dept. of Comp. Sci.
chronized, dynamic control of the largest indoor quadcopter & Eng., Tech. Rep. 2005-002, 2005.
swarm to date. Our system fully utilizes the vehicles on- [15] S. Weiss and R. Siegwart, Real-time metric state estimation for
modular vision-inertial systems, in IEEE Int. Conf. on Robotics and
board computation, allowing for robustness against unreli- Automation (ICRA), 2011, pp. 45314537.
able communication and a rich set of trajectory planning [16] D. Mellinger and V. Kumar, Minimum snap trajectory generation and
methods requiring little radio bandwidth. Tests show good control for quadrotors, in IEEE Int. Conf. on Robotics and Automation
(ICRA), 2011, pp. 25202525.
scalability for both latency and tracking performance with [17] K. Hausman, J. Preiss, G. S. Sukhatme, and S. Weiss, Observability-
respect to the swarm size. For a swarm of 49 vehicles, aware trajectory optimization for self-calibration with application to
only 3 radios are required and we obtain a latency be- UAVs, IEEE Robotics and Automation Letters, 2017.
[18] J. Muller and G. S. Sukhatme, Risk-aware trajectory generation with
low 30 ms, allowing moderately aggressive flight maneuvers application to safe quadrotor landing, in IEEE/RSJ Int. Conf. on
using onboard state estimation with mean tracking errors Intelligent Robots and Systems (IROS), 2014, pp. 36423648.
below 2 cm. Our full source code, including tuned parameters