【Autoware.auto】Autoware.auto源码安装编译和avp官方例子实现方法

源码安装Autoware.auto

  1. 安装ROS2 foxy版本,由于版本问题,建议使用foxy版本,否则可能出现编译不通过的问题;
  2. 安装相关工具包:
sudo apt install -y git cmake python3-pip
pip3 install -U colcon-common-extensions vcstool
source /opt/ros/$ROS_DISTRO/setup.bash
  1. 安装ROS2依赖:
$ sudo apt update
$ sudo apt install -y python3-rosdep
$ sudo rosdep init
$ rosdep update

如果rosdep init失败,可使用鱼香ROS的脚本进行rosdepc初始化。

  1. 下载Autoware.auto源码:
$ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
$ cd AutowareAuto
$ vcs import < autoware.auto.$ROS_DISTRO.repos
$ export ROS_VERSION=2
$ rosdep install -y -i --from-paths src

如果报错:bash: vcs: command not found,可使用下面命令安装vcstool:sudo apt install python3-vcstool
5. 修改ROS2依赖,确保autoware编译通过:

sudo apt purge -y ros-foxy-autoware-auto-msgs
sudo apt purge -y ros-foxy-acado-vendor
sudo apt install -y ros-foxy-acado-vendor
  1. 编译源码:
cd AutowareAuto/
colcon build

本地源码avp例子的实现方法

在源码中没有avp例子中地图的点云文件和高精地图,因此需要安装ade,将ade中的/opt/AutowareAuto/share/autoware_demos/data目录文件拷贝到本地。
也可以从git中下载:https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
建议使用git下载。

  1. 安装docker可参考:https://www.runoob.com/docker/ubuntu-docker-install.html
  2. 根据https://autowarefoundation.gitlab.io/autoware.auto/AutowareAuto/installation-ade.html安装ade
  3. ade安装好后,拷贝ade里的点云和高精地图:
docker cp -a ade:/opt/AutowareAuto/share/autoware_demos/data/ /home/你的计算机名/目标目录
  1. 将拷贝出来的文件替换/AutowareAuto/src/launch/autoware_demos/目录中的data文件夹
  2. colcon build 编译源码
  3. 运行LGSVL仿真器(2021.3版本),仿真配置如下:
    Map:AutonomouStuff
    Vehicle:AWFLexus2016RXHybrid
    sensors:使用AutowareAuto/src/launch/autoware_demos/config/svl/avp-sensors.json的配置
    bridge:ROS2
    Autopilot:Autoware.Auto (Apex.AI)
    Connection:localhost:9090
  4. 终端1:
lgsvl_bridge

如果没有,使用sudo apt install ros-foxy-lgsvl-bridge安装
8. 终端2:

source install/setup.bash
ros2 launch autoware_auto_launch autoware_auto_visualization.launch.py
  1. 终端3:
	source install/setup.bash
	stdbuf -o L ros2 launch autoware_demos avp_sim.launch.py
  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值