SkillAgentSearch skills...

CoFlyers

CoFlyers: A General Platform for Collective Flying of Swarm Drones.

Install / Use

/learn @micros-uav/CoFlyers
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

CoFlyers

CoFlyers: a universal platform for collective flying of swarm drones

IROS2023

<p align="center"> <img src="./docs/images/CoFlyers_Logo.png" alt="figure" height="200"> </p>

Contents

<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} --> <!-- code_chunk_output --> <!-- /code_chunk_output -->

Introduction

CoFlyers is a platform for evaluating and verifying cooperative motion algorithm/model of drone swarms. It only requires users to have programming skills in MATLAB&Simulink. CoFlyers allows users to perform six typical functions: rapid prototyping, parameter auto-tuning, batch processing, high-fidelity simulation, real-world experimental verification, and verification combined with virtual and reality.

  • Rapid protyping
<p align="center"> <img src="./docs/images/rp.png" alt="figure" height="200"> </p> <p align="center" style="color: #999;"> Collective motion in confined environments with the Vásárhelyi algorithm </p> <br> <p align="center"> <img src="./docs/images/lidar_and_map.png" alt="figure" height="300"> </p> <p align="center" style="color: #999;"> Simulated environment and LIDAR </p> <br> <p align="center"> <img src="./docs/images/terrain.gif" alt="figure" height="400"> </p> <p align="center" style="color: #999;"> Terrain based on an elevation map </p> <br>
  • Parameter auto-tuning for getting the optimized parameters
<p align="center"> <img src="./docs/images/auto_tuning.png" alt="figure" height="200"> </p> <p align="center" style="color: #999;"> Parameter auto-tuning of the Vásárhelyi algorithm </p>
  • Batch processing for obtaining the impact of internal and external parameters on swarm performances
<p align="center"> <img src="./docs/images/batch_processing.png" alt="figure" height="200"> </p> <p align="center" style="color: #999;"> Impact of the control sampling time and velocity noise on swarm velocity correlation using the Vásárhelyi algorithm </p> <br>
  • High-fidelity simulation with ROS&PX4&Gazebo
  • Eeal-world experimental verification with Tello&Optitrack
  • Eeal-world experimental verification with Crazyswarm&Optitrack
<p align="center"> <img src="./docs/images/gazebo_tello_crazyflie.png" alt="figure" height="200"> </p>
  • verification combined with virtual and reality
<p align="center"> <img src="./docs/images/vr-English.jpg" alt="figure" height="500"> </p>

Requirements

  • Only MATLAB R2021b or later for prototype simulator, simulink commander. (Ubuntu and Windows are supported)
  • Working installation of PX4 and Gazebo for high-fidelity simulation. (Ubuntu18.04 are supported)
  • For the implementation of real-world experimental verification with Tello&OptiTrack, a Windows system is required without any other dependencies.
  • Working installation of crazyswarm for real-world experimental verification with Crazyswarm&OptiTrack (Ubuntu18.04 are supported).

Installation

  1. Clone the CoFlyers git repository or download it directly:
<pre><code>git clone https://github.com/micros-uav/CoFlyers.git</code></pre>
  1. For simulation with PX4, copy some files for PX4
<pre><code>sudo cp ./CoFlyers/for_external_projects/PX4-Autopilot/my_world.world ./PX4-Autopilot/Tools/sitl_gazebo/worlds sudo cp ./CoFlyers/for_external_projects/PX4-Autopilot/multi_uav_mavros_sitl_1.launch ./PX4-Autopilot/launch sudo cp ./CoFlyers/for_external_projects/PX4-Autopilot/multi_uav_mavros_sitl_10.launch ./PX4-Autopilot/launch</code></pre>
  1. For experiments with Crazyswarm, copy some files for Crazyswarm
<pre><code>sudo cp -r ./CoFlyers/for_external_projects/crazyswarm/crazyswarm_coflyers ./crazyswarm/ros_ws/src cd ./crazyswarm/ros_ws catkin_make</code></pre>

