Ubuntu18 安装Autoware 教程

Ubuntu18 安装Autoware教程


如题,本文安装时参考这里,在此之前本人已经安装好了,ROS_melodic,PyQt5,CUDA等文件因此,在借鉴此文章时只看了后面Autoware的部分。


1.安装依赖,配置环境

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

说实话这一步我只运行了第一条,但是我之前在安装另一台的时候都安装了;

2.创建工作空间

mkdir -p autoware.ai/src
cd autoware.ai

说实话到这到都没啥问题;

3.下载autoware.ai的工作空间的配置

wget -O autoware.ai.repos "https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.12.0/autoware.ai.repos"

到这里就完了 ,要么就是连接超时 要么就是无法建立SSL连接,下面是我的提示:

--2021-05-31 10:29:58--  https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.12.0/autoware.ai.repos
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... 
失败:连接超时。
重试中。
--2021-05-31 10:32:09--  (尝试次数: 2)  https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.12.0/autoware.ai.repos
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... 已连接。
无法建立 SSL 连接。

不管怎么说就是连不上,于是我就直接翻出去看了看文件的内容,发现是一堆连接,因此解决方法也很简单,直接将下面内容粘贴进 autoware.ai/autoware.ai.repos 文件中即可(时间:2021/05/25):

repositories:
  autoware/common:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/common.git
    version: 1.12.0
  autoware/core_perception:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/core_perception.git
    version: 1.12.0
  autoware/core_planning:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/core_planning.git
    version: 1.12.0
  autoware/documentation:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/documentation.git
    version: 1.12.0
  autoware/messages:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/messages.git
    version: 1.12.0
  autoware/simulation:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/simulation.git
    version: 1.12.0
  autoware/utilities:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/utilities.git
    version: 1.12.0
  autoware/visualization:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/visualization.git
    version: 1.12.0
  drivers/awf_drivers:
    type: git
    url: https://gitlab.com/autowarefoundation/autoware.ai/drivers.git
    version: 1.12.0
  citysim:
    type: git
    url: https://github.com/CPFL/osrf_citysim.git
    version: 27bd05bc6c762b3ad8c9bb85f678d4b7ce7a27c5
  car_demo:
    type: git
    url: https://github.com/CPFL/car_demo.git
    version: e364448fad421cb6244c9f828f978d8d877dcbf9
  drivers/ds4:
    type: git
    url: https://github.com/tier4/ds4.git
    version: 5aa2f7f53a67992fffa7c801ed9c663a380b5d4a

粘贴完之后直接运行下一步即可;

4.下载autoware.ai到工作区

vcs import src < autoware.ai.repos

如果上一步出现问题,那么这一步不出意外也得GG,如下一串红

EEEEEEEEE      EEE
=== src/autoware/common (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/common.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/core_perception (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/core_perception.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/core_planning (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/core_planning.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/documentation (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/documentation.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/messages (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/messages.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/simulation (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/simulation.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/utilities (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/utilities.git/': gnutls_handshake() failed: Error in the pull function.
=== src/autoware/visualization (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/visualization.git/': gnutls_handshake() failed: Error in the pull function.
=== src/car_demo (git) ===
Could not determine ref type of version: fatal: unable to access 'https://github.com/CPFL/car_demo.git/': Failed to connect to github.com port 443: 连接超时
=== src/citysim (git) ===
Could not determine ref type of version: fatal: unable to access 'https://github.com/CPFL/osrf_citysim.git/': Failed to connect to github.com port 443: 连接超时
=== src/drivers/awf_drivers (git) ===
Could not determine ref type of version: fatal: unable to access 'https://gitlab.com/autowarefoundation/autoware.ai/drivers.git/': gnutls_handshake() failed: Error in the pull function.
=== src/drivers/ds4 (git) ===
Could not determine ref type of version: fatal: unable to access 'https://github.com/tier4/ds4.git/': Failed to connect to github.com port 443: 连接超时

原因一样是被墙了,因此我直接老办法搞下来,从autoware.ai.repos 中我们也可以看出是一堆 .git 那就直接下载下来手动存,文件在(为啥不网盘,因为公司有封锁上不去  ̄▽ ̄   ):Ubuntu18安装Autoware教程_ubuntu18.04安装autoware,ubuntu18.04安装autoware-Linux文档类资源-CSDN下载

5.使用rosdep安装依赖项

rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

rosdep 不能使用的,可以借鉴我的另一篇文章哦: ⊙▽⊙

6.编译工作区

  • 若已经配置好了 CUDA:(注意此处使用的必须是cuda10.0然而我是cuda10.2,所以我疯了。。。。)
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
  • 若没有 CUDA支持,只使用 CPU:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

如果到这里都没什么问题就算是安装完成了。

可惜往往没有如果(/TДT)/, 下面说一下我遇到的问题

 

eg:如果编译后想要编译单个功能包可以使用

AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select package_name

6.1 CUDA版本过高

这是我后来在GPU 上安装时遇到的问题,我电脑上安装的是CUDA10.2 (本以为可以兼容),但是Autoware 1.12要求CUDA<=10.0;最直观的错误提示如下一个包安装失败

Summary: 24 packages finished [2min 12s]
  1 package failed: ndt_gpu
  7 packages aborted: astar_search autoware_health_checker kitti_player lanelet2_extension libwaypoint_follower sick_ldmrs_driver vector_map_server
  32 packages had stderr output: amathutils_lib astar_search autoware_build_flags autoware_can_msgs autoware_config_msgs autoware_health_checker autoware_lanelet2_msgs autoware_msgs autoware_system_msgs custom_msgs ds4_driver ds4_msgs fastvirtualscan gazebo_camera_description gazebo_imu_description gnss kitti_box_publisher kitti_player lanelet2_extension libwaypoint_follower ndt_cpu ndt_gpu ndt_tku pcl_omp_registration ros_observer sick_ldmrs_description sick_ldmrs_driver sick_ldmrs_msgs tablet_socket_msgs vector_map vector_map_msgs vector_map_server
  122 packages not processed

网上翻发现了如下提示:

CMake Error at /home/user/autoware.ai/install/autoware_build_flags/share/autoware_build_flags/cmake/autoware_build_flags-extras.cmake:23 (message):
  GPU support on Melodic requires CUDA<=10.0
Call Stack (most recent call first):
  CMakeLists.txt:22 (AW_CHECK_CUDA)

解决办法:重装CUDA10.0

6.2 缺少支持包

直观的错误与上文直观错误一致,都是有个包安装失败,但是在网上反到CMake Error  的部分可以看到是编译过程中缺少支持库之类的(关键词 Could not find a....);

解决办法安装对应的ros包(注意在包中要使用-代替错误提示中的_  如下图nmea_msgs则应该运行sudo apt-get install ros-melodic-nmea-msgs):

sudo apt-get install ros-melodic-(你却的包的名字)

绝大多的都可以解决,在我测试CPU 安装时好像就一个包不符合这个结构(好像是GLEW) ,但是一百度也好解决;

完成:

调用的demo 看一下:

source ~/autoware.ai/install/setup.bash
roslaunch runtime_manager runtime_manager.launch 

如果闲每次运行都要source ,可以将这条指令加入到 .bashrc启动文件中;

  • 19
    点赞
  • 88
    收藏
    觉得还不错? 一键收藏
  • 25
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值