Take off and hints, drone by drone

Anafi, Bebop and Bebop2

These drones are controlled via a WiFi link (or via a virtual ethernet link) so you probably want to provide a valid Wifi “stolen_interface” in your .drone file. If you don’t need to control the drone via Wifi, you can comment the “stolen_interface” parameter in the .drone file and the drone will not create its usual Wifi access point. See How to connect to the simulated drone for more information on how to connect to a drone via a Wifi link.

Once connected to your drone with a controller (e.g. FreeFlight 6), send the take off command to the drone and it should take off and go in hovering mode waiting for further instructions from the controller.

Disco

The Disco requires a Skycontroller 2 as a Wifi controller and a valid “stolen_interface” parameter in the .drone file. See How to connect to the simulated drone for more information on how to connect to a Skycontroller 2 via Wifi.

To take off, the drone must be shaked and tossed into the air. In order to do that, you must send a start action to the handling Parrot-Sphinx plugin identified as disco/fixedwings_shake/handling. This can be achieved either from the Web interface, or by sending an action request to the JSON-RPC server:

$ echo '{"jsonrpc": "2.0", "method": "TriggerAction",\
  "params": {"machine":"disco", "object":"fixedwings_shake/handling", "action":"start"}, "id": 1}'\
  | curl -d @- http://localhost:8383 | python -m json.tool

Once connected to your drone with the Skycontroller 2, send a “shake” command to Parrot-Sphinx followed by a take off command to the drone. The Disco should be lifted up and shaked by Parrot-Sphinx. After the drone has received the take off command the propeller should start spinning and the drone should immediatly take off and go in loiter mode at a predefined altitude. When the Disco reaches its loiter altitude it should respond to the commands of the Skycontroller 2.

Faking ANAFI’s SD card

Anafi allows the user to insert an SD card, amongst other things, to record photos and videos. With Parrot-Sphinx, it is possible to simulate the presence or the absence of SD card. This is done using an USB mass storage device directly plugged into the host machine.

Warning: once the simulated firmware takes control over the mass storage device, it acts exactly like with the regular SD card. So it can fill the memory space, remove files, and even totally format the device.

Important: for this feature to be functional, the host system shall not (auto)mount the USB device. For Gnome sessions, the following command may help:

$ dbus-launch dconf write /org/gnome/desktop/media-handling/automount false

Once plugged in, identify the serial number of the USB device using for example:

$ lsusb
.... identify the vendor ID and product ID related to the device.
$ sudo lsusb -v -d <VID>:<PID> | grep iSerial

Then in Parrot-Sphinx’s command line, specify the machine_param sdcard_serial to the .drone file. For example,

$ sphinx anafi4k.drone::sdcard_serial=070B34EB8129CC17 outdoor_2.world

Once the simulation gets started, the USB storage should be automatically detected and the drone firmware should start reading/writing into it.

Using the front camera

Most of the drones have an optional front camera that is used for recording and for live streaming to the controller. This camera is activated by default in the examples installed with Parrot-Sphinx. To disable the front camera, set the with_front_cam option to 0. The front camera activation requires a high-end GPU (see System requirements) so you might want to disable it if your system has an integrated or low-end GPU. The drone firmware might not even run if the camera is enabled on a low-end GPU.

To enable/disable the front camera, check and modify your .drone file or override the parameter from the command line:

$ sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone::with_front_cam=0

With low-end GPU, you might try to use the low_gpu option set to 1. This option decreases the front camera rendering quality. Hopefully, this will be enough to run the simulation with the front camera enabled on your system.

$ sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone::with_front_cam=1::low_gpu=1

See Anatomy of a ‘.drone’ file for more information on the .drone files and on how to set the drone parameters.

Bebop 2 Power

To simulate a Bebop 2 Power, just launch a Bebop 2 simulation as usual and set the with_hd_battery option to 1. For example:

$ sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone::with_hd_battery=1

Minidrones

Minidrones (Airborne, Mambo and Swing) only accept to be connected via a Bluetooth link. You must provide a valid Bluetooth MAC address (the one of your Bluetooth hardware) in the “stolen_bdaddr” option in your .drone file. You can also override this drone parameter from the command line:

$ sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/mambo.drone::stolen_bdaddr=00:1A:7D:DA:71:11

The Bluetooth device associated with this MAC address will be used by the minidrone to communicate with its controller. See How to connect to the simulated drone for more information on Bluetooth requirements.

Once connected to your drone with a controller (e.g. FreeFlight Mini), send the take off command to the drone and it should take off and go in hovering mode waiting for further instructions from the controller.

Sequoia accessory

Through USB it is possible to connect a physical Sequoia camera to a simulated “SQ” drone.

Several drone models support Sequoia in Hardware-In-the-Loop mode:

  • Disco

  • Bluegrass

Prerequisites

1. make sure your simulated drone has a “eth0” wifi interface. You may need to edit the <stolen_interface> element from your .drone file (see Anatomy of a ‘.drone’ file)

  1. disable the automount of usb devices:

$ sudo apt-get install dconf-cli
$ dconf write /org/gnome/desktop/media-handling/automount false

Usage

When your simulated SQ drone is running, plug a sequoia to an available USB port on your host, the simulated SQ drone should detect it and be able to use it.

From your host you should also be able to access the sequoia http server at 10.202.0.2 .