General instructions for running the example source code are given below (more explicit instructions may be provided in the documentation for each example):
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 http://github.com/dronekit/droneapi-python.git
The Windows Installation copies the example code here:
C:\Program Files (x86)\MAVProxy\examples\.
Start MAVProxy and connect to the vehicle. For example:
To connect to a simulated vehicle when starting MAVProxy (from the command line):
To connect to a simulated vehicle after starting MAVProxy (for example, on Windows):
link add 127.0.0.1:14550
You should already have set up MAVProxy to load DroneKit automatically. If not, manually load the library using:
module load droneapi.module.api
Once the MAVProxy console is running, start the example by entering:
api start absolute_path_to_example/example_name.py
If you start MAVProxy from the same directory as the target script you can omit the full file path:
api start example_name.py
Propellers should be removed before testing examples indoors (on real vehicles).