# Swarm in Blocks

### [📜](https://emojipedia.org/scroll/) About the project

Swarm in Blocks is a [CopterHack 2022](https://clover.coex.tech/en/copterhack2022.html) project. It's a **high-level interface** based on the blocks language, which consists of fitting code parts, like a puzzle. Each script represents a functionality, for example, conditional structures, loops, or functions that receive parameters and return an instruction to the swarm. The platform was designed from COEX's existing systems, specifically **Clover**.

In 2023, Swarm in Blocks has taken an even bigger step, looking to fulfill our biggest vision **"It's never been easy to Swarm"**, we talk to transcend the local scope of the past project and explore the biggest problems for implementing a Swarm. For copterhack 2023, we present **Swarm in Blocks 2.0**, an even more complete platform with the object of facing the biggest difficulties of a Swarm in a simple and polished way.

<figure><img src="https://2296480936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9O11TiXK1JPnlrpilLg%2Fuploads%2F3B00YxSPunY69enLC8Pr%2Fclovers_leds.gif?alt=media&#x26;token=43f2d241-ddd8-4b81-bc84-a8d741915fa3" alt=""><figcaption><p>Simple demo of the platform running</p></figcaption></figure>

*“Clover is an educational kit of a programmable quadcopter that consists of popular open-source components, and a set of necessary documentation and libraries for working with it.”*  If you want to know more access[ COEX's site](https://clover.coex.tech/en/).

Each day the world is more virtual and integrated with technology, this way, the search for innovations is natural and something that has become more and more popular are applications with drone swarms, acting in areas such as package deliveries, agriculture, surveillance, and rescues. Although, with a closer look, we realize that new languages, platforms, and programming tools have emerged, turning the control of a drone swarm very **complex**, especially for beginners in this subject.

Considering all of this, the Atena team idea started, developing an **interface** that would make simple handling swarms, without requiring advanced knowledge in all the necessary platforms, such as ROS and other programming languages. That's why the **block language** was chosen, aiming to gradually insert anyone who desires into the world of programming, expanding the educational methodologies in this area.

![Swarm Clover Blocks example](https://2296480936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9O11TiXK1JPnlrpilLg%2Fuploads%2FMLn9hYkepR5W0siK6oOW%2FGIFZINHO.gif?alt=media\&token=6b0cfd93-986f-400f-adb2-184ea8b00e4e)

But, that's not all of our project! We believe that block programming is just an **allegory for simplifying the use of swarms** that we put on the agenda. In fact, much of our efforts are far from block programming, such as internal anti-collision algorithms or the actual readaptation of the px4 backbone to the swarm. Another great example of simplification in the use of the swarm is the **Swarm Station**, which makes it possible for a single person to have on his screen all the necessary information in a clear and simple way (by the browser itself) to raise a swarm. **This is swarm in blocks!**&#x20;

To get a complete experience on our platform, our tutorials show you how to best leverage our work in automating the swarm preparation process! All drone connectivity with the platform has already been resolved, requiring only a pre-installation of the prerequisites that we suggest and that's it, a Swarm of drones at your control!

It is worth noting that although we target the **educational** environment, to download all the necessary files and leave the platform working in perfect condition, it’s essential to have some prior baggage and in-depth knowledge of Linux distributions, to be able to fix the possible errors that may appear due to some updates, program versions and among many others. Besides, the platform setting process is not able to run on all devices, requiring more powerful machines for high-performance simulation with Gazebo, a virtual simulator. In this way, the educational focus is aimed at schools that would already have the structure to make the hard processes for advisors and teachers.

![Educational use example](https://2296480936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC9O11TiXK1JPnlrpilLg%2Fuploads%2FIkGahrZ6XPiBmCt0Pz9I%2Fmeguinha2.gif?alt=media\&token=e7bf253a-eb64-40e6-96ec-61fdfa0b234a)

In addition, we have created several tools that can facilitate swarm presentations, enabling a great experience for the programmer and, consequently, for the audience, arousing the public curiosity about the aerial robotics theme.

Finally, it was also considered to provide support for experienced users who are looking for a simpler tool, with means to help create their functions and specific features for their needs, as well as testing and simulating everything before getting into the real world.

### 🤖 Github

-> <https://github.com/Grupo-SEMEAR-USP/swarm_in_blocks>

### &#x20;[📹](https://emojipedia.org/video-camera/) Final video 2023

{% embed url="<https://www.youtube.com/watch?ab_channel=SwarminBlocks&t=15s&v=QFKgrqIAO1E>" %}
Final Video 2023 contest
{% endembed %}

### [📹](https://emojipedia.org/video-camera/) Final video 2022

{% embed url="<https://www.youtube.com/watch?ab_channel=SwarminBlocks&v=5C-1rRnyiE8>" %}
Final Video 2022 contest
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swarm-in-blocks.gitbook.io/swarm-in-blocks/introduction/swarm-in-blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
