AutoWare.auto 与ROS2 亲测安装成功

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

AutoWare.auto 安装实践

1. 相关程序版本说明

ubuntu版本:20.04 ADE:4.4.0

Autoware.auto版本(基于ROS2):autoware.auto foxy, ros foxy

2. Docker安装

以下操作,请确定自己已经换源了,不然下载很慢的,参考Ubuntu20.04软件源更换 - 知乎

Ubuntu系统中,软件源文件地址为:/etc/apt/sources.list

1.备份原来的源,将以前的源备份一下,以防以后可以用的。

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.打开/etc/apt/sources.list文件,在前面添加如下条目,并保存。

$ sudo vim /etc/apt/sources.list(可将vim更换为自己熟悉的编辑器)

添加阿里源

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

3.更新

更新源

$ sudo apt-get update

如出现依赖问题,解决方式如下:

$ sudo apt-get -f install

更新软件:

$ sudo apt-get upgrade

官方安装教程:Install Docker Engine on Ubuntu | Docker Documentation

// 卸载旧版本docker

#Uninstall old versions
$ sudo apt-get remove docker docker-engine docker.io containerd runc

#Uninstall Docker Engine
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd

// 使用docker repository安装docker engine

#step1:在新主机上首次安装Docker Engine之前,需要设置Docker存储库。之后,您可以从存储库安装和更新Docker
#更新apt软件包索引并安装软件包,以允许apt通过HTTPS使用存储库
$ sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

#Step2:Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

#Step3:Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
$ echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  
#Step4:Install Docker Engine
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io //如果没有指定版本,默认安装最高版本

#Step5:Verify that Docker Engine is installed correctly by running the hello-world image.
$ sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

Manage Docker as a non-root user

# 创建docker用户组
$ sudo groupadd docker
#将当前用户加入docker用户组
$ sudo usermod -aG docker $USER
#Log out and log back in so that your group membership is re-evaluated.
$ newgrp docker 
#Verify that you can run docker commands without sudo.
$ docker run hello-world

$ sudo chmod 666 /var/run/docker.sock
#重启电脑或者重启docker服务
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
$ sudo docker login registry.gitlab.com # Use token from Gitlab

3. Autoware.auto容器安装

3.1 程序说明

基于Docker封装的开发容器,包含以下内容:

[图片上传失败...(image-e5a0c7-1653032151496)]

3.2 ADE安装

ADE 是模块化的 Docker-based 工具,它确保所有的开发者构建项目时有一个共同的、一致的开发环境

官网安装文档:Installation — ADE 4.4.0dev documentation

#install it in “/usr/local/bin” PATH
$ cd  /usr/local/bin 
$ sudo wget https://gitlab.com/ApexAI/ade-cli/-/jobs/1859684348/artifacts/raw/dist/ade+x86_64
$ sudo mv ade+x86_64 ade
$ sudo chmod +x ade
$ which ade
/path/to/ade
# 查看ade版本号
$ ade --version

# Update ade
$ sudo ./ade update-cli     #这个地方需要一段时间
Newer version available:
  4.4.0
  4.3.0
  4.2.0
Do you want to update to version 4.4.0 [y/N]: y


                    

你可能感兴趣的:(AutoWare.auto 与ROS2 亲测安装成功)