- PCL安装步骤
参照网址:http://pointclouds.org/downloads/linux.html
官方的安装教程:
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all
由此即可安装编译好的点云库(PCL-1.7),附带安装了VTK-6.2.0等依赖库。
上面那种安装方法会出现无法定位到libpcl-all package的问题,因此最最保守的是要采用源码安装方式。
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.8 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-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 qt-sdk openjdk-8-jdk openjdk-8-jre
接着从github上把PCL源码clone下来
git clone https://github.com/PointCloudLibrary/pcl.git
下载时速度非常慢
下载的版本为最新版 pcl 1.9
下载PCL1.8.1 源码: https://pan.baidu.com/s/1DYjfOZULH_XI3qKazaHPHQ
感谢博主:https://blog.csdn.net/qq_25738937/article/details/80939651
cd pcl-pcl-1.8.1
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \
-DCMAKE_INSTALL_PREFIX=/usr ..
make
常见问题
instant error log:
”
— The imported target “vtkRenderingPythonTkWidgets” references the file
“/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so”
but this file does not exist. Possible reasons include:
- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained
“/usr/lib/cmake/vtk-6.2/VTKTargets.cmake”
but not all the files it references.
”
check if this file is missing or not
ls -l /usr/lib/python2.7/dist-packages/vtk/libvtkRendering*
python-vtk6 (VTK6.2) is installed, and installed file list:
/usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so
sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu-6.2.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so
#this is the only file needs symbolic link to /usr/lib/x86_64-linux-gnu/
then, error is solved
通过以下命令可以快速安装pcl1.7.1,但是不推荐,据说因为在ubuntu16.04中,由于vtk版本原因造成一些bug,这里不想深究,所以,打算自己编译。至于ubuntu 14.04没用过(可以试试下面指令)。
复制代码
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update