在Autoware1.14配置的环境基础上安装Autoware1.15,解决一些14和15经常出现的报错
环境配置参考Autoware1.14的安装教程:Ubuntu18.04安装autoware 1.14(GPU版) 完整教程(包含环境搭建)
下载地址(注意包含了完整的Autoware,并不是只有Openplanner
):https://github.com/hatem-darweesh/autoware.ai.openplanner
cd autoware
mkdir src
下载代码:
vcs import src < openplanner.1.15.repos
sudo apt-get install libnl-3-dev libnl-genl-3-dev
sudo apt-get install ros-melodic-tvm-vendor
sudo apt-get install ros-melodic-lanelet2-io ros-melodic-lanelet2-core ros-melodic-lanelet2-maps ros-melodic-lanelet2-projection ros-melodic-lanelet2-routing ros-melodic-lanelet2-validation
src/autoware/common/autoware_build_flags/cmake下的CUDA版本改为11.4(或者你电脑上的版本)
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
# 编译特定的包
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select lidar_kf_contour_track
undefined reference to cv::Mat::Mat()
的错就按照下面方式改相应包:find_package(OpenCV 3.4 REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries(target ${OpenCV_LIBS})
error: could not convert 'cv::Scalar_
CV_RGB
改为cvScalar
cvIplImage()
函数将类型转换一下:error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested
,将报错那句改为:CvMat* cvmat;
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);
}
error: no match for ‘operator=’ (operand types are ‘CvPoint’ and ‘cv::Point {aka cv::Point_}’
,将下面这句中的cv::Point
改为cvPoint
// textOrg = cv::Point(ctx.topLeft.x, ctx.botRight.y + baseline);
textOrg = cvPoint(ctx.topLeft.x, ctx.botRight.y + baseline);
或者改为:
// textOrg = cv::Point(ctx.topLeft.x, ctx.botRight.y + baseline);
textOrg.x = ctx.topLeft.x;
textOrg.y = ctx.botRight.y + baseline;
/usr/local/cuda-11.4/include/cudnn.h:61:10: fatal error: cudnn_ops_infer.h: No such file or directory CMake Error at op_tlr_generated_network_kernels.cu.o.Release.cmake:225 (message):
在Autoware1.14环境配置时,安装cuDNN把所有的头文件都复制过去:
# sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp include/cudnn*.h /usr/local/cuda/include/
/usr/bin/ld: cannot find -lcudart /usr/bin/ld: cannot find -lcublas /usr/bin/ld: cannot find -lcurand /usr/bin/ld: cannot find -lcudnn