The Solo CLI tool performs several tasks that are essential for development on Solo. These include:
runit
, pip
, and smart
packagesSolo CLI is a command line application you install to your PC. This application can control Solo and the Controller when connected to their WiFi network. You will need Python and pip installed in order to run this utility.
First connect to a WiFi network with Internet access. Run this command on your PC:
pip install git+https://github.com/3drobotics/solo-cli
Once installed, you should be able to run solo
from your command line to see the list of available options. For example:
$ solo
Usage:
solo info
solo wifi --name=<n> [--password=<p>]
solo flash (drone|controller|both) (latest|current|factory|<version>) [--clean]
solo flash --list
solo flash pixhawk <filename>
solo provision
solo resize
solo logs (download)
solo install-pip
solo install-smart
solo install-runit
solo video (acquire|restore)
solo script [<arg>...]
Specific information about what these commands do is given in the following sections and on the Solo CLI README.
The solo wifi
command connects your Controller to your home WiFi network. Solo uses this connection (via the Controller network) to access the Internet during development and to download and install packages.
The steps for using the command are:
Run the following command from your PC's command line:
solo wifi --name=<ssid> --password=<password>
The SSID and password should be those of a local WiFi network, i.e. that of your home or your office.
This section demonstrates how to install various development tools using Solo CLI. You must first connect to the Internet, as shown in the previous section.
smart is the Solo package manager (see the Installing Packages section for more information). To install the list of repositories needed by smart, run:
solo install-smart
To add the runit script daemon (used to create new services):
solo install-runit
To install pip
directly on Solo:
solo install-pip
Use the solo script pack
command to package a folder containing DroneKit-Python scripts
and any dependencies into an archive for deployment to Solo.
The host computer must be connected to the Internet, and the folder must contain a
requirements.txt file listing
the (PyPi) dependencies:
solo script pack
If successful, the command will create an archive in the solo-script.tar.gz
in the current directory.
Deploy this archive to Solo and run a specified script using the solo script run <scripname>
command.
The host computer must be connected to the Solo wifi network, and Solo must also be connected to the
Internet.
For example, to deploy and run the helloworld example:
solo script run helloworld.py
To download logs to your host computer:
solo logs download
Logs are downloaded from both solo and the controller, and copied into subdirectories ./drone and ./controller (respectively).
Solo splits its available space between a "root" partition for code and a "logs" partition. In production, the root partition on Solo is fairly small in order to maximize the space available for logs. When installing many packages or code samples, you can quickly reach the limits of space on this partition.
You can use the solo resize
option to expand the root partition from its default of 90Mb to ~600Mb.
To expand the root partition run:
solo resize
You may have to physically reboot (power cycle) your drone after the script is complete.