PCL报错:Project ‘pcl_conversions‘ (pcl_ros) specifies ‘xxx‘ as an include dir, not found.

今天安装PCL-1.8和VTK-7.1.1后,运行测试代码已经出现画面了,说明pcl是好的,

PCL报错:Project ‘pcl_conversions‘ (pcl_ros) specifies ‘xxx‘ as an include dir, not found._第1张图片

但是编译LVI-SAM和LIO-SAM代码还是报错:

CMake Error at /opt/ros/melodic/share/pcl_conversions/cmake/pcl_conversionsConfig.cmake:113 (message): Project ‘pcl_conversions’ specifies ‘/usr/include/pcl-1.8’ as an include dir, which is not found. It does neither exist as an absolute directory nor in ‘${{prefix}}//usr/include/pcl-1.8’. Check the issue tracker ‘https://github.com/ros-perception/perception_pcl/issues’ and consider creating a ticket if the problem has not been reported yet.
或者是
CMake Error at /home/moro/work_ws/devel/share/pcl_ros/cmake/pcl_rosConfig.cmake:106 (message): Project ‘pcl_ros’ specifies ‘/usr/include/pcl-1.8’ as an include dir, which is no found. It does neither exist as an absolute directory nor in ‘/opt/ros/kinetic//usr/include/pcl-1.8’

解决过程

然后执行

locate pcl-1.8

返回
/usr/include/pcl-1.8
执行

cd /usr/include/pcl-1.8

却进不去那个文件夹.

然后再回看报错内容,该错误的意思是说在/usr/include/下并没有/pcl-1.8文件夹,同时/pcl-1.8文件里应该要有pcl_conversions和pcl_ros包,

所以

执行

locate pcl_conversions
locate pcl_ros

返回 可以看到这些包都在/opt/ros/melodic/share目录下
pcl_conversions/ pcl_msgs/ pcl_ros/

我们可以

cd /usr/include 

然后

mkdir pcl-1.8

然后

cd /opt/ros/melodic/share/pcl_conversions

把这三个包全部复制过去:

sudo cp pcl_* /usr/include/pcl-1.8/

再编译就通过啦,这个问题搞了我好久,记录下.

如果你的电脑上没有这几个包,去对应的网站下载再复制过去也可以.
https://github.com/ros-perception/perception_pcl/tree/kinetic-devel

参考:ubuntu使用过程中遇到的一些错误及解决办法

你可能感兴趣的:(PCL,自动驾驶,c++,计算机视觉)