Drone Software Development
  • Introduction
  • Introduction
    • Drone Software Development
  • Software Development Environment
    • Software Development Environment
      • Docker
      • Manual
        • OpenCV
        • PX4
        • JMAVSim
        • MAVLink
        • Ardupilot
        • SITL Simulator
        • DroneKit
        • DroneCore
        • QGroundControl
        • APM Planner
        • GStreamer
  • Drone Solution Architect
    • Drone Solution Architect
    • Unmanned Aerial Vehicle
    • History
    • Flight Controller Hardware
    • Flight Code
    • Communication
    • Ground Control Station
    • Simulation
    • Developer API
    • Drone Software Developer
    • Unmanned Aerial Systems
    • Market Ecosystem
  • Dronecode Project
    • Dronecode Project
  • Virtual Drone Solution
    • Virtual Drone Solution
    • Flight Controller Operating System
      • NuttX
    • Flight Code
      • PX4
        • Architecture
        • DriverFramework
        • Shell
      • Ardupilot
      • Software In The Loop
        • DroneKit SITL
          • API
        • jMAVSim
        • Ardupilot SITL
          • X-Plane
      • Hardware In The Loop
    • Communication
      • MAVLink
        • PyMAVLink
    • Ground Control Station
      • QGroundControl
      • APM Planner 2
      • MAVProxy
    • Developer API
      • DroneKit
      • DroneCore
    • Features
      • Video Streaming
      • Joystick
      • Global Positioning System
    • Uses Cases
      • Xunán Kab
      • Maax
      • Tasks
      • Services
        • Telemetry
        • Image
      • Applications
  • Computer Vision
    • Computer Vision
    • OpenCV
      • Object Detection
      • Face Detection
  • Hybrid Drone Solution
    • Hybrid Drone Solution
    • Flight Controller Hardware
      • Pixhawk
    • Flight Code
      • Ardupilot
      • PX4
    • Companion Computer
      • Raspberry Pi
      • Intel Aero Platform
    • Ground Control Station
      • QGroundControl
    • Developer API
      • DroneKit
    • Computer Vision
  • Autonomous Drone Solution
    • Autonomous Drone Solution
    • FlyTbase
    • Paparazzi UAV
Powered by GitBook
On this page
  1. Virtual Drone Solution
  2. Flight Code
  3. Software In The Loop

Ardupilot SITL

PreviousjMAVSimNextX-Plane

Last updated 7 years ago

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.

user@workstation:~$ cd src/ardupilot
user@workstation:~/src/ardupilot$
user@workstation:~/src/ardupilot$ export PATH=$PATH:$HOME/src/ardupilot/Tools/autotest
user@workstation:~/src/ardupilot$ export PATH=/usr/lib/ccache:$PATH
user@workstation:~/src/ardupilot$ sim_vehicle.py -v ArduCopter -l 20.654544,-103.3930971,30,0
SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at 20.654544,-103.3930971,30,0
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/user/src/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Setting top to                           : /home/user/src/ardupilot 
Setting out to                           : /home/user/src/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : sitl 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
Checking for program 'rsync'                   : /usr/bin/rsync 
'configure' finished successfully (0.525s)
SIM_VEHICLE: Building
SIM_VEHICLE: "/home/user/src/ardupilot/modules/waf/waf-light" "build" "--target" "bin/arducopter"
Waf: Entering directory `/home/user/src/ardupilot/build/sitl'
Waf: Leaving directory `/home/user/src/ardupilot/build/sitl'

BUILD SUMMARY
Build directory: /home/user/src/ardupilot/build/sitl
Target          Text     Data  BSS    Total  
---------------------------------------------
bin/arducopter  1622044  1962  41568  1665574

Build commands will be stored in build/sitl/compile_commands.json
'build' finished successfully (1.894s)
SIM_VEHICLE: Using defaults from (/home/user/src/ardupilot/Tools/autotest/default_params/copter.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/user/src/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/user/src/ardupilot/build/sitl/bin/arducopter" "-S" "-I0" "--home" "20.654544,-103.3930971,30,0" "--model" "+" "--speedup" "1" "--defaults" "/home/user/src/ardupilot/Tools/autotest/default_params/copter.parm"
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--out" "127.0.0.1:14550" "--out" "127.0.0.1:14551"
RiTW: Starting ArduCopter : /home/user/src/ardupilot/build/sitl/bin/arducopter -S -I0 --home 20.654544,-103.3930971,30,0 --model + --speedup 1 --defaults /home/user/src/ardupilot/Tools/autotest/default_params/copter.parm
Connect tcp:127.0.0.1:5760 source_system=255
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
MAV> 

Init APM:Copter V3.6-dev (e8debde4)

Free RAM: 131072
FW Ver: 120
----------------------------------------


load_all took 0us
0 0 0 validate_structures:304: Validating structures
DataFlash_File: buffer size=16384
online system 1
STABILIZE> Mode STABILIZE
APM: Calibrating barometer
APM: APM:Copter V3.6-dev (e8debde4)
APM: Frame: QUAD
Received 882 parameters
Saved 882 parameters to mav.parm
APM: Barometer calibration complete
Init Gyro***

Ready to FLY APM: GPS 1: detected as u-blox at 115200 baud
fence breach
APM: EKF2 IMU0 initial yaw alignment complete
APM: EKF2 IMU1 initial yaw alignment complete
APM: EKF2 IMU0 tilt alignment complete
APM: EKF2 IMU1 tilt alignment complete

STABILIZE>
Homepage