配置PCL1.8库

配置这个库,我几乎折腾了两天,真是菜啊。

这个点云库对于vtk,qt,boost等库的版本要求还是比较苛刻的,我一开始就想所有的都装最新的版本,后来发现,各种编译不过,库和库之间的不兼容,真的很麻烦,最后发现一个教程,直接按照它走就可以了,装好之后心里万马奔腾啊。

先贴一下内容:

My previous blog post described how to build PCL on Ubunut 14.04 LTS.  Now Ubuntu has advanced to 16.04 LTS and PCL to version 1.8, so this post is dedicated to making this upgrade simple.

Update: a prebuilt DEB file for PCL 1.8 for Ubunut 16.04 is available here.
To install it, do

     sudo dpkg -i PCL-1.8.0-Linux.deb

Now, if you like to try build it yourself, continue.

Setup Prerequisites

To prepare the software development on Ubuntu we need setup some prerequisite tools:

     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

Build Point Cloud Library

Point Cloud Library is obtained by:

     git clone https://github.com/PointCloudLibrary/pcl.git

Now you should find pcl in your directory.  Go into it and create a release directory and follow the cmake build process:

     cd pcl
     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

The make will take some time, so go get a cup of coffee or take that long overdue shower.  Once the build finishes, install it by:

     sudo make install

 

以上是我找到的教程,然后下面给上地址,如果地址没有效直接按照我上面的内容也一样。

https://larrylisky.com/2016/11/03/point-cloud-library-on-ubuntu-16-04-lts/

我最后总结一点就是,pcl的库对高版本的vtk,qt,boost的库兼容性很差

有一点需要提醒大家,就是安装opencv如果在安装vtk和qt之前,一定要重新在装一下,因为需要vtk的一些函数需要依赖opencv,但opencv在cmake的时候,如果没有发现有vtk和qt,相关的库不会编译的,所以在用库的时候会出现类似错误:

opencv××.so中对vtkXX函数未定义的引用

 

阅读更多

更多精彩内容