AirSDK Command Line Interface#
airsdk-cli is a command-line tool for building and testing airsdk missions.
It aims to ease the development of AirSDK missions by providing a simplified build environment that
should fit most missions.
The previous build environment (using the airsdk_samples manifest) is still supported, either for already deployed missions, or for missions too complex for this tool. Hopefully those cases should be rare.
Creating a new mission#
A new mission can be created by calling
airsdk init. The init command will ask a few questions
about the mission, and will then create a directory for the mission.
This directory contains the following:
The mission.yaml file is the core of an
airsdk-cli-based mission. It contains all the information about the mission, and is the only configuration file needed.
.gitignorefile configured to ignore the
An empty mission template. All of these source files can be freely edited to make the mission do what it should do.
A mission directory can be versioned as a single git repository, where the mission source files and
mission.yaml files should be checked-in.
airsdk-cli uses a hidden directory (
.airsdk) inside the mission directory to store any
generated code or build artifact. It assumes that this directory only contains its own files,
and might modify/delete any of its content without notice.
airsdk-cli users should not store anything in this directory, and this directory should
not be added to version control.
Building a mission#
Once a mission is created, building the mission is achieved with the
airsdk build command.
Changes to the
mission.yaml should be picked-up automatically and should not require
cleaning the mission before building again.
airsdk clean command forces a mission clean. This should only be needed to reclaim the disk
space used by the build folder of a mission.
Installing a mission#
Once built, the mission can be installed on a drone with the
airsdk install command.
This command installs the current mission on a connected drone or simulator, then reboot
the drone/simulator to finish the mission installation.
In order to test a mission, it might be easier to set the mission as the default mission. In this
case the mission will be automatically loaded when the drone is booted. This can be achieved by
--default option to the install line. Note that a drone can only have a single
default mission, and that installing a mission as the default one will automatically remove the
default flag from the previous default mission.
airsdk-cli commands can be executed from sub-directories of a mission. The tool will
search parent directories until it finds a
mission.yaml file, and consider this as the root
of the mission.
Listing and uninstalling missions#
The tool provides the
airsdk list and
airsdk uninstall commands to manage installed missions
on a drone.
list command simply prints the list of installed missions, while the
uninstall [uid] command will uninstall the mission with the given UID (if no UID is given, the
UID of the current
mission.yaml file will be used)
While Parrot missions can be uninstalled by the
uninstall command), it is not advised to
do so. Most of those basic missions will be automatically reinstalled when rebooting the drone,
but the drone behavior might be strongly affected until that.
Adding assets to a mission#
A mission might require some files to be directly copied in the mission file without building it
first. This can be done by creating a directory named
assets within the mission directory.
airsdk-cli will copy all files found in this directory into the mission storage, where it can be
accessed by the mission.
When the content of the
assets directory is copied into the mission file, symbolic links are
dereferenced, even if they point to another file into the