1 Star 0 Fork 0

深圳市多翼创新科技有限公司 / UASITL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

License: MIT Docker Docker CI

UBC UAS ArduPilot SITL Docker Images

UASITL is a collection of docker images that can be used to run one or more ArduPilot SITL (software-in-the-Loop) simulators.

Connections

[ACOM/MissionPlanner/SkyLink]---<tcp/mavlink>---[UASITL]

Dependencies

  • Docker

Installation

The images can be directly pulled from DockerHub:

Note Replace X.X.X with version number

ArduPlane (VTOL):

FOR x86: docker pull ubcuas/uasitl:plane-X.X.X
FOR arm: docker pull ubcuas/uasitl:plane-arm-X.X.X

ArduCopter (Quadcopter):

FOR x86: docker pull ubcuas/uasitl:copter-X.X.X
FOR arm: docker pull ubcuas/uasitl:copter-arm-X.X.X

The images can also be built locally:

Note To build for ArduPlane, add --build-arg VEHICLE_TYPE=1 to the build command. Also change the tag to plane or plane-arm depending on the architecture.

./configure.sh
FOR x86: docker build --tag ubcuas/uasitl:copter-X.X.X --build-arg VERSION=X.X.X x86/ --platform "linux/amd64"
FOR armv7: docker build --tag ubcuas/uasitl:copter-arm-X.X.X --build-arg VERSION=X.X.X arm/ --platform "linux/arm/v7"
FOR arm64: docker build --tag ubcuas/uasitl:copter-arm-X.X.X --build-arg VERSION=X.X.X arm/ --platform "linux/arm64"

Note If you get an error akin to ./configure.sh: line 2: $'\r': command not found then run sed -i 's/\r$//' configure.sh to fix the line endings.

To build the armv7 and arm64 images on x86, you need to run the following commands:

./configure.sh
ArduCopter: ./crossBuild.sh copter X.X.X
ArduPlane: ./crossBuild.sh plane X.X.X

The image can be built using a custom Ardupilot repository:

./configure.sh
FOR x86: ARDUPILOT_REPO=git@gitlab.com:ubcuas/accupilot.git docker build --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" --tag ubcuas/uasitl:accupilot x86/
FOR arm: ARDUPILOT_REPO=git@gitlab.com:ubcuas/accupilot.git docker build --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" --tag ubcuas/uasitl:accupilot arm/

Please note the bash variable $SSH_PRIVATE_KEY needs to be a valid ssh private key. If you are building on command line you can do this in one shot like so: --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)". ARDUPILOT_REPO is an ssh git url to an ardupilot repository. WARNING: Building locally bakes your private SSH key into the docker image, do NOT share this image with others.

Usage

To launch a single ArduCopter SITL on host TCP port 5760, with the ability for the rest of our services to connect:

docker run --rm -p 5760-5780:5760-5780 -it --network=gcom-x_uasnet --name=uasitl ubcuas/uasitl:copter-X.X.X

To launch a single ArduCopter SITL on host TCP port 5760, with the ability for the rest of our services to connect, and with a custom parameter file located in the current directory:

Note Docker volume mounts (-v option) needs absolute paths. ${PWD} is a Windows Powershell variable that expands to the current working directory. For Linux, use $(pwd) and for Command Prompt use %cd%.

docker run --rm -p 5760-5780:5760-5780 -it --network=gcom-x_uasnet --name=uasitl -v ${PWD}/custom-copter.param:/custom-copter.param --env PARAM_FILE=/custom-copter.param ubcuas/uasitl:copter-X.X.X --defaults=/ardupilot/Tools/autotest/default_params/copter.parm

To launch a single ArduCopter SITL on host TCP port 5760:

docker run --rm -p 5760-5780:5760-5780 -it --name=uasitl ubcuas/uasitl:copter-X.X.X

To start 3 ArduCopter SITLs on host TCP ports 5760, 5770 and 5780:

docker run --rm -p 5760-5780:5760-5780 --env NUMCOPTERS=3 -it --name=uasitl ubcuas/uasitl:copter-X.X.X

Troubleshooting


docker: Error response from daemon: network gcom-x_uasnet not found.

You need to create the network that the containers connect to. Starting up gcom-x will create the network. It can also manually be created using the command docker network create gcom-x_uasnet.


Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? or similar.

You need to run the docker commands as root. Use sudo: sudo docker <command>. Or add yourself to the docker group.


filename: line 2: $'\r': command not found

Run sed -i 's/\r$//' filename to fix the line endings.

MIT License Copyright (c) 2020 UBC UAS Members Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Shell 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/D-Y-Innovations/UASITL.git
git@gitee.com:D-Y-Innovations/UASITL.git
D-Y-Innovations
UASITL
UASITL
master

搜索帮助