Solo Development Guide

Running the Examples

This guide contains a number of examples showing how to use DroneKit on Solo. These are stored on Github in separate folders under solodevguide/examples.

The examples can be run locally from your development computer to communicate with either Solo or a simulated copter, or they can be run on Solo itself.

Running on Solo

The following instructions can be used to package each of the examples on a host computer, then deploy and run them on Solo:

  1. Clone the solodevguide repo and navigate to your target example (in this example: "helloworld"):

    git clone https://github.com/3drobotics/solodevguide
    cd solodevguide/examples/helloworld
    
  2. Connect your host computer and Solo to the Internet (using the solo wifi command).

  3. Package the current example folder for installation on Solo using the solo script pack command:

    solo script pack
    

    After some processing, this will create an archive called solo-script.tar.gz in your current directory, or display an error if the process could not complete.

  4. Install the script archive on Solo and run a specified script using the solo script run command (your computer must be connected to the Solo wifi). In this example we start helloworld.py:

    solo script run helloworld.py
    

Running from a host PC to Solo

The following instructions explain how to run the examples locally from a host PC, communicating with Solo.

  1. Clone the solodevguide repo and navigate to your target example (in this example: "helloworld"):

    git clone https://github.com/3drobotics/solodevguide
    cd solodevguide/examples/helloworld
    
  2. Connect your PC to the Solo WiFi network.

  3. Run the target script as shown:

    python helloworld.py
    

Running from a host PC to Simulator

The following instructions explain how to run the examples locally from a host PC, communicating with a simulated device.

  1. Set up a simulated vehicle using the instructions in the DroneKit documents here.

  2. Clone the solodevguide repo and navigate to your target example (in this example: "helloworld"):

    git clone https://github.com/3drobotics/solodevguide
    cd solodevguide/examples/helloworld
    
  3. Run the target script, specifying the SITL loopback address as shown:

    python helloworld.py 127.0.0.1:14550