Solo Development Guide

"solo" Command Line Tool

The Solo CLI tool performs several tasks that are essential for development on Solo. These include:

  • Enabling simultaneous WiFi access to Solo and the Internet
  • Resizing the root partition
  • Installing runit, pip, and smart packages
  • Providing access to the video stream
  • Updating the firmware on Solo and the Controller
  • Downloading logs

Installing Solo CLI

Solo 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.

Connecting Solo to the Internet

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:

  • Connect your PC to the Controller's WiFi network.
  • 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.

  • You may need to disconnect and reconnect your PC to Solo's WiFi network in order enable Internet access (you can verify the PC connection by opening up a web browser and accessing any web page).

Installation

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.

Install smart repositories

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

Install runit

To add the runit script daemon (used to create new services):

solo install-runit

Install pip

To install pip directly on Solo:

solo install-pip

Deploying/running DroneKit scripts on Solo

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

Downloading Logs

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).

Expanding the Root Partition

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.