Autoware.auto源码安装

自 2022 年以来,已将 Autoware 的开发迁移到 GitHub。目前Auto版本并没有进行最新维护

一、官网

Autoware.Auto (autowarefoundation.gitlab.io)

二、介绍

        Autoware是世界上第一个由Autoware基金会托管的用于自动驾驶汽车的“一体化”开源软件。基于 ROS 2 的 Autoware.Auto 项目是基于 ROS 1 的 Autoware.AI 项目的下一代继承者。        

        Autoware.Auto 与 Autoware.AI 相比的主要区别在于:

        - 现代软件工程最佳实践,包括代码审查、持续集成测试、详尽的文档、详尽的测试覆盖率、风格和开发指南
        - 改进的系统架构和模块接口设计(包括消息和 API)
        - 强调库、节点和系统级别的可重复性和确定性

三、功能说明

        Autoware.Auto 最初针对以下两个用例:

                - 自动代客泊车

                - 自动货物交付

        截至 2021 年 1 月,代客泊车功能已经实施,并在现场车辆演示中进行了展示。它允许在停车场低速机动。

四、安装简介

        官方提供了多种安装方式,包含以下几种:

                - 使用 ADE 安装

                - 使用 ADE 为 arm64 系统安装

                - 安装 Autoware 但不使用 ADE

        并且已经提示通过仿真运行完整软件堆栈的需提前安装是 LGSVL 仿真器:

五、 源码安装

        目前源码安装采用第三种方式:

 5.1  Ubuntu 20.04 系统安装

        请参考该文章中的 PC 安装方法,安装时注意查看下方 Tips:1.1、Ubuntu 18.04安装(PC+虚拟机)_ubuntu1804虚拟机安装教程-CSDN博客

 Tips:

        1 - Ubuntu 20.04 的安装与 Ubuntu 18.04 的安装大同小异,请自行斟酌

        2 - 安装过程中请插网线联网,一次性自动更新并安装好显卡驱动

              勾选

5.2  安装ROS Foxy

小鱼的一键安装系列 | 鱼香ROS (fishros.org.cn)icon-default.png?t=N7T8https://fishros.org.cn/forum/topic/20/%E5%B0%8F%E9%B1%BC%E7%9A%84%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E7%B3%BB%E5%88%97?lang=zh-CN        其中使用的脚本为:

wget http://fishros.com/install -O fishros && . fishros

5.3  Autoware.auto安装

5.3.1 更新软件包

sudo apt install -y git cmake python3-pip

5.3.2 安装python模块

sudo pip3 install -U colcon-common-extensions vcstool

5.3.3 ROS2 更新

$ sudo rosdep init
$ rosdep update

5.3.4  拉取代码库

git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git

5.3.5  拉取代码

$ vcs import < autoware.auto.foxy.repos

5.3.6  自动更新依赖

        如果是初次更新会出现如图情况,

解决方案:

        运行下方指令后再次更新

rosdep update --include-eol-distros

         依赖更新完成:

5.3.7  移除自带的 auto-msgs依赖

sudo apt purge -y ros-foxy-autoware-auto-msgs

5.3.8  编译

        这里注意,ROS2 目前采用 colcon build 后,其 src 中的 launch 与 yaml 也会一并编译入 install 中,那么后期调色修改源码后还需要再次编译,Colcon build 编译中有一个特性可以取消,使的 launch、yaml 依旧在源码中,详情查看colcon - collective construction — colcon documentationicon-default.png?t=N7T8https://colcon.readthedocs.io/en/released/        这里采用两个编译参数进行编译,但是注意,-DDOWNLOAD_ARTIFACTS=ON 之适用于某些特定的功能包用来下载特定的依赖,如感知模块依赖的 neural_networks package

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_ARTIFACTS=ON

         编译时间较长,耐心等待,因为 Auto 版本官方已停止维护,可能在编译中存在的某些错误。

Tips:

错误1:~/AutowareAuto/src/external/vesc/vesc_ackermann/src/vesc/

            vesc_ackermann/src/vesc_to_odom.cpp:63:71:error: no matching function

            for call to 'vesc_ackermann::VescToOdom::declare_parametor<double>

            (const char [19])' …………………………………………

解决方案:

将 vesc_to_odom.cpp中的第(63-72) 修改为

  speed_to_erpm_gain_ = declare_parameter<double>("speed_to_erpm_gain",speed_to_erpm_gain_);
  speed_to_erpm_offset_ = declare_parameter<double>("speed_to_erpm_offset",speed_to_erpm_gain_);

  if (use_servo_cmd_) {
    steering_to_servo_gain_ =
      declare_parameter<double>("steering_angle_to_servo_gain",steering_to_servo_gain_);
    steering_to_servo_offset_ =
      declare_parameter<double>("steering_angle_to_servo_offset",steering_to_servo_offset_);
    wheelbase_ = declare_parameter<double>("wheelbase",wheelbase_);
  }

将 ackermann_to_vesc.cpp中的第(51-56)修改为

  speed_to_erpm_gain_ = declare_parameter<double>("speed_to_erpm_gain",speed_to_erpm_gain_);
  speed_to_erpm_offset_ = declare_parameter<double>("speed_to_erpm_offset",speed_to_erpm_offset_);
  steering_to_servo_gain_ =
    declare_parameter<double>("steering_angle_to_servo_gain",steering_to_servo_gain_);
  steering_to_servo_offset_ =
    declare_parameter<double>("steering_angle_to_servo_offset",steering_to_servo_offset_);

         最后运行一次下方指令保证编译无错误:

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

 5.4 SVL simulator安装

5.4.1  svl-simulator介绍

https://www.svlsimulator.com/icon-default.png?t=N7T8https://www.svlsimulator.com/        由LG电子美国研发中心推出的一款基于Unity的用于自动驾驶开发的多机器人仿真器。
        SVL提供了一个开箱即用仿真解决方案,可以满足开发人员专注于测试自动驾驶汽车算法的需求。容易上手,直接提供了与Apollo、Autoware 等开源自动驾驶系统集成仿真的解决方案。

LGSVL仿真器介绍 LGSVL Simulator Introduction

5.4.2 svl-simulator 安装

        在下面网站中根据自己对应的系统版本下载即可Releases · lgsvl/simulator (github.com)icon-default.png?t=N7T8https://github.com/lgsvl/simulator/releases/

5.4.3 启动svl-simulator

        新开终端并索引到已下载的并解压的文件中,使用下面命令即可启动

./simulator

 六、Autoware.auto架构图

七、Autoware.auto Demo演示

        Autoware.auto 提供了多种场景下的演示 Demo,可在下方中找到,由于我只是为了走一遍流程,就不跑了,主要的放在 Autoware.unserve 的适配上。

Usage (autowarefoundation.gitlab.io)icon-default.png?t=N7T8https://autowarefoundation.gitlab.io/autoware.auto/AutowareAuto/usage.html#autotoc_md85


不积跬步无以至千里,不积小流无以成江河---------------------------15:20

  • 19
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值