Code Monkey home page Code Monkey logo

docker4sitl's Introduction

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.

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

docker4sitl's People

Contributors

mickaelbaron avatar

Stargazers

 avatar

Watchers

 avatar

docker4sitl's Issues

How can I contribute to make it work in Windows?

I was working on ArduPilot/ardupilot#12006 (comment) . Let me know further steps. I would wish to make it compatible with Windows and Ubuntu too.

Typically, I would like to run ardupilot in docker. The Webots drone would be linked to the ardupilot via ports. For accelerometer, gyro, GPS and yaw, pitch, throttle and roll values, the flight controller would be calculating the dynamics within docker. The interface to user could be MavProxy. The main intention is to be able to add multi-robot drones and/or rovers and have one docker instance calculate all of the rover/flight dynamics asynchronously.

Let me know if coding efforts are needed from my end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.