Swarm Clover Blocks

In this section we will break down the particularities of Swarm Clover Blocks, analyzing all the points for using the tool, also highlighting the improvements made in relation to the pure Blockly.

UX/UI

In this section we will deal with the main elements of the Swarm Clover Blocks interface, take note of each color by marking each element and its respective legend below:

  • Programming Views: Switch type button that allows you to view the code made in blocks with the python language:

  • Dark mode switch: Switch type button that changes the blockly theme, better adapting for late night works:

  • Connection status: Dynamic reminder that the environment is disconnected, just launch it through the terminal for the reminder to disappear and the application to connect:

  • File management: File manager that allows you to save and clean the program made, in addition, it provides your previously saved programs and some ready-made examples:

  • Tools Buttons: Line of 4 buttons for the simulation:

    • Launch: It opens a Pop-up with 3 parameters to be chosen, from which the command that must be inserted in the terminal to launch the application is automatically generated, and ready to copy-paste;

    • Run: With Launch done, runs the program created in blocks (if the application is disconnected it will be locked);

    • Stop: Stop the running program, freezing the simulation;

    • Stop and Land: In addition to pausing the program, land the drones.

  • Sidebard: Bar containing all the block options available in pure Blockly, Clover Blocks and more Swarm Clover Blocks, only needing to be dragged to the central area to be used.

Default Swarm Blocks

By default, we have already created some blocks with the main uses of drone swarms, all functional and optimized. With that in mind, let's look at each of them individually:

  • Take off all:

    • Input:

      • Height

    • Output:

      • Lift all drones to the desired height

    • Description: Very important block for your program, since from there it is possible to lift all the drones coming from the launch, leaving them ready for new instructions.

  • Land all:

    • Input: NULL

    • Output: Land all launched drones

    • Description: Another very important function for your program, this time to finish it, is this block that lands all launched drones.

  • Return to home and land:

    • Input: NULL

    • Output: Return to initial position and land all launched drones

    • Description: Similar to the "Land all" block, but with the extra function of returning to the starting lineup with all drones.

  • Set 2D formation:

    • Input:

      • Formation (options: Line, Full Square and Empty Square)

      • Number of clovers

      • Length/Side

    • Output: Assemble a 2D figure with the launched drones

    • Description: Automatically assembles the desired 2D formation, moving all launched drones into the best possible positions to assemble the figure.

  • Set 3D formation:

    • Input:

      • Formation (options: Cube, Sphere and Pyramid)

      • Number of clovers

      • Length/Side

    • Output: Assemble a 3D figure with the launched drones

    • Description: As above, automatically assembles the desired 3D formation, moving all launched drones into the best possible positions to assemble the figure.

  • Translate formation:

    • Input:

      • Translation in X

      • Translation in Y

      • Translation in Z

    • Output: Translation of the last formation made in Cartesian coordinates

    • Description: Block with the function of facilitating movement in large swarms in the same formation, with the ease of working with Cartesian coordinates.

  • Rotate formation:

    • Input:

      • Angle in X in radians

      • Angle in Y in radians

      • Angle in Z in radians

    • Output: Rotation of the last formation on the axis

    • Description: As above, this block ensures that the rotation of made formations is easy and efficient.

  • Scale formation:

    • Input:

      • Scale in X

      • Scale in Y

      • Scale in Z

    • Output: Applies a scaling factor to the parameters of the last applied formation

    • Description: Another block with the function of ensuring that change and work with formations is facilitated, ensuring that with the same amount of drones, the formation takes different visual effects (stretched or compressed).

  • Plot formation:

    • Input:

      • Plot type

    • Output: Window with the preview of the drones' position in a 2D or 3D grid

    • Description: Block whose function is to display how the formation will look like, before applying it in the simulation, it isn't a mandatory piece of the code.

  • Apply formation:

    • Input: NULL

    • Output: Apply the desired formation with the launched drones

    • Description: Block for applying the desired formation with the launched drones.

Last updated