Ubuntu16.04安装PCL1.8

本文详细介绍了在Ubuntu16.04上手动编译安装PCL1.8.1的过程,包括解决依赖问题、VTK版本选择和库文件缺失的解决方法。特别提到了VTK-6.2.0的vtkproj4.so丢失问题的解决,以及在编译PCL时如何避免由于vtk版本导致的bug。此外,还分享了Qt5的安装配置和使用CMake-GUI设置RelWithDebInfo模式的重要性。
摘要由CSDN通过智能技术生成
  1. 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值