Running the ExamplesΒΆ

General instructions for running the example source code are given below (more explicit instructions may be provided in the documentation for each example):

  1. Get the DroneKit-Python example source code onto your local machine. The easiest way to do this is to clone the dronekit-python repository from Github. On the command prompt enter:

    git clone


    The Windows Installation copies the example code here: C:\Program Files (x86)\MAVProxy\examples\.

  2. Start MAVProxy and connect to the vehicle. For example:

    • To connect to a simulated vehicle when starting MAVProxy (from the command line): --master=
    • To connect to a simulated vehicle after starting MAVProxy (for example, on Windows):

      link add
  3. You should already have set up MAVProxy to load DroneKit automatically. If not, manually load the library using:

    module load droneapi.module.api
  4. Once the MAVProxy console is running, start the example by entering:

    api start absolute_path_to_example/


    If you start MAVProxy from the same directory as the target script you can omit the full file path:

    api start


Propellers should be removed before testing examples indoors (on real vehicles).