源码安装autoware1.12
试了一下新版本,发现完全按照官网安装会提示一些问题,所以留下记录。
先安装CUDA10.0
sudo apt install nvidia-cuda-toolkit
安装官网: https://gitlab.com/autowarefoundation/autoware.ai/autoware/-/wikis/Source-Build
- 依赖项
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
- 安装Eigen
$ 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
如果出现编译错误如下:
Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:41 (file):
file cannot create directory: /usr/local/include/eigen3. Maybe need
administrative privileges.
Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1
则进入root权限:sudo su
- 编译Autoware 1.12
(1)建立work空间
$ mkdir -p autoware.ai/src
$ cd autoware.ai
(2)下载Autoware 1.12
wget -O autoware.ai.repos "https://gitlab.com/autowarefoundation/autoware.ai/autoware/raw/1.12.0/autoware.ai.repos?inline=false"
vcs import src < autoware.ai.repos
(3)安装ROS依赖
$ROS_DISTRO 为ROS版本,替换一下。
$ rosdep update
$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
(4)编译
有CUDA 支持的
$ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
没有CUDA 支持的
$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
安装CUDA支持的,会出现CUDA版本不支持的提示:
GPU support on Melodic requires CUDA<=10.0