ROS2 Autoware.auto源码安装 autoware.universe ROS2 Humble版本安装

ROS2 Autoware.auto源码安装 autoware ROS2 Humble版本安装

1. 简介

本文章是ROS2 Humble版本的最新autoware源码安装方式、autoware.universe安装方式;

2. 前提准备

2.1. Ubuntu系统版本:Ubuntu 22.04

2.2. ROS版本:ROS 2 Humble

下面是ROS 2 Humble的官方安装说明

//ROS 2 Humble Debian安装说明
http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html

需要注意的是:

https://raw.githubusercontent.com
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

上面的网址无法访问,所以ros.key无法下载;造成代码报错,即GPG key无法添加;
解决方法:

sudo curl -sSL https://gitee.com/hirowen/ros.key/raw/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

或者直接在gitee网址下载ros.key,然后在下载文件的目录执行下面的命令:

sudo cp ros.key /usr/share/keyrings/ros-archive-keyring.gpg

2.3. 安装Git

sudo apt-get -y update
sudo apt-get -y install git

3. 开发环境搭建

3.1. 直接在github上clone文件

git clone https://github.com/autowarefoundation/autoware.git

3.2. 使用提供的Ansible脚本自动安装依赖项,脚本文件地址如下

https://github.com/autowarefoundation/autoware/blob/main/setup-dev-env.sh

安装命令如下:

3.2.1. 独立主机的安装方式,即安装CUDA、cuDNN、TensorRT

cd autoware
./setup-dev-env.sh

3.2.2. 虚拟机的安装方式,或想跳过安装CUDA、cuDNN、TensorRT

cd autoware
./setup-dev-env.sh --no-nvidia --no-cuda-drivers --runtime

3.3. Authorize ROS GPG key验证失败的问题解决方案

找到并修改下面的文件:
//文件位置
/autoware/ansible/roles/ros2/tasks/main.yaml   
//第14行进行调整
url: https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
//修改为如下地址
url: https://gitee.com/hirowen/ros.key/raw/master/ros.key

3.4. Run ‘sudo rosdep init’ 失败的问题解决方案

可以多尝试几次,或者第二天再试;
解决思路,未实际测试:

https://mp.weixin.qq.com/s?__biz=MzU1NjEwMTY0Mw==&mid=2247538690&idx=1&sn=cef61930268608b5011d19a79935060a&chksm=fbc82166ccbfa870d2b97403178abc64815a6414d6fd1000dde984ff282cd753c0bd19f1218e&scene=27

3.5. rosdep update 失败的解决方案

解决思路,未实际测试

# 参考链接
https://mirrors.tuna.tsinghua.edu.cn/help/rosdistro/
# 手动模拟 rosdep init
sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
# 为 rosdep update 换源
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
rosdep update

4. 创建工作空间

4.1. Autoware使用vcstool来创建工作空间

cd autoware
mkdir src
vcs import src < autoware.repos

4.2. 安装依赖的ROS包

source /opt/ros/humble/setup.bash
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

4.3. 建立工作空间

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

5. 更新工作空间

更新资源包的话,可以按照下面流程进行,检查更新、代码更新、重新编译;

5.1. 使用git和vcstool来检查和更新

cd autoware
git pull
vcs import src < autoware.repos
vcs pull src

5.2. 安装依赖的ROS包

source /opt/ros/humble/setup.bash
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

5.3. 建立工作空间

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

参考链接:
[1]: http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html
[2]: https://autowarefoundation.github.io/autoware-documentation/main/installation/
[3]: https://mirrors.tuna.tsinghua.edu.cn/help/rosdistro/

  • 2
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值