pcl依赖vtk,vtk依赖qt
方法一、命令行安装,自动下载pcl所需依赖
sudo apt update
sudo apt install libpcl-dev
安装pcl1.8.1参考另一篇文章https://blog.csdn.net/weixin_44733606/article/details/133017114
方法二、源码安装
1、安装依赖
安装gcc、g++、gdb、cmake、flann
sudo apt-get install build-essential gcc g++ gdb cmake libflann-dev
安装qt5
sudo apt-get install qt5*
下面qt组件可不安装
sudo apt-get install libqt5x11extras5-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtcreator
安装vtk9
sudo apt-get install libvtk9-dev
其他
sudo apt-get install libusb-1.0 libusb-dev libudev-dev mpi-default-dev openmpi-bin openmpi-common libpcap-dev libqhull* libgtest-dev freeglut3-dev pkg-config libxmu-dev libxi-dev mono-complete libopenni-dev libopenni2-dev
2、下载pcl
https://github.com/PointCloudLibrary/pcl
cd pcl
mkdir build
cd build
cmake ..
make -j8
sudo make install
3、验证
cd pcl/test
pcl_viewer car6.pcd
4、错误解决
1)、参考https://blog.csdn.net/fffyyyhhh12/article/details/126889810
2)、The `PATH` argument is required参考https://blog.csdn.net/weixin_45533366/article/details/131525166
三、pcl的flann报错
根据报错文件修改,例如pcl/kdtree/flann.h报错,
//#include <flann/flann.hpp>修改如下
#include </usr/include/flann/flann.hpp>
四、出现unfinished jobs ,减小make -j8线程数,再生成。