Autoware.auto github版本安装及测试

Autoware基于最新版进行安装,而不是基于原先的Universe版本,原先的Universe版本相比较于github版本缺少很多东西,所以这里安装时github版本的autoware.auto

官方文档写的虽然说不是非常详细,但是也能够指导你进行操作,只不过中途会有一些问题需要学会自己去寻找答案。
这里安装的基于docker版本的,推荐大家也安装基于docker版本的,不会破坏主机环境,而且对主机系统也没有要求(源码安装要求ubuntu22,自己电脑是ubuntu18)

1. 安装

官方文档链接:https://autowarefoundation.github.io/autoware-documentation/main/installation/
进入网址后,选择docker版本,点击图中箭头所指链接
在这里插入图片描述
进入链接后,建议选择Docker installation for development,后面自己编译,for quick start那个会自带很多预编译的东西,可能下载比较慢而且我们肯定都是自己编译的咯

在这里插入图片描述

1.1 安装依赖环境

在这里插入图片描述
建议自己手动安装,如果使用他那个脚本,会重新安装或者更新一些库,不太可控。

  • nvidia cuda,直接去官网下载run文件,手动安装
  • Docker Engine,就点击链接进去装:https://github.com/autowarefoundation/autoware/tree/main/ansible/roles/docker_engine#manual-installation
  • Install NVIDIA Container Toolkit,也是点击链接进入:https://github.com/autowarefoundation/autoware/tree/main/ansible/roles/nvidia_docker#manual-installation
  • Install rocker,还是点击链接进入:https://github.com/autowarefoundation/autoware/tree/main/ansible/roles/rocker#manual-installation

1.2 克隆代码和编译

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

mkdir ~/autoware_map

 # 这一行特别慢,会出错,见下文解决办法
docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda

# 想使用GPU使用这行
rocker --nvidia --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda

# 不使用GPU如在arm平台下使用这行
rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda

下面是在docker中进行操作

cd autoware
mkdir src

# 下面这行特别慢,很可能出错,解决方法见下文
vcs import src < autoware.repos

sudo apt update

# 这个也可能出错,使用小鱼rosdepc的方法,百度就有
rosdep update

rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

# 有stderr没关系,只要不是中途退出或者是没有aborted就行,估计得半小时,可能有报错,见下文
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

1.3 问题解决

  1. pull docker出错,也就是docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda很慢或者压根就下载不下来,常规的docker是可以通过更改国内的镜像源进行加速,但是这里的docker是放在github上面的,所以没办法加速,github有个老哥很牛,他有一个服务器,可以作为中转,我们通过他的镜像可以实现加速,如果想了解可以访问https://github.com/togettoyou/hub-mirror,我这里直接给我们需要的命令:

    echo -e '\ndocker pull togettoyou/ghcr.io.autowarefoundation.autoware-universe:latest-cuda\ndocker tag togettoyou/ghcr.io.autowarefoundation.autoware-universe:latest-cuda ghcr.io/autowarefoundation/autoware-universe:latest-cuda' | bash
    
  2. vcs import src < autoware.repos很慢,而且会出现很多EEEEE,一个E表示一个仓库拉取失败,更改hosts:https://blog.youkuaiyun.com/qq_17783559/article/details/131132108,这个方法可能有用,我是有用的,如果没有就改回原来的再多试几次。

  3. 编译过程中的问题:

    • 报错: fatal error: aruco/aruco.h : No such file or directory,参考:
      https://github.com/autowarefoundation/autoware.universe/issues/4912,一定要删除build文件夹,在重新构建

      rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
      rm -r build/ar_tag_based_localizer install/ar_tag_based_localizer
      colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
      
    • 报错:c++: fatal error: Killed signal terminated program cc1plus
      内存满了:https://autowarefoundation.github.io/autoware-documentation/main/support/troubleshooting/#insufficient-memory

    • 缺少包,可以直接apt get install来安装

      apt-cache search xxxxx
      apt-get install xxxxxx
      

编译最终结果:

Summary: 310 packages finished [30min 34s]
  4 packages had stderr output: elevation_map_loader lidar_centerpoint_tvm obstacle_velocity_limiter tensorrt_yolox

2. 运行

  • 运行仿真器:https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/
    • 先点击2D Pose Estimate初始化位置
    • 再点击2D Goal Pose规划路径

效果如下:

autoware_simu

<think>好的,我现在需要帮助用户解决如何安装Autoware AI的问题。首先,我得确认用户的需求。用户提到的是Autoware AI,这可能是指Autoware的不同版本,比如Autoware.AI和Autoware.Auto。通常,Autoware.AI是较旧的版本,基于ROS 1,而Autoware.Auto是基于ROS 2的。用户可能混淆了名称,所以需要先确认。 接下来,用户需要安装教程或方法。我需要回忆Autoware.AI的官方文档和安装步骤。通常,安装过程需要先安装依赖项,比如ROS Melodic、CUDA、Docker等。然后通过克隆仓库、构建代码来完成安装。但不同的系统环境可能会有不同的要求,比如Ubuntu版本是否为18.04,是否已经安装了ROS。 然后,我需要考虑用户可能的系统环境。Autoware.AI通常推荐在Ubuntu 18.04上运行,配合ROS Melodic。如果用户使用的是其他版本的Ubuntu,可能会遇到兼容性问题。此外,Docker安装方式可能更简单,适合不想配置复杂环境的用户。 同时,用户可能需要具体的步骤指导,比如如何安装依赖包,如何克隆仓库,如何构建。如果用户遇到常见错误,比如依赖缺失、构建失败,也需要提供解决方案或参考链接。 另外,引用来源方面,Autoware的官方GitHub仓库和文档是最可靠的,应该优先推荐。同时,社区资源如GitHub Discussions或ROS问答平台可能有帮助,需要指出。 最后,生成相关问题时要考虑用户可能的后续疑问,比如安装后的测试、依赖问题解决、不同安装方式的比较,以及如何迁移到其他版本Autoware.Auto。确保问题覆盖用户可能遇到的下一步问题。</think>以下为Autoware AI的安装方法及注意事项,分为两种主流方式: ### 一、原生安装方式(Ubuntu 18.04 + ROS Melodic) 1. **系统要求** - Ubuntu 18.04 LTS - ROS Melodic完整版 - CUDA 10.0(推荐NVIDIA显卡驱动版本≥410) 2. **安装步骤** ```bash # 安装依赖库 sudo apt-get install -y ros-melodic-desktop-full ros-melodic-nmea-msgs ros-melodic-libwaypoint-follower # 创建工作空间 mkdir -p autoware.ai/src cd autoware.ai/src git clone --recursive https://github.com/Autoware-AI/autoware.ai.git # 编译安装 cd .. rosdep install -y --from-paths src --ignore-src --rosdistro melodic ./src/autoware.ai/docker/build.sh melodic ``` ### 二、Docker容器安装 ```bash # 安装nvidia-docker distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list sudo apt-get update && sudo apt-get install -y nvidia-docker2 # 获取Autoware镜像 docker pull autoware/autoware:1.14.0-melodic ``` ### 三、验证安装 启动示例数据集: ```bash roslaunch runtime_manager runtime_manager.launch ``` 成功启动后可在Rviz中看到点云数据[^1]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值