Basic swarm operations
Last updated
Last updated
Function | Description |
---|---|
Swarm.takeOffAll(
z=1
)
Parameters:
z: int or float
Set the height of the swarm
Result: All drones takeoff at the same time and go up to the selected height.
Swarm.landAll()
Parameters:
None
Result: All the armed clovers go down to the floor in their current position and disarm themselves.
Swarm.returnToHome()
Parameters:
None
Result: All the drones return to the initial formation they started operating.
Swarm.returnAndLand()
Parameters:
None
Result:
Very similar to the returnToHome
function, but the drones also land and disarm.
Swarm.applyFormation(
speed=1, tolerance=0.2, wait=True
)
Parameters:
speed: int or float, optional
Set the speed of the drones' movement
tolerance: int or float, optional
Set the tolerance of the navigateWait
function
wait: bool, optional
While 'True' uses the navigateWait
module and the drones will wait for the conclusion of previous operations before applying the current desired formation
Result: Applies the previously selected formation or operation and the clovers start to move in order to form it.
All the operations involved in this section already apply the formation for the user, but all the more complex functions must be followed by the applyFormation command or the desired coordinates will not be executed.
Swarm.plotPreview(
plot_type='2D'
)
Parameters:
plot_type: string
Defines if the plot will be '2D' or '3D'
Result:
A Swarm Preview window will appear on the screen showing how the drones are or where they will go after applying the formation. It will also allow accessing the movement history of the drones.
It's highly recommended to use the plotPreview
feature before applying the formations in simulation or real life, to make sure that the expected behavior will confirm.
All drones take off simultaneously
All drones land in the current position
All drones return to their initial formation coordinates
All drones return to their initial formation coordinates and land there
Applies the selected formation or operation
Open a window with a preview of the selected formation or operation