Multiple drone instances

To spawn multiple drones in the same scene, you must assign a unique name and a distinct pose to each drone to prevent collisions at startup.

_images/multiple_drone_instances.png

For example, to spawn two ANAFI Ai drones:

$ sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="https://firmware.parrot.com/Versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"::name="drone_1"::pose="0 0 0.2 0 0 0" "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="https://firmware.parrot.com/Versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"::name="drone_2"::pose="0 1 0.2 0 0 0" & parrot-ue4-empty

You can also mix different drone models in the same simulation. For example, to spawn an ANAFI and an ANAFI Ai together:

$ sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi.drone"::firmware="https://firmware.parrot.com/Versions/anafi/pc/%23latest/images/anafi-pc.ext2.zip"::pose="0 0 0.2 0 0 0" "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="https://firmware.parrot.com/Versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"::pose="0 1 0.2 0 0 0" & parrot-ue4-empty

Note

If you spawn a large number of drones, the number of open files may exceed your system’s limit. To avoid this issue, run the following command before launching sphinx, in the same terminal where sphinx will be executed:

bash -c "ulimit -n 65535; exec bash"