红联Linux门户
Linux帮助

Ubuntu14.04下PCL安装

发布时间:2016-09-13 11:13:41来源:linux网站作者:zhuoyueljl
一,下载PCL
$ git clone https://github.com/PointCloudLibrary/pcl.git pcl-trunk  
$ ln -s pcl-trunk pcl   
 
二,安装库
$ sudo apt-get install cmake  
$ sudo apt-get install g++  
$ sudo apt-get install libboost1.55-all-dev  
$ sudo apt-get install libeigen3-dev  
$ sudo apt-get install libflann-dev  
$ sudo apt-get install python  
$ sudo apt-get install libusb-1.0-0-dev  
$ sudo apt-get install libudev-dev  
$ sudo apt-get install openjdk-6-jdk  
$ sudo apt-get install freeglut3-dev  
$ sudo apt-get install doxygen  
$ sudo apt-get install graphviz  
$ sudo apt-get install libpng12-dev  
$ sudo apt-get install libgtest-dev  
$ sudo apt-get install libxmu-dev  
$ sudo apt-get install libxi-dev  
$ sudo apt-get install libpcap-dev  
$ sudo apt-get install libqhull-dev  
$ sudo apt-get install libvtk5-qt4-dev  
$ sudo apt-get install python-vtk  
$ sudo apt-get install libvtk-java  
 
三,编译库
$ cd pcl-trunk  
$ mkdir build  
$ cd build  
$ cmake -DCMAKE_BUILD_TYPE=None -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..   
$ make  
$ sudo make install  
 
四,测试PCL
1、HOME目录下  pcl-trunk->doc->tutorials->content->sources下有PCL例程:这里我选择的是cloud_viewer文件夹下的cloud_viewer.cpp
2、创建demo包
$ cd catkin_ws/src/  
$ catkin_create_pkg demo std_msgs rospy roscpp  
3、将cloud_viewer.cpp文件拷贝到demo文件下,同时用cloud_viewer文件夹下的CmakeList.txt代替demo文件夹下的CmakeList.txt文件
4、编译运行cloud_view.cpp源文件
$ cd demo  
$ sudo cmake .  
$ sudo make  
$ ./cloud_viewer  
 
五,运行结果
Ubuntu14.04下PCL安装
至此,PCL点云库安装与测试完毕!
 
本文永久更新地址:http://www.linuxdiyf.com/linux/24123.html