一、安装系统依赖
$ sudo apt update
$ sudo apt install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin
$ sudo apt install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
$ pip3 install -U setuptools
如果需要的话,可以安装显卡驱动和CUDA:
首先需要查看自己的电脑显卡需要安装的 CUDA 版本
For installation instructions for CUDA 10.0, see https://docs.nvidia.com/cuda/archive/10.0/cuda-installation-guide-linux/index.html.
For installation instructions for CUDA 9.0, see https://docs.nvidia.com/cuda/archive/9.0/cuda-installation-guide-linux/index.html.
For installation instructions for CUDA 8.0GA, see https://docs.nvidia.com/cuda/archive/8.0/cuda-installation-guide-linux/index.html.
NOTE: To enable CUDA support on Melodic, Eigen is required to be updated.
WARNING: This might break your system, or the compilation of other programs
$ cd && wget http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz #Download Eigen
$ mkdir eigen && tar --strip-components=1 -xzvf 3.3.7.tar.gz -C eigen #Decompress
$ cd eigen && mkdir build && cd build && cmake .. && make && make install #Build and install
$ cd && rm -rf 3.3.7.tar.gz && rm -rf eigen #Remove downloaded and temporary files
二、安装 Autoware
自己是 Ubuntu18.04 ,安装 Autoware 1.12 版本
1.创建工作空间
$ mkdir -p autoware.ai/src
$ cd autoware.ai
2.下载Autoware 配置文件
$ wget -O autoware.ai.repos "https://gitlab.com/autowarefoundation/autoware.ai/autoware/raw/1.12.0/autoware.ai.repos?inline=false"
3.下载 Autoware.AI 到工作空间
$ vcs import src < autoware.ai.repos
4.使用 rosdep
安装依赖
$ rosdep update
$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
5.编译工作空间
使用 CUDA 的编译方法
$ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
不使用 CUDA 的编译方法
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
三、测试 Autoware
1.下载 demo 数据
下载 3D pointcloud/vector 地图数据
$ wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_data.tar.gz
下载 LiDAR: VELODYNE HDL-32E, GNSS: JAVAD GPS RTK Delta 3 数据
$ wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_150324.tar.gz
或者
$ wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_150324.bag2.tar.gz
2.demo 运行
在 home 目录下必须创建 .autoware
文件夹
这里使用源码编译:
$ cd ~
$ mkdir .autoware
$ cd .autoware
$ cp ~/Downloads/sample_moriyama_* . # 将下载的数据文件复制到 .autoware 文件夹下
$ tar zxfv sample_moriyama_150324.tar.gz
$ tar zxfv sample_moriyama_data.tar.gz
运行 autoware v1.12.0 或更新版本,需要运行
$ cd autoware.ai
$ source install/setup.bash
$ roslaunch runtime_manager runtime_manager.launch
注意,如果运行 autoware v1.11.0 或 1.11.1,则需要运行
$ cd autoware/ros
$ source install/setup.bash
$ ./run
注意,如果运行 autoware v1.10.0 或 更老版本,则需要运行
$ cd autoware/ros
$ source devel/setup.bash
$ ./run
我这里运行的是 autoware v1.12.0 版本运行效果如图所示:
3.配置
-
设置
Simulation
界面的.bag文件,play 之后直接 pause
-
点击右下方的RViz (也可以自己打开Rviz),设置配置文件(File–>Open Config)autoware.ai/src/autoware/documentation/autoware_quickstart_examples/launch/rosbag_demo/default.rviz
-
打开
Quick Start
界面,添加相关例子的路径:autoware.ai/src/autoware/documentation/autoware_quickstart_examples/launch/rosbag_demo/ 之下相应的 launch 文件
-
开始运行 Simulation:(这里以 车的定位功能作为演示。)
打开Quick Start
界面,点击Map
按钮,实现启动加载地图的程序;点击Localization
按钮实现启动定位程序。(注意此时 RViz 可能没有任何显示,依旧是一片黑色。)
然后需要在Simulation
界面的.bag文件,点击pause
按钮开始播放数据集,稍等一会就可以看到 RViz 中显示地图,以及定位的功能了。
刚开始的时候,不能找到正确位置,等数据集播放一段时间(进度条大约运行到16%左右,大约76/479)就能够找到机器人的正确位置了~~~
然后就可以静静等待数据集播放结束,感受一下 Autoware 的运行效果。
参考链接:
[1] 官方教程 Source Build : https://gitlab.com/autowarefoundation/autoware.ai/autoware/-/wikis/Source-Build
[2] ROSBAG Demo: https://gitlab.com/autowarefoundation/autoware.ai/autoware/-/wikis/ROSBAG-Demo
[3] 创客智造. autoware入门教程-目录 [EB/OL]. https://www.ncnynl.com/archives/201910/3401.html, ***/2021-08-25.
[4] RavenRaaven. Autoware 1.12.0 源码安装总结 [EB/OL]. https://blog.csdn.net/qq_41871826/article/details/105276880, 2020-04-03/2021-08-25.
[5] Masec. 【学习笔记】Autoware无人驾驶软件安装遇见的坑与解决 [EB/OL]. https://blog.csdn.net/yourgreatfather/article/details/86504547, 2019-01-06/2021-08-25.
[6] jianxuezixuan. Autoware Demo测试 [EB/OL]. https://blog.csdn.net/jianxuezixuan/article/details/85789598, 2019-01-04/2021-08-25.
[7] CCCrunner. 基于Ubuntu16.04TLS的激光雷达与相机用Autoware 1.12.0进行联合标定遇到的Bug与解决方案。(最后完美运行) [EB/OL]. https://blog.csdn.net/CCCrunner/article/details/108896363, 2020-10-01/2021-08-25.
[8] 等我一下就好啦. 自动驾驶入门之----开源自动驾驶框架Autoware介绍 [EB/OL]. https://zhuanlan.zhihu.com/p/88998061, 2019-10-29/2021-08-25.