Setting up a Simulated Vehicle (SITL)

The SITL (software in the loop) simulator allows you to create and test DroneKit-Python apps without a real vehicle (and from the comfort of your own developer desktop!)

SITL runs natively on Linux and Windows, or within a virtual machine on Mac OSX, Linux or Windows. It can be installed on the same computer as DroneKit, or on another computer on the same network.

The sections below explain how set up SITL for the different operating systems, and how you can set up SITL to connect to Mission Planner and DroneKit at the same time.

Setting up SITL on Linux

Build and install SITL on Linux using the instructions in: Setting up SITL on Linux (ArduPilot wiki)

Setting up SITL on Windows

Build and install SITL on Windows using the instructions in: Setting up SITL on Windows (ArduPilot wiki)

Set up SITL using Vagrant (MacOS)

This section shows how to bring up a pre-built SITL instance hosted in a Vagrant virtual machine. This approach should be used if you need to run SITL on MacOS. It can also be used for Windows and Linux (though we recommend the native installations linked above).


The Vagrant virtual machine is “headless” (has no UI) and so SITL cannot display the MAVProxy map and console. You can still see and send messages in the SITL Command Prompt.

  1. Get the software for hosting the Simulator onto your computer (Windows, OS-X and Linux are supported):

  2. Install SSH (Windows only - SSH is present by default on Linux/Mac OSX)

    • Download and install Git for Windows (or another client that comes with SSH). After installing you can locate the file using the command C:\where ssh (normally it is installed to C:Program Files (x86)Gitbinssh.exe
    • Add the ssh.exe location to the Path (System Properties | Advanced tab | Environment Variables | Path)
  3. Create a new directory where you will run Vagrant, and open a command prompt/terminal in it:

  4. Enter the following commands to fetch a Vagrantfile for the pre-built SITL image:

    vagrant init 3drobotics/ardupilot-sitl
  5. Launch the new image. This takes a long time the first time it is run while it downloads the image from the Internet.

    vagrant up
  6. SSH into the vagrant instance, and start a vehicle:

    vagrant ssh

    When prompted, enter your desired vehicle (e.g. “copter”) to build/start SITL. Once complete, you will see a MAVProxy prompt displaying periodic vehicle-status updates:

    Ready to FLY  ublox Received 454 parameters
    fence breach
    APM: PreArm: RC not calibrated
  1. Load a default set of parameters and disable the arming check:

    STABILIZE>param load ../Tools/autotest/copter_params.parm


    SITL simulates (by default) a vehicle that may not pass the arming check. This change makes the simulated vehicle more forgiving, which allows the examples to arm and run.

    You should never disable the arming check in a script or on a real vehicle.

Connecting an additional Ground Station

This section explains how you can connect multiple ground stations to a running SITL instance in addition to your DroneKit MAVProxy link.

To do this you first need to get SITL to output to an additional UDP port of your computer:

  • Find the network IP address of your computer (On Windows you can get this by running ipconfig in the Windows Command Prompt).

  • In the SITL Command Prompt, add the IP address of the GCS computer (e.g. and an unused port (e.g. 145502) as an output:

    output add

Then connect Mission Planner to this UDP port:

  • Download and install Mission Planner

  • Ensure the selection list at the top right of the Mission Planner screen says UDP and then select the Connect button next to it. When prompted, enter the port number (in this case 14552).


    Mission Planner: Listen Port Dialog

After connecting, vehicle parameters will be loaded into Mission Planner and the vehicle is displayed on the map.