- 下载源码和依赖库
首先下载源码VTK8.2:
Download | VTK
下载PCL1.9.1链接:Releases · PointCloudLibrary/pcl · GitHub
下载好了以后,先安装PCL依赖
sudo apt-get update
sudo apt-get install git build-essential linux-libc-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
sudo apt-get install mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install libflann1.9 libflann-dev # 有说ubuntu16对应1.8,ubuntu18对应1.9,我直接用了1.9
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mono-complete
sudo apt-get install libopenni-dev//可以不装
sudo apt-get install libopenni2-dev//可以不装
sudo apt-get install openjdk-8-jdk openjdk-8-jre
然后安装VTK的库:
sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev
#OpenGL
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev
#cmake && cmake-gui
sudo apt-get install cmake cmake-gui
2、先安装VTK再安装PCL
编译安装VTK:
cd VTK.8.2
mkdir build
cd build
cmake ..
make -j16
sudo make install
编译安装PCL
cd PCL.1.9
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_GPU=ON-DBUILD_apps=ON -DBUILD_examples=ON -DCMAKE_INSTALL_PREFIX=/usr ..
make -j16
make install
进度100%,表示安装完成。测试即可