linux:ubuntu16.04LTS 安装PCL1.8

ubuntu16.04LTS 安装PCL1.8


PCL1.9 貌似没有visualization ,不知道为什么不能 include头文件,因此重新下载PCL1.8 ,编译,安装

一、下载源代码

https://github.com/PointCloudLibrary/pcl/releases

找到PCL1.8

 

二、安装必要的依赖

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
sudo apt-get install libopenni-dev
sudo apt-get install libopenni2-dev
sudo apt-get install libqhull-dev

三、camke 

     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

make
sudo make install

五、建立链接

首先用whereis  libpcl_common.so 来查找这个.so文件的路径,然后执行下面的命令(使用对应的路径)建立链接

sudo ln -s /usr/local/lib/libpcl_common.so /usr/lib/x86_64-linux-gnu/libpcl_common.so

sudo ln -s /usr/local/lib/libpcl_octree.so /usr/lib/x86_64-linux-gnu/libpcl_octree.so

sudo ln -s /usr/local/lib/libpcl_io.so /usr/lib/x86_64-linux-gnu/libpcl_io.so

 

六、其他

如果不是自己编译PCL,而是apt install,则你需要安装vtk

sudo apt-get install libproj-dev

然后 :

在cmakelist中加一条指令修复,即在add_executable语句前面加上list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

具体参见:https://blog.csdn.net/danmeng8068/article/details/77341532

你可能感兴趣的:(SLAM)