A UAV SITL simulation Docker Image for Drone-kit and Ardupilot flight stack. This Image supports dronekit sitl and ardupilot sitl.
docker pull evans000/uav-sitl
Start the docker container having GUI support for tools like the console and the map
xhost +
docker run -it --privileged \
--env=LOCAL_USER_ID="$(id -u)" \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e DISPLAY=:0 \
-p 14556:14556/udp \
-p 8080:8080 \
evans000/uav-sitl bash
docker exec -it <container-id> bash
Add the following in the docker run
command
-v ~path-to-your-dir/ardupilot:/ardupilot:rw \
Docker may not run if not called with sudo. In this case add sudo
before the execution of the docker command
Sitl can be exexuted with Auto parameters for MavProxy or with custom loaded
cd ardupilot/ArduCopter
../Tools/autotest/sim_vehicle.py --map --console
Enter your own home longitude and latitude and the path of your computer on the defaults
flag
cd ardupilot/build/sitl/bin
./arducopter -S -I0 --model "+" --home custom-long,custom-lat,0,180 --defaults /home/your-username/ardupilot/Tools/autotest/default_params/copter.parm
mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14551
mode GUIDED (change the flight mode)
GUIDED> arm throttle (arm the UAV)
GUIDED> takeoff 10 (to fly at 10m)
GUIDED> Guided (long, lat) height