Skip to content

Docker4SITL aims to run SITL (Software In The Loop) of ArduPilot with Docker

Notifications You must be signed in to change notification settings

landrs-toolkit/docker4sitl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker4SITL aims to run SITL (Software In The Loop) of ArduPilot with Docker. So with this solution, any operating systems which support Docker could be run SITL.

To connect the LANDRS TOAST, enter output add tcpin:0.0.0.0:5761 into the console to allow TOAST to connect via port 5761.

For MAC requires socat, install with brew install socat.

Run with,

$ ./startSITLSimulator_MACOSX.sh copter --console --map

Good tutorial https://javiermunhoz.com/blog/2018/06/08/open-source-uav-sitl-in-docker-mission-planner-and-mav-tools.html.

For information, the SITL (software in the loop) simulator allows you to run Plane, Copter or Rover without any hardware for ArduPilot project. 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.

Prerequites

  • Docker
  • XQuartz (server X) for Mac OS X => brew cask install xquartz
  • socat (Multipurpose relay - SOcket CAT) for Mac OS X => brew install socat

Build yourself the Docker image

  • Clone the project
$ git clone https://github.com/mickaelbaron/docker4sitl.git
  • Go to docker4sitl directory and execute the following commands:
$ cd docker4sitl
$ docker build -t docker4sitl src/.

Import the image

$ docker load < sitl.tar.gz

Run SITL

Execute the startSITMSimulator_XXX.sh script where XXX is your operating system (only MAC_OS X is actually supported. Your contributions are welcome).

The parameters are the following

  • plane, rover and copter

  • classical options for sim_vehicle.py. Note the --aircraft option is already used into the script with a fix value. The simulation logs will be stored into the host (see the next section).

As example, start SITL simulator for Rover with console and map

$ ./startSITLSimulator_MACOSX.sh rover --console --map

To load a mission

$ wp load ../Tools/autotest/ArduPlane-Missions/CMAC-toff-loop.txt

Run the command “arm throttle” followed by “mode auto”

$ arm throttle
$ mode auto

Directories during execution

When you start the script for the first time, two directories will be created on the Host

  • build_sitl: contains the compilation result for the targeted vehicle

  • logs: contains state and logs for each vehicle

Contributors

About

Docker4SITL aims to run SITL (Software In The Loop) of ArduPilot with Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 69.3%
  • Dockerfile 30.7%