SITL runner for DroneKit.
Python Shell PowerShell
Clone or download
peterbarker init: don't catch os error when probing capabilities
If we can't find the binary we're only going to die at some stage
Latest commit 9a2d659 Dec 20, 2017



PyPi published version Windows Build status OS X Build Status Linux Build Status

SITL Runner for DroneKit.


The ArduPilot SITL (Software In The Loop) simulator allows you to simulate an ArduPilot based autopilot and communicate with it using MAVLink over the local IP network.

DroneKit-SITL is the fastest and easiest way to run SITL on Windows, Linux, or MAC OSX. It is installed from Python’s pip tool on all platforms, and provides a few simple commands to run pre-built vehicle binaries that are appropriate for the host operating system (downloading them if needed). You can even use it to run binaries you've build locally.

The tool is used extensively by DroneKit projects to test DroneKit apps and example code.

Note: DroneKit-SITL currently only supplies x86 binaries for Mac, Linux and Windows. You can't run it on ARM platforms like RaPi.


Install using pip (recommended):

pip install dronekit-sitl

Installing from Github master:

pip install git+

The -UI or --upgrade --ignore-installed flags can be added to the commands to update an existing installation to the latest version.


List of available commands:

  dronekit-sitl --list
  dronekit-sitl --reset
  dronekit-sitl <copter(-version)> [parameters]
  dronekit-sitl <plane(-version)> [parameters]
  dronekit-sitl <rover(-version)> [parameters]
  dronekit-sitl <solo(-version)> [parameters]
  dronekit-sitl /path/to/local/binary [parameters]

The --list commmand is used to display the available build versions (e.g. copter-3.4-dev).

The -h parameter can be passed in the command above to list all the parameters to the build (these are reproduced below).

Option Description
--h Help (display help for the build - i.e. these parameters)
--home HOME Set home location (lat,lng,alt,yaw)
--model MODEL Set simulation model
--wipe Wipe eeprom and dataflash
--rate RATE Set SITL framerate
--console Use console instead of TCP ports
--instance N Set instance of SITL (adds 10*instance to all port numbers)
--speedup SPEEDUP Set simulation speedup
--gimbal Enable simulated MAVLink gimbal
--autotest-dir DIR set directory for additional files


The following command might be used to start SITL for build of copter-3.3:

dronekit-sitl copter-3.3 --home=-35.363261,149.165230,584,353

SITL starts and waits for TCP connections on In a second terminal you can spawn an instance of MAVProxy to forward messages to UDP ports and (in the same way as --master tcp: --sitl --out --out

Ardupilot versions available

You can get the available vehicle builds using the command:

dronekit-sitl --list

You can also view the pre-compiled Ardupilot Copter, Plane and Rover binaries at the links below:

Platform List


SITL exposes a Python API for managing a SITL instance.

from dronekit_sitl import SITL
sitl = SITL(path=apm) # load a binary path (optional), version, verbose=False) # ...or download system (e.g. "copter") and version (e.g. "3.3")
sitl.launch(args, verbose=False, await_ready=False, restart=False)
sitl.block_until_ready(verbose=False) # explicitly wait until receiving commands
code = sitl.complete(verbose=False) # wait until exit
sitl.poll() # returns None or return code
sitl.stop() # terminates SITL

A simpler (but less flexible) interface is also available:

import dronekit_sitl
sitl = dronekit_sitl.start_default() # basic ArduCopter sim
connection_string = sitl.connection_string()
sitl.stop() # terminates SITL


dronekit-sitl is licensed as MIT, Apache-2.0, and GPLv3.

pysim is licensed as GPLv3.