A groundstation stack for indoor drone swarms: a library of well-known swarm behaviours built on Crazyswarm, plus the motion-capture, simulation and task-management layers around it.
Documented in the Master's thesis "Intelligent Systems for Next Generation Drone Functionality" (2021), Proceedings of the Artificial Lives Lab.
⚠️ Busy migrating to ROS2, please check ROS1 branch for original work/readme. https://github.com/ThomasCarstens/swarmStack_flightarena/tree/ros2
I designed and built the drone arena at the De Vinci Innovation Center. Flight arenas have to alternate between two incompatible modes — instrumented testing and public demonstration — and much of the design follows from that.
| Flight arena development | Arena design and logged trajectories |
|---|---|
![]() |
![]() |
Five problems stood between owning a box of Crazyflies and being able to run a demo on request.
Crazyflies localise from outside, so a drone can only fly where two or more positioning cameras see it — and the safety net physically constrains where those cameras can sit. 3D-modelling the usable volume showed that dropping the positioning cameras from 40° to 19° bought +42.4% coverage volume, which was cheaper than buying cameras.
Two drones flying to setpoints: 72.24 mm / 0.096 rad maximum error, across 90.46% of the arena volume.
| Camera pitch constraint | Hover test results |
|---|---|
![]() |
![]() |
The swarm is monitored by a custom copilot. A TRAJ_SHAPE state machine preloads and executes trajectories per drone, and swarm-level commands like LAND_ALL stop the demo when something goes wrong — batteries low, collision imminent — instead of leaving a human to catch it.
Speed is filtered rather than clamped. It scales with position inside a half-centroid that decays with distance from the arena centre, with a logistic curve at the outer edge, so the drone decelerates smoothly as it approaches a boundary.
| Swarm manager state machine | Speed filter |
|---|---|
![]() |
![]() |
Hardware status and datastreams pass through a ROS interface that manages drone data across the whole groundstation.
| Layer | Component | Role |
|---|---|---|
| Localisation | OptiTrack + Motive | Global 3D positions, marker IDs, rotational data |
| Flight | Crazyswarm | Multi-drone flight of Bitcraze Crazyflies in tight synchronised formation |
| Middleware | ROS on Ubuntu | Parameter server, action servers, sensor and event routing |
| Task flow | SMACH | Task-level architecture for complex robot behaviour |
| Rendering | Unity3D | Virtual environment for the drones |
| Resource management architecture | Stack components |
|---|---|
![]() |
![]() |
Built on top of the stack: flying a drone with your hand alone.
Gestures are regarded as the most intuitive way for people to express information non-verbally, and swarm management is complex enough to be worth asking whether a controller is the right interface at all.
| Gesture piloting drones | Gesture vocabulary |
|---|---|
![]() |
![]() |
Two modes, switched by a hand sign: position update (point in a direction) and velocity update (move in a direction).
Recognition uses Google's MediaPipe hand-landmark model applied to custom gestures. The gesture-to-command pipeline parses drone id, gesture id, gesture velocity and angle, applies the speed filter, then resolves to a velocity or position update.
| Position and velocity update modes | Gesture-to-command pipeline |
|---|---|
![]() |
![]() |
Detection-to-movement latency measures a consistent 250 ms — consistent enough that the commanded and actual velocity curves fit under a fixed transform.
Supported by the De Vinci Innovation Center.
Github passkey/OS passcode: txa@zone2$ cat ~/home/txa/codes
$ unityhub
# Tested with ROS_UNITY_FollowingTutorial (Unity 2020.3)
$ docker run -it --rm -p 10000:10000 foxy /bin/bash
$ ros2 run ros_tcp_endpoint default_server_endpoint --ros-args -p ROS_IP:=127.0.0.1 -p ROS_TCP_PORT:=10000
- Partitions | 30G/; 30G/home;
- After initial install: (without install local ros2) | 13.8G/; 19.9G/home
- After Ros2 setup: ( minus 10.9GB from ros2 built from source) | 13.2G/; 18.4G/home
I deactivated updates, removed unnecessary software https://linuxconfig.org/disable-automatic-updates-on-ubuntu-20-04-focal-fossa-linux https://linuxnightly.com/how-to-disable-automatic-updates-in-ubuntu/ *Keep OBS Studio for demoes but regularly remove excess videos (automatic?TBD) *rosdep-update/apt-upgrade executed once | NOT purged but I do not recommend it (low on storage: might remove opencv 500MB; might remove pcl/mocap 800MB).
https://docs.docker.com/engine/install/ubuntu/ https://docs.docker.com/engine/install/linux-postinstall/
Used docker for: ROS2 docker ("foxy") with port 1000 -> local Unity install. git clone https://github.com/Unity-Technologies/Unity-Robotics-Hub.git https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md
https://docs.ros.org/en/dashing/Installation/Ubuntu-Install-Debians.html $ sudo apt install libpcl-dev https://imrclab.github.io/crazyswarm2/installation.html
https://itsfoss.com/unity-editor-linux/
https://askubuntu.com/questions/883992/stuck-at-grub-command-line
libsqlite3-dev : Depends: libc6-dev but it is not going to be installed libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.7) but 2.31-0ubuntu9.9 is to be installed SOLVED BY: https://serverfault.com/questions/993576/debian-apt-install-build-essential-fails-because-of-unmet-dependencies sudo aptitude install g++ sudo aptitude -f install build-essential
iustin/pylibacl#11 sudo apt install libacl1-dev ONCE build-essential works: rosdep install --from-paths src --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers" apt: command [sudo -H apt-get install -y libopencv-dev] failed apt-get install python3-dev libtinyxml2-dev
a library of well-known swarm behaviors built with ROS 1 upon the Crazyswarm open-source project.
See: https://github.com/ThomasCarstens/swarmStack_flightarena/tree/ros1
*from single-robot commands to dynamic management.*
*multi-robot instructions encapsulated within the multi-step tasks.*
*Robot-specific instructions encapsulated within the swarm instructions.*
- intelligentdrones — the Crazyswarm ROS workspace: custom actions, launch files, trajectories
- xreality_flightarena — Unity mixed-reality layer for the same arena
More project write-ups: thomascarstens.github.io · Questions: thomaxarstens@gmail.com












