Autoware 安装(踩坑指南)

这篇具有很好参考价值的文章主要介绍了Autoware 安装(踩坑指南)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Autoware 安装(踩坑指南)

【Autoware】2小时安装Autoware1.13(保姆级教程)

Autoware入门学习(二)——Ubuntu18.04下的源码安装和配置

上面的两篇博客安装都异常顺利,甚至没有一点报错,实际安装中显然是不可能的

安装环境

  • Ubuntu 18.04
  • ROS Melodic
  • Qt 5.10.0
  • OpenCV 3.4.16

看一下官网的 Requirements

Autoware 安装(踩坑指南)

这里 CUDA 是选装的,CUDA 要求是10.0的,而我是11的,而且 Eigen 版本也不一样,所以编译时没有选择 CUDA,后面有实际需要再说

Autoware 安装(踩坑指南)

下载 autoware.ai.repos 时出错,怎么都下载不下来

wget -O autoware.ai.repos "https://raw.githubusercontent.com/autowarefoundation/autoware_ai/1.12.0/autoware.ai.repos"

直接去查看这个文件,复制到 autoware.ai.repos 即可

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

rosdep install 的时候提示缺少相关包

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

缺什么安装什么,例如 sudo apt-get install ros-melodic-nmea-msgs

redwall@redwall-G3-3500:~/autoware$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS-DISTRO
WARNING: given --rosdistro -DISTRO but ROS_DISTRO is "melodic". Ignoring environment.
WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 2
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
autoware_bag_tools: Cannot locate rosdep definition for [nmea_msgs]
kitti_box_publisher: Cannot locate rosdep definition for [jsk_recognition_msgs]
range_vision_fusion: Cannot locate rosdep definition for [jsk_topic_tools]
runtime_manager: Cannot locate rosdep definition for [nmea_navsat_driver]
as: Cannot locate rosdep definition for [pacmod_msgs]
autoware_camera_lidar_calibrator: Cannot locate rosdep definition for [image_view2]
lidar_euclidean_cluster_detect: Cannot locate rosdep definition for [jsk_rviz_plugins]

没用 CUDA 用下面的语句编译

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

这里遇到了很多问题,可以归类两个大问题

多版本 OpenCV 问题

安装 ROS 时会安装 3.2.0 版本的 OpenCV,后面自己又安装了 3.4.16 版本的 OpenCV

之前不晓得从哪里看来的博客,两个版本都安装到了 /usr/local/ 目录下,那么后安装的 3.4.16 版本的 OpenCV 就会覆盖之前的 3.2.0 版本的

那么就会导致版本的混乱,同时在 build 目录下 sudo make uninstall 时会把 3.2.0 版本的也一起卸载掉,这就导致很多 ROS 基础的功能包都找不到 OpenCV 头文件

ubuntu卸载opencv,简单快速,亲测有效

ubuntu18.04中多版本OpenCV切换的尝试

ubuntu自定义路径安装OpenCV

卸载重装 OpenCV 3.4.16,注意制定安装路径为 /usr/local/opencv-3.4.16

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-3.4.16 ..

make 编译前可以 nproc 查看处理器核心数量,充分利用核心数量进行多线程编译

安装完成后在bashrc文件末尾增加如下语句

export PKG_CONFIG_PATH=/usr/local/opencv-3.4.16/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/opencv-3.4.16/lib
export OpenCV_DIR=/usr/local/opencv-3.4.16

加入前两条语句后,pkg-config能发现opencv

加入第三条语句后,能在CMakeLists.txt中直接通过FIND_PACKAGE(OpenCV REQUIRED)命令找到opencv

对于 OpenCV 3.2.0,也是重新安装,用下述命令卸载

sudo apt-get remove 'libopencv*'

会随着卸载很多软件包,记录下来,再重新安装,OpenCV 3.2.0 用下述命令重新安装

2023-06-16.txt

sudo apt-get install 'libopencv*'

