Ubuntu16.04安装Autoware1.12

以下步骤基本是Autoware官方教程的翻译,更多细节请移步官方教程。

一、环境配置:

  1. 系统:Ubuntu16.04
  2. ROS:kinetic
  3. Autoware:1.12(CPU版本)

二、安装Autoware 1.12:

  1. 安装依赖:
sudo apt-get update
sudo apt-get install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin gksu
sudo apt-get install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
pip3 install -U setuptools

也有博主建议安装更多的依赖,以下可能会用到,仅供参考:

sudo apt-get install -y ros-kinetic-desktop-full
sudo apt-get install -y ros-kinetic-nmea-msgs ros-kinetic-nmea-navsat-driver ros-kinetic-sound-play ros-kinetic-jsk-visualization ros-kinetic-grid-map ros-kinetic-gps-common
sudo apt-get install -y ros-kinetic-controller-manager ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-gazebo-ros-control ros-kinetic-joystick-drivers
sudo apt-get install -y libnlopt-dev freeglut3-dev qtbase5-dev libqt5opengl5-dev libssh2-1-dev libarmadillo-dev libpcap-dev libgl1-mesa-dev libglew-dev
sudo apt-get install -y ros-kinetic-camera-info-manager-py ros-kinetic-camera-info-manager
  1. 建立workspace:
mkdir -p autoware.ai/src
cd autoware.ai
  1. 下载Autoware.AI的工作空间配置:
wget -O autoware.ai.repos "https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.12.0/autoware.ai.repos"
  1. 下载Autoware.AI到workspace:
vcs import src < autoware.ai.repos
  1. 使用rosdep安装依赖:
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
  1. 编译workspace(不依赖CUDA):
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

说明:虽然本机有GPU,但由于Autoware-1.12版本要求CUDA>=9.0 && CUDA<=10.0,而我安装的CUDA为10.2,在用CUDA编译过程中提示:GPU support on Melodic requires CUDA<=10.0,所以后来决定采用不依赖CUDA的方式进行编译。
!!!注意:本人在编译过程中遇到以下问题:

--- stderr: points_preprocessor                 
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** visualization features related to openni2 will be disabled

解决方法:

sudo apt-get install openni2-utils
sudo apt-get install libpcap-dev

最终显示如下信息即表示安装完成:
Ubuntu16.04安装Autoware1.12_第1张图片

三、运行Autoware官方DEMO:

  1. 下载数据:
# Download the sample 3D pointcloud/vector map data:
wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_data.tar.gz
#Download the sample data (LiDAR: VELODYNE HDL-32E, GNSS: JAVAD GPS RTK Delta 3) in ROSBAG format or ROSBAG2 format:
wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_150324.tar.gz
or
wget https://autoware-ai.s3.us-east-2.amazonaws.com/sample_moriyama_150324.bag2.tar.gz
  1. 创建.autoware目录并解压数据到.autoware:
cd ~
mkdir .autoware
cd .autoware
cp ~/Downloads/sample_moriyama_* .
tar zxfv sample_moriyama_150324.tar.gz
tar zxfv sample_moriyama_data.tar.gz
  1. 运行Autoware:
cd autoware.ai
source install/setup.bash
roslaunch runtime_manager runtime_manager.launch
  1. 点击Simulation,加载 .autoware 路径下的rosbag数据,将开始时间设为140,点击Play,开始后再点击Pause:
    Ubuntu16.04安装Autoware1.12_第2张图片
  2. 点击右下角的Rviz按钮启动rviz,加载Autoware提供的default.rviz。找到File -> Open Config,文件路径为:autoware.ai/src/autoware/documentation/autoware_quickstart_examples/launch/rosbag_demo/default.rviz
    Ubuntu16.04安装Autoware1.12_第3张图片
  3. 点击Quick Start按钮,通过一个个点击右侧的Ref按钮来加载对应的launch文件,然后按需点击左侧相对应的启动按钮,点击完毕后会变颜色。launch文件路径:autoware.ai/src/autoware/documentation/autoware_quickstart_examples/launch/rosbag_demo/
    Ubuntu16.04安装Autoware1.12_第4张图片
  4. 点击Simulation,释放Pause按钮即可在rviz里看到数据显示,如下图所示:
    Ubuntu16.04安装Autoware1.12_第5张图片
    大功告成啦!

你可能感兴趣的:(ubuntu,人工智能,linux,自动驾驶)