Overview
Github Repository: https://github.com/UniAgent-CyberPhysicalAssets/cps.asset.crazyflie
Welcome to this tutorial on building and programming smart drone swarms using Crazyflie tiny drones.
A full-stack setup is provided for simulating and controlling autonomous Crazyflie collectives, from low-level motor commands to high-level swarm logic. It’s designed to support both research and practical experimentation in the perspective of drone coordination and spatial computing.
Technically, the tutorial is based on Gazebo, a physics simulator for robotics research, and some Python scripts to command drones via simple web endpoints.
At a later stage, this eventually enables programming drone swarms through algebraic equations.
You’ll learn how to:
- Set up a simplified (i.e., a not yet very realistic) simulation environment using Gazebo with preset and custom worlds and the Crazyflie drone models.
- Use Python with the Crazyflie firmware stack to issue control commands.
- Define, control, and analyze collective behavior using a bigraph algebra, a formalism well-suited for modeling both connectivity and spatial configuration in dynamic systems.
Methodology
Reference:
- [BDJJ23] Braun, Stefan; Dalibor, Manuela; Jansen, Nico; Jarke, Matthias; Koren, István; Quix, Christoph; Rumpe, Bernhard; Wimmer, Manuel; u. a.: Engineering Digital Twins and Digital Shadows as Key Enablers for Industry 4.0. In: Vogel-Heuser, B. ; Wimmer, M. (Hrsg.): Digital Transformation: Core Technologies and Emerging Topics from a Computer Science Perspective. Berlin, Heidelberg : Springer, 2023 — ISBN 978-3-662-65004-2, S. 3–31
- D. Grzelak, "Programming Drone Collectives: Towards Safe Plug-And-Play Modularity," in Proceedings of the 1st German Robotics Conference (GRC), Nürnberg, Germany: Robotics Institute Germany, Mar. 2025. Available: https://ras.papercept.net/conferences/conferences/GRC25/program/GRC25_ContentListWeb_1.html#thga_58. — Standalone video contribution (demo video, abstract, and poster)
- Poster
Software Stack
The software stack employed in this tutorial:
- sim_cf2 (Gazebo) (Simulation)
- cf.PyControl (cflib/Python) (Controller)
- Eclipse CDO (Database)
- Bigraph Framework, BDSL, Spring Data CDO (Java) (Frameworks)
Everything is open source and provided through Docker images for easy installation and use.