至此,编译时报错对 cv::Mat() 未定义的引用解决

OpenCV版本不兼容

代码中opencv2风格的代码与opencv3风格代码混用,报了很多错误

/home/fengbro/autoware.ai/src/autoware/core_perception/vision_lane_detect/nodes/vision_lane_detect/vision_lane_detect.cpp:514:58: error: could not convert ‘cv::Scalar_((double)0, (double)255, (double)255, (double)0)’ from ‘cv::Scalar {aka cv::Scalar_}’ to ‘CvScalar’
cvPoint(frame_size.width/2, frame_size.height), CV_RGB(255, 255, 0), 1);

vision_lane_detect.cpp文件,修改其中第514行代码:

CV_RGB(255, 255, 0) —> cvScalar(255, 255, 0)

/home/fengbro/autoware.ai/src/autoware/core_perception/vision_lane_detect/nodes/vision_lane_detect/vision_lane_detect.cpp:544:30: error: conversion from ‘cv::Mat’ to non-scalar type ‘IplImage {aka _IplImage}’ requested
IplImage frame = cv_image->image;

vision_lane_detect.cpp文件的第544行中:
IplImage frame = cv_image->image;-----> IplImage frame = cvIplImage(cv_image->image);

/home/fengbro/autoware.ai/src/autoware/core_perception/vision_darknet_detect/src/vision_darknet_detect.cpp:228:17: error: no match foroperator=(operand types are ‘IplImage {aka _IplImage}and ‘cv::Mat’)
ipl_image = final_mat;

修改vision_darknet_detect.cpp文件的第228行:

ipl_image = final_mat; 为 ipl_image = cvIplImage(final_mat);

/home/fengbro/autoware.ai/src/autoware/core_perception/vision_beyond_track/include/detection.h:234:21: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested
CvMat cvmat = sum_mat;

在detection.h文件的第234行下一行添加如下内容

for(size_t i=0; i< sum_mat.rows; ++i)
    for(size_t j=0; j< sum_mat.cols; ++j)
        ((double*)(cvmat.data.ptr + i*cvmat.step))[j] = sum_mat.at<double>(i,j);
/home/fengbro/autoware.ai/src/autoware/core_perception/trafficlight_recognizer/nodes/region_tlr/region_tlr.cpp:143:63: error: no match foroperator=(operand types are ‘CvPoint’ and ‘cv::Point {aka cv::Point_<int>})   
textOrg = cv::Point(ctx.topLeft.x, ctx.botRight.y + baseline);

修改region_tlr.cpp文件的第143行如下

textOrg = cvPoint(ctx.topLeft.x, ctx.botRight.y + baseline);

顺利安装后会提示如下信息文章来源地址https://www.toymoban.com/news/detail-492051.html

---
Finished <<< trafficlight_recognizer [18.1s]
Summary: 139 packages finished [52.9s]

