The aim of this thesis is the creation of a platform capable of managing and controlling a single drone and at the same time a swarm of drones, both simulated and real, in the same way. The goal is therefore to be able to test, through a simulation, any task or control logic involving one or more drones and, once the desired results are obtained, to be able to perform the same task with the real counterpart, without the need for any change in the definition of the aforementioned task, both in terms of logic and code. The platform architecture was entirely written in Python3 and is based on ROS, in particular the Noetic version. As regards the simulation environment, Gazebo (version 11.0.0) was chosen, above all for the easy integration it offers with the ROS ecosystem. The drone chosen for development and testing is the Crazyflie 2.1 produced by Bitcraze; given the block structure offered by ROS nodes, the possible use of a different quadcopter model remains possible, with the relative modifications. The Crazyflie has been considered as a rigid body. Motors dynamics was supposed to be fast enough to be neglected; the effect of the motors, has been obtained with the application of an equivalent system of forces and moments, aimed mainly at simulating the effect of the lift force and drag torque given by the rotation of the propellers. Inside the node controlling the simulated version of the Crazyflie, a part of the real firmware has also been implemented: the one related to the default flight controller. The results obtained by analyzing the measurements from the simulation, during a verification test, were verified in line with those obtained on the real drone. Within the thesis there are also two tests involving a simulated swarm of drones: the first test concerns the flight of a swarm in pyramid formation, in which the introduction of some indices aimed at judging the quality of a circular trajectory was discussed; the second test concerns the control of a swarm of drones using the logic of "flocking", which simulates the behavior of animals observed in nature: while the leader of the formation moves freely, all the other components of the swarm change their speeds to follow the leader's movement and avoiding collisions.

Il fine di questa tesi è la creazione di una piattaforma in grado di gestire e controllare un singolo drone e al tempo stesso uno sciame di droni, sia simulato che reale, nello stesso modo. L’obiettivo è quindi quello di poter testare, attraverso una simulazione, un qualsiasi compito o logica di controllo che coinvolga uno o più droni e, una volta ottenuti i risultati desiderati, poter eseguire lo stesso compito con la controparte reale, senza bisogno di alcun cambiamento nella definizione del suddetto compito, sia in termini di logica che di codice. L’architettura della piattaforma è stata interamente scritta in Python3 e si basa su ROS, in particolare la versione Noetic. Per quanto riguarda l’ambiente di simulazione è stato scelto Gazebo (versione 11.0.0), soprattutto per la facile integrazione che offre con l’ecosistema di ROS. Il drone scelto per lo sviluppo e test è il Crazyflie 2.1 prodotto dalla Bitcraze; vista la struttura a blocchi offerta dai nodi di ROS, l’eventuale utilizzo di un differente modello di drone rimane possibile, con le dovute modifiche. Il Crazyflie è stato considerato come un corpo rigido. La dinamica dei motori è stata supposta sufficientemente veloce da essere trascurata; l’effetto dei motori è stato ottenuto con l’applicazione di un sistema di forze e momenti equivalente, volto principalmente a simulare l’effetto della forza di lift e della coppia di drag date dalla rotazione delle eliche. All’interno del nodo che controlla la versione simulata del Crazyflie, è stata implementata anche una parte del firmware reale: quella del controllore di volo di default. I risultati ottenuti analizzando le misure provenienti dalla simulazione, durante un test di verifica, si sono verificati in linea con quelli ottenuti sul drone reale. All’interno della tesi sono presenti anche due test che coinvolgono uno sciame di droni simulato: il primo test riguarda il volo di uno sciame in formazione piramidale, in cui è stata discussa l’introduzione di alcuni indici volti a giudicare la qualità di una traiettoria circolare; il secondo test riguarda il controllo di uno sciame di droni mediante la logica del “flocking”, che simula il comportamento osservabile in natura nel mondo animale: mentre il leader della formazione si muove liberamente, tutti gli altri componenti dello sciame modificano la loro velocità per seguire il movimento del leader ed evitare collisioni.

A sim-to-real framework with applications to quadrotor swarms

FUSO, ANDREA
2020/2021

Abstract

