Swarm Preview
This section is about the system Swarm Preview and its functions
Last updated
This section is about the system Swarm Preview and its functions
Last updated
The main goal of the Swarm Preview is to help the user to visualize how the swarm will behave in the simulation or real life, without using a lot of computational power and avoiding some problems in the simulation.
The Swarm Preview is the base function in the Planning Mode, but it can be also used in the Simulation Mode or Navigation Mode, before applying the desired formations. It works for the 2D and 3D formations as well as for the alphabet and transformations.
You can use Swarm Preview with the Python API and the Blocks API. The functions that start the UI is plotPreview(type='2D')
. The type
argument can be '2D'
or '3D'
. See the planning_formation.py
example to understand better how to start Swarm Preview.
After pressing the resume button, the program can be built or written and the function may be called anytime with the plot_formation block, just being necessary to select if the plot will be 2D or 3D, then a second window will appear with some options and functions.
If the user wants to keep programming his swarm, he just needs to press the resume button, this way, the window will close and the code keep running from where it stopped.
The save button simply saves the history of formations made in a .json file, which can be accessed after with the load function. This way, it's possible that the user tests the swarm and, when satisfied, saves it and loads the final results in the Simulation Mode to see a more detailed behavior of his program, without the need of making all the operations again.
In case of noticing any problem while plotting the formations, the cancel button can be pressed and the code will stop running, avoiding any bigger problems.
The control arrows allow the navigation between all the operations made during the program execution, granting the possibility of finding where an unexpected behavior started.