到了这里,关于Autoware 安装(踩坑指南)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【Autoware】2小时安装Autoware1.13(保姆级教程)

    前言:ROS的出现使得机器人软件开发更加快速和模块化,在此基础上,Autoware.ai开源项目可以让我们很容易地将一套完整的自动驾驶软件部署到我们的测试车辆上,并见证它跑起来! Autoware是一款 “一体化”开源自动驾驶软件 ,能实现感知、决策、控制等功能,通过在Ubunt

    2024年02月02日
    浏览(24)
  • Intellij IDEA下载安装教程和搭建springboot开发环境及踩坑指南(超详细图文教程)

    https://www.jetbrains.com/idea/ 大家通过上方的链接进入到Intellij idea的官网后,可以在主界面点击Download或者点击上方导航栏里面的DeveloperTools,在里面找到并点击Intellij idea,下载安装即可。 3、 Intellij idea安装指南 通过上方的官网下载完成以后,会的到一个压缩包(里面是Intellij

    2024年03月24日
    浏览(49)
  • autoware.universe 安装

    autoware.universe 在安装的时候遭遇了诸多的困难,踩过了许多的坑;在这里分享出来供诸君共勉; 最初的想法是:autoware.universe+carla+罗技29 一套组合拳; 但是经过验证发现,autoware.universe和Carla占用很多的计算机资源,两个很难带动的起来; 我的计算机配置情况: ---------os:2

    2024年02月09日
    浏览(39)
  • Autoware.universe部署01:Ubuntu20.04安装Autoware.universe并与Awsim联调

    本文介绍Autoware.universe在Ubuntu20.04中的详细安装步骤,并测试一些Autoware.universe的基本功能,最后测试使用官方模拟器进行联调,本系列其他文章: Autoware.universe部署02:高精Lanelet2地图的绘制 Autoware.universe部署03:与Carla(二进制版)联调 Autoware.universe部署04:universe传感器ROS

    2024年02月09日
    浏览(41)
  • Ubuntu 20.04 安装 Autoware.universe自动驾驶仿真工具

            在入门自动驾驶领域的时候,笔者主要使用的工具是QT+ROS+Gazebo,在该行业工作一段时间之后,发现各家都有自己的仿真平台,只能在公司平台使用,但是如果个人要做城区的仿真,前面所说的工具链(QT+ROS+Gazebo)显然是不够便捷的。目前主要调研了两个开源的平台

    2024年01月15日
    浏览(38)
  • 【安装教程】ubuntu20.04/22.04从零开始搭建autoware.universe

    目录 1. 基本配置情况 2. ROS2 Humble和git安装  2.1 ros2 humble安装(对应ubuntu22.04,仅源码安装需要) 2.2 git安装  3. 克隆autoware代码  4.自动安装依赖项(推荐) 5. 手动安装依赖项(在一键配置失效下使用,这里仅列出docker安装中需要的依赖)  5.1 cuda安装  5.2 docker engine安装 5.3 

    2024年01月18日
    浏览(57)
  • 在Ubuntu20.04下安装Autoware.universe和Carla并进行联合仿真

    1、安装 Carla 0.9.13 1、进入UE网页,按照顺序完成以下6步。 https://www.unrealengine.com/en-US/ue-on-github 2、进入EpicGame的Github https://github.com/EpicGames 点击UnrealEngine 2、直接clone出来是最新版,需要设置classic token,可以参考: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/

    2023年04月15日
    浏览(42)
  • flinkcdc踩坑指南

    Flink CDC 常用两种方式进行数据的全量+增量一体的数据同步,数据清洗等功能。主要使用方法: 使用 DataStream API 进行任务的逻辑实现 使用 Flink SQL 的方式进行任务的提交 解决方案: 采用此方式,如有缺少其他依赖报错,应将依赖包放到flink/lib下,且注意配置flink环境变量 解

    2024年03月19日
    浏览(65)
  • Nginx踩坑指南

    参考链接: http://nginx.org/en/linux_packages.html 3.1 问题1 答案: 这不是一个nginx配置文件,而是一个vhost配置文件,应该放在 /etc/nginx/conf.d (或者 /etc/nginx/sites-enabled ,如果您喜欢这种类型的vhost配置文件组织;请查看sites-available与sites-enabled与conf.d目录thread在ServerFault中的差异,以

    2024年02月08日
    浏览(31)
  • Iceberg实战踩坑指南

    目录 前言 第 1 章 介绍 第 2 章 构建 Iceberg 第 3 章 Spark 操作 3.1.配置参数和 jar 包 3.2 Spark sql 操作 ​编辑 3.2.1over write 操作  3.2.2动态覆盖 ​编辑  3.2.3静态覆盖 3.2.4删除数据 3.2.5历史快照  3.2.6隐藏分区(有 bug 时区不对) 第 4 章 DataFrame 操作 4.1.配置 Resources ​

    2024年02月10日
    浏览(46)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包