ubuntu14.04 安装PCL

博客转自:https://blog.csdn.net/dwj6336736/article/details/76674018

系统安装

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all

手动安装

1. 下载源代码

git clone https://github.com/PointCloudLibrary/pcl.git pcl-trunk
ln -s pcl-trunk pcl

2.安装依赖项

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

3. 编译库

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

  

上一篇:打印机PCL漏洞原理分析


下一篇:50 ubuntu下pcl编译以及用 VSCode配置pcl / opencv开发环境