The SITL (software in the loop) simulator allows you to run Plane, Copter or Rover without any hardware. It is a build of the autopilot code using an ordinary C++ compiler, giving you a native executable that allows you to test the behaviour of the code without hardware.
This article provides an overview of SITL’s benefits and architecture.
SITL allows you to run ArduPilot on your PC directly, without any special hardware. It takes advantage of the fact that ArduPilot is a portable autopilot that can run on a very wide variety of platforms. Your PC is just another platform that ArduPilot can be built and run on.
When running in SITL the sensor data comes from a flight dynamics model in a flight simulator. ArduPilot has a wide range of vehicle simulators built in, and can interface to several external simulators. This allows ArduPilot to be tested on a very wide variety of vehicle types. For example, SITL can simulate:
Adding new simulated vehicle types or sensor types is straightforward.
A big advantage of ArduPilot on SITL is it gives you access to the full range of development tools available to desktop C++ development, such as interactive debuggers, static analyzers and dynamic analysis tools. This makes developing and testing new features in ArduPilot much simpler.
Building on Linux (tested on Ubuntu 14.04 LTS): (Needs update to use Qt5.4.2, 5.2.1 doesn't work anymore)
It's important to have QT5.4.2
For installation of QT5.4 you need to follow the link:
1) Install the required packages:
Be sure to run apt-get update first
1. you need QT installer, for that go to http://www.qt.io/download-open-source/ and download QT installer.
2. Install QT5.4
- sudo apt-get install build-essential
- sudo apt-get install libgl1-mesa-dev-lts-utopic
- go to download file
- chmod a+x qt-opensource.linux.x64-1.6.0.-online.run
- follow instruction in QT settup
3. After that, you need to follow steps below
2) Clone the repository in your workspace:
3) Open QTCreator, open the project qgroundcontrol.pro.
In the side menu, go to Projects, change the build to be Desktop QT 5.4.2 GCC 64 bit if it's different. Then Build/Rebuild All
It will take a while.
Alternatively, you need to try below,
Then you need to go toBuild APM Planner:
4) Run APM Planner: