Swarm manipulation
Show more about the approach of our system and how it's organized internally
Whats our approach?
Our project works as an automatic formations generator for a swarm with multiple categories of formations. It is able to manipulate a swarm in real time with high level interfaces. The system is structured around clover platform and works from the planning state of a swarm application, passing through to the high fidelity simulation on Gazebo and ending with the real time manipulation of real clovers. It is built almost entirely on python, using extremely useful libraries, such as numpy, matplotlib, wxpython, ROS modules, and other ones.
How is it organized?
It's a system made for ROS workspace, that contains 7 systems inside with the main files:
Swarm in Blocks
-> Pkg:
swarm_in_blocks
File:swarm.py
Node:swarm_api
Swarm Clover Blocks
-> Pkg:
swarm_clover_blocks
File:clover_blocks
Node:clover_blocks
Swarm Checker
->Pkg:
swarm_checker
File:swarm_checker_nodes.py
Node:swarm_checker
Swarm FPV
-> Pkg: swarm_fpv File: main.py Node: swarm_fpv
Swarm Collision Avoidance
-> Pkg:
swarm_collision_avoidance
File:swarm_collision_avoidance_node.py
Node:swarm_collision_avoidance
Swarm Examples
-> Files:
planning_formation.launch, simulate_formation.launch, planning_transformation.launch, simulate_transformations.launch,
Swarm Station
-> Pkg:
swarm_station
Files:frames_transform.py, swarm_station.py, safe_area.py
+ front end (not ROS related)Rasp Package -> Pkg:
rasp_pkg
Files:rasp_resource_publisher_node.py
Node:rasp_resource_publisher
Clover UI src -> Not a ROS package, but the source code of our homepage using React
Yellow packages -> work from CopterHack 2023
It's important to cite that the implementation of the functions that the user uses to the swarm manipulation are inside swarm.py
file. This file is inside a ROS python module named swarm_in_blocks and is organized in multiple files, one for each specific feature of our project. So the class Swarm, used on Python API and Blocks API, is implemented here and works as a library for everyone who wants to develop a swarm with the clover quadcopter.
Another import thing about the swarm manipulation structure, Swarm Checker makes the back-end to the Swarm class. So the use of our functions depends if its node is running properly. The Swarm class listens to a topic that swarm_checker
is publishing with the number of clovers on network, the connected clover ids and other important information.
How it's done?
Our system is based on simulating drones in gazebo using ROS architecture. It uses one single master node (roscore) that connects all drones with its services, gazebo and mavlink.
The basic drone controls and commands are based on the original clover repository. It emulates a PX4 for flight controlling, and uses MAVROS and MAVLink protocol to communicate the flight controller with the drone using ROS framework, with the simulation happening in Gazebo.
Although our application is almost entirely built in python, other resources were very useful as well for a lot of tasks. For the controlling / ROS network, scripts in C++ were developed to improve performance. But one of our main accomplishes was the new Blockly platform face, a front-ending improvement using mainly HTML, CSS and Javascript to make the user-blockly interaction the best possible. The results were already shown here.
Last updated