“Hello, Drone!”#
The Hello Drone Flight mission is a simple Air SDK Flight mission explaining how to:
Use Flight supervisor default state machine
Write a Guidance mode with a trajectory generation for cameras
Send and receive messages between Flight mission and Mission UI
When the Hello Drone Flight mission is activated, the drone will “say” Hello moving its head.

The code is available here.
Hello Flight supervisor state machine#
The Flight mission’s code for Flight supervisor is available here.
This code defines the states and transitions (see how to modify the state machine). It uses built-in takeoff, hovering, landing and critical stages and creates specific ground and flying stages.
Two Transitions in the state machine are defined to switch from
idle
or say
states of ground stage.
Hello Guidance mode#
The Flight mission’s code for Guidance is available here.
This code defines the Guidance specific HelloGroundMode in Python
(see how to write a mode).
In this mode, the orientation of the front camera performs the Hello
animation. A message count
is sent to Flight supervisor counting the
number of times the front camera has performed the Hello animation.
Hello Service#
The Flight mission’s code for the Service is available here.
The Service computes the mean depth from the depth map video feed of the stereo camera. It demonstrates how to define a telemetry consumer and producer. And it demonstrates how to instantiate a client video feed.
Security setup#
The generated archive needs to be signed to be installed on the drone (simulated or real)
The method and key to use is specified in the file product_config.json.
The key configuration item has the following format: ecdsa:<method>:<name>
<method>
can be local or aws-kms (https://aws.amazon.com/kms/)<name>
is the path to the private key (relative to the product directory) for the local method or the id of the key foraws-kms
method
Security setup of a real drone#
First, make sure that the public key from the pair of keys used to sign your missions has been provided to the drone secure element (this has only to be done once).
To generate the pair of keys see Generate a key pair.
To add the generated public key see Add a key to the Secure Element.
If you choose to use a local key, copy the private key from the pair of keys to:
$ cp fm-provider-private-key.pem products/hello/classic/key.pem
Then fill the key parameter in products/hello/classic/config/product_config.json
with ecdsa:remote:classic/key.pem
Security setup of a simulated drone#
The simulated drone already contains a default known public key whose private key is available in products/hello/pc/key.pem
The product_config.json is already configured to use it. For a new mission, you can simply copy the prvate key and the configuration file to your own product directory.
Important
This private key shall not be used for a real drone, only for testing with a simulated drone.
Build the Hello Drone Flight mission#
From the previously created workspace, type the following commands.
For a simulated drone:
$ ./build.sh -p hello-pc -t all -j
Output signed archive will be generated here:
$ out/hello-pc/images/com.parrot.missions.samples.hello.tar.gz
For a real drone:
$ ./build.sh -p hello-classic -t all -j
Output signed archive will be generated here:
$ out/hello-classic/images/com.parrot.missions.samples.hello.tar.gz
Note
You can run ./build.sh --help
to learn more about the building options
Install the Hello Drone Flight mission#
Type the following commands.
For a simulated drone:
$ ./build.sh -p hello-pc -t sync --unsigned --reboot
For a real drone:
$ ./build.sh -p hello-classic -t sync --reboot
Once the drone is restarted, the mission will be available.