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

Transformations operations

PreviousFormations operationsNextWeb API

Last updated 3 years ago

Function
Description

Changes the scale of the formation

The formation as whole changes its position

Rotates the formation around an axis

Swarm.scaleFormation(sx, sy, sz)

  • Parameters:

    • sx: int or float Set the x scale factor

    • sy: int or float Set the y scale factor

    • sz: int or float Set the z scale factor

  • Result: The dimensions of the formation will change, according to the scale selected, some demonstrations are displayed .

Swarm.translateFormation(tx, ty, tz)

  • Parameters:

    • tx: int or float Set the distance to move in x

    • ty: int or float Set the distance to move in y

    • tz: int or float Set the distance to move in z

  • Result: The formation will translate in the selected distance, the has deeper details.

Swarm.rotateFormation(anglex_deg, angley_deg, anglez_deg)

  • Parameters:

    • anglex_deg: int or float Set the rotation angle in degrees for the x-axis

    • angley_deg: int or float Set the rotation angle in degrees for the y-axis

    • anglez_deg: int or float Set the rotation angle in degrees for the z-axis

  • Result: The formation will rotate in the selected axis, to see more information about this operation, check the .

💻
scaleFormation
translateFormation
rotateFormation
here
Transformations section
Transformations section