Swarm In Blocks
  • ▶️introduction
    • Swarm in Blocks
    • What's new?
    • The Atena Team
  • ⚙️Installation
    • How to install Swarm in Blocks?
      • Virtual Machine
      • Native Installation
      • Network configuration
  • 💻Usability
    • Python API
      • Starting modes
      • Basic swarm operations
      • LED operations
      • Formations operations
      • Transformations operations
    • Web API
      • Homepage
      • Swarm Clover Blocks
      • Swarm Station
    • Launch modes
  • 📚Background theory
    • Overview
      • Swarm manipulation
      • ROS architecture
      • Clover adaptation
    • Systems
      • Formations
        • Alphabet
        • Formation 3D
      • Transformations
      • Collision Avoidance
      • LED Effects
      • Swarm Preview
      • First Person View (new)
  • 📖Cases
    • Examples
    • Show-off
  • 🚀Applications
    • Education
    • Commercial
  • 🔒CLOSURE
    • Conclusion
    • References
Powered by GitBook
On this page
  1. Usability
  2. Python API

Formations operations

PreviousLED operationsNextTransformations operations

Last updated 3 years ago

Function
Description

Sets a 2D arrangement from a list of already developed basic formations

Sets a 3D arrangement from a list of already developed basic formations

Create words or letters with the drones

Swarm.setFormation2D(shape, N, L)

  • Parameters:

    • shape: str Shape of the desired formation, based on a list of standard geometries

    • N: int Defines the number of clovers in the formation

    • L: int or float Dimension of the formation side (change for each geometry)

  • Result: Defines the coordinates of a 2D simple geometry for the number of clovers in operation, the geometries are:

    • Line

    • Circle

    • Empty square

    • Full square

    • Triangle

    More details of the function and some code snippets are in the .

Swarm.setFormation3D(shape, N, L)

  • Parameters:

    • shape: str Shape of the desired formation, based on a list of standard geometries

    • N: int Defines the number of clovers in the formation

    • L: int or float Dimension of the formation side (change for each geometry)

  • Result: Has a similar behavior that the setFormation2D, but with 3D geometries, which are:

    • Cube

    • Pyramid

    • Sphere

    More details of the function and some code snippets are also in the .

Swarm.setAlphabet(user_input, N)

  • Parameters:

    • user_input: str Shape of the desired formation, based on a list of standard geometries

    • N: int Defines the number of clovers in the formation

In order to keep the quality of the patterns, to apply the alphabet formations a minimum amount of drones will be demanded and the code will inform it while executing

Result: Creates letters and words based on the user_input and defines the drones' coordinates. The details about this function are in the .

💻
Alphabet section
setFormation2D
setFormation3D
setAlphabet
Formations section
Formations section