The aim of this thesis is the creation of a platform capable of managing and controlling a single drone and at the same time a swarm of drones, both simulated and real, in the same way. The goal is therefore to be able to test, through a simulation, any task or control logic involving one or more drones and, once the desired results are obtained, to be able to perform the same task with the real counterpart, without the need for any change in the definition of the aforementioned task, both in terms of logic and code. The platform architecture was entirely written in Python3 and is based on ROS, in particular the Noetic version. As regards the simulation environment, Gazebo (version 11.0.0) was chosen, above all for the easy integration it offers with the ROS ecosystem. The drone chosen for development and testing is the Crazyflie 2.1 produced by Bitcraze; given the block structure offered by ROS nodes, the possible use of a different quadcopter model remains possible, with the relative modifications. The Crazyflie has been considered as a rigid body. Motors dynamics was supposed to be fast enough to be neglected; the effect of the motors, has been obtained with the application of an equivalent system of forces and moments, aimed mainly at simulating the effect of the lift force and drag torque given by the rotation of the propellers. Inside the node controlling the simulated version of the Crazyflie, a part of the real firmware has also been implemented: the one related to the default flight controller. The results obtained by analyzing the measurements from the simulation, during a verification test, were verified in line with those obtained on the real drone. Within the thesis there are also two tests involving a simulated swarm of drones: the first test concerns the flight of a swarm in pyramid formation, in which the introduction of some indices aimed at judging the quality of a circular trajectory was discussed; the second test concerns the control of a swarm of drones using the logic of "flocking", which simulates the behavior of animals observed in nature: while the leader of the formation moves freely, all the other components of the swarm change their speeds to follow the leader's movement and avoiding collisions.
SINIGAGLIA, CARLO
ING - Scuola di Ingegneria Industriale e dell'Informazione
21-dic-2021
2020/2021
Il fine di questa tesi è la creazione di una piattaforma in grado di gestire e controllare un singolo drone e al tempo stesso uno sciame di droni, sia simulato che reale, nello stesso modo. L’obiettivo è quindi quello di poter testare, attraverso una simulazione, un qualsiasi compito o logica di controllo che coinvolga uno o più droni e, una volta ottenuti i risultati desiderati, poter eseguire lo stesso compito con la controparte reale, senza bisogno di alcun cambiamento nella definizione del suddetto compito, sia in termini di logica che di codice. L’architettura della piattaforma è stata interamente scritta in Python3 e si basa su ROS, in particolare la versione Noetic. Per quanto riguarda l’ambiente di simulazione è stato scelto Gazebo (versione 11.0.0), soprattutto per la facile integrazione che offre con l’ecosistema di ROS. Il drone scelto per lo sviluppo e test è il Crazyflie 2.1 prodotto dalla Bitcraze; vista la struttura a blocchi offerta dai nodi di ROS, l’eventuale utilizzo di un differente modello di drone rimane possibile, con le dovute modifiche. Il Crazyflie è stato considerato come un corpo rigido. La dinamica dei motori è stata supposta sufficientemente veloce da essere trascurata; l’effetto dei motori è stato ottenuto con l’applicazione di un sistema di forze e momenti equivalente, volto principalmente a simulare l’effetto della forza di lift e della coppia di drag date dalla rotazione delle eliche. All’interno del nodo che controlla la versione simulata del Crazyflie, è stata implementata anche una parte del firmware reale: quella del controllore di volo di default. I risultati ottenuti analizzando le misure provenienti dalla simulazione, durante un test di verifica, si sono verificati in linea con quelli ottenuti sul drone reale. All’interno della tesi sono presenti anche due test che coinvolgono uno sciame di droni simulato: il primo test riguarda il volo di uno sciame in formazione piramidale, in cui è stata discussa l’introduzione di alcuni indici volti a giudicare la qualità di una traiettoria circolare; il secondo test riguarda il controllo di uno sciame di droni mediante la logica del “flocking”, che simula il comportamento osservabile in natura nel mondo animale: mentre il leader della formazione si muove liberamente, tutti gli altri componenti dello sciame modificano la loro velocità per seguire il movimento del leader ed evitare collisioni.
File allegati
File Dimensione Formato  
2021_12_fuso.pdf

non accessibile

Dimensione 7.21 MB
Formato Adobe PDF
7.21 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/183472