Currently, it is a problem with the publish frequency to the /cf#/pose topic created by Crazyswarm. It cannot be performed at a faster frequency of 30 Hz. If users' Crazywarm can normally pulish poses to /cf#/pose topic at a frequency of 30 Hz, it is no need to replace the source code with the following command:

<pre><code>sudo cp ./CoFlyers/for_external_projects/crazyswarm/crazyswarm_server.cpp ./crazyswarm/ros_ws/src/crazyswarm/src cd ./crazyswarm/ros_ws catkin_make</code></pre>

Build:

<pre><code>cd ./crazyswarm/ros_ws catkin_make</code></pre>

Overview

<p align="center"> <img src="./docs/images/overview-English.png"alt="figure" height="400"> </p> <p align="center" style="color: #999;"> Overall architecture of CoFlyers </p> <br>

The platform of CoFlyers generally has four components: a prototype simulator, a verification system for drone swarms, a graphical user interface (GUI) for drawing, and a GUI for simulating. The prototype simulator provides the functions of rapid prototyping, parameter auto-tuning, and batch processing. The verification system for drone swarms provides the functions of high-fidelity simulation, real-world experimental verification, and verification combined with vitual and reality. The GUI for drawing allows users to interactively edit 3D simulated obstacle environments. The GUI for simulating allows users to interactively operate the prototype simulator, manually tune parameters, and observe simulation results. The prototype simulator and the two GUI are developed entirely based on the MATLAB programming language. And the verification system for drone swarms directly inherits the modules of the prototype simulator, relying on the characteristics of Simulink, which is integrated with MATLAB. In this way, users are not required to repeat programming while using advanced functions.

Prototype simulator

<p align="center"> <img src="./docs/images/prototype_simulator-English.png" alt="figure" height="300"> </p> <p align="center" style="color: #999;"> Architecture of prototype simulator </p> <br>

The prototype simulator is developed based on a layered and modular idea. Its layers and modules are shown in the above figure. The swarm module and evaluation module are the main modules that users need to pay attention to and develop. The two are used respectively for deploying swarm algorithms and evaluation metrics of swarm performances.

The module parameters of the simulator are all configured in a parameter configuration file in XML format. The post-processing program will automatically generate MATLAB script functions that define parameters based on this configuration file for use by other functions in each module. In addition, for the swarm module and evaluation module, after users add sub modules in the configuration file, the post-processing program will automatically generate MATLAB functions with standard input and output, which are used to deploy the user's codes related to swarm algorithms and evaluation metrics.

Graphical user interface for drwaing

<br> <p align="center"> <img src="./docs/images/Gui_map_X5.gif" alt="figure" height="400"> </p> <p align="center" style="color: #999;"> Graphical user interface for drawing </p>

The GUI for drawing is used to provide users with a tool that can interactively and visually configure a 3D simulated obstacle environment.

Graphical user interface for simulating

<br> <p align="center"> <img src = "./docs/images/Gui_sim_PSO_X5.gif" width = "45%" hight="300"> <img src = "./docs/images/Gui_sim_v18_X5.gif" width = "45%" hight="300"> </p> <p align="center" style="color: #999;"> Graphical user interface for simulating (left: PSO, right: Vásárhelyi) </p> <br>

The GUI for simulating is used to provide users with a tool that can interactively and visually debug algorithm parameters and observe results.

Verification system for drone swarms

The verification system for drone swarms generally has three components: swarm commander, communication forwarding module, and external system. The swarm commander is developed in Simulink, directly inheriting the modules of the prototype simulator. It receives the pose data of all drones from external and sends upper-level commands to all drones. The connect between the swarm commander and other components uses UDP communication and standardized communication protocol. For each drone, a UDP port is set up to receive the pose of the corresponding drone and send upper-level commands to the drone. Thus, as long as comm ports and data are defined using the standardized communication protocol, any type of external system can communicate with the swarm commander. In this way, our swarm commander is

View on GitHub
GitHub Stars33
CategoryDevelopment
Updated22d ago
Forks8

Languages

MATLAB

Security Score

95/100

Audited on Mar 9, 2026

No findings