1.通过apt-get安装

sudoadd-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl

sudo apt-get update

sudoapt-get install libpcl-all

连不上,……

2.通过源码安装

2.1 安装依赖项

sudo apt-get installg++

sudo apt-get installcmake cmake-gui

sudo apt-get installdoxygen

sudo apt-get installmpi-default-dev openmpi-bin openmpi-common

sudo apt-get installlibflann1 libflann-dev

sudo apt-get installlibeigen3-dev

sudo apt-get installlibboost-all-dev

sudo apt-get installlibvtk5.8-qt4 libvtk5.8libvtk5-dev

sudo apt-get installlibqhull*

sudo apt-get installlibusb-dev

sudo apt-get installlibgtest-dev

sudo apt-get installgit-core freeglut3-dev pkg-config

sudo apt-get installbuild-essential libxmu-dev libxi-dev

sudo apt-get installlibusb-1.0-0-dev graphviz mono-complete

sudo apt-get installqt-sdk openjdk-7-jdk openjdk-7-jre

sudo apt-get installphonon-backend-gstreamer

sudo apt-get installphonon-backend-vlc

安装libflann1时出现问题,仓库里没有了,百度搜索,找到了deb包

sudo dpkg -i libflann1.7_1.7.1-4_amd64.deb

按上了,希望是好使的,不会有什么问题,

so ……继续安装其他依赖项,终于安完了依赖项,其中只有libflann1没找到,其他在仓库里都找到了

话说16.04公有库里提供了PCL,可能会好使一些。

2.2  下载PCL源码文件

$git clonehttps://github.com/PointCloudLibrary/pcl.git pcl-trunk ln -s pcl-trunk pcl(我是直接下载了压缩包,解压的,不然太慢了)

$mkdir release

$cd release

$cmake-DCMAKE_BUILD_TYPE=None -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..

$make -j4 (四线程编译,CPU没有四线程的就不要j4了)

$sudo make install

make的时候出现了这样一些东西

/home/zq/slam/ch5/pcl-trunk/common/include/pcl/sse.h:87:6:warning: the mangled name of ‘__m128 pcl::sse_cmpgt(__m128, __m128)’ willchange in a future version of GCC [-Wabi]

RETfsse_cmpgt( const __m128 x, const __m128 y ) { return _mm_cmpgt_ps(x,y); }

^

/home/zq/slam/ch5/pcl-trunk/common/include/pcl/sse.h:88:6:warning: the mangled name of ‘__m128i pcl::sse_cmpgt(__m128i, __m128i)’ willchange in a future version of GCC [-Wabi]

RETisse_cmpgt( const __m128i x, const __m128i y ) { return _mm_cmpgt_epi32(x,y); }

^

又出问题了,编译停止

#include <QtGui/QWidget>

^

compilation terminated.

make[2]: ***[apps/CMakeFiles/pcl_openni_passthrough.dir/include/pcl/apps/moc_openni_passthrough.cpp.o]Error 1

make[1]: ***[apps/CMakeFiles/pcl_openni_passthrough.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

Linking CXX executable../bin/pcl_openni_shift_to_depth_conversion

Linking CXX shared library../../lib/libpcl_gpu_kinfu_large_scale.so

[ 56%] Built targetpcl_openni_shift_to_depth_conversion

[ 56%] Built targetpcl_gpu_kinfu_large_scale

Linking CXX executable../bin/pcl_openni_voxel_grid

[ 56%] Built target pcl_openni_voxel_grid

make: *** [all] Error 2

看来PCL还依赖OPENI,那就先安装OPENI吧

网上教程:

二、openni2.0

1.安装 OpenNI2依赖项

1

2

$sudo apt-get install -y g++ python libusb-1.0-0-dev freeglut3-dev doxygen graphviz

$sudo apt-get install libudev-dev

2.从github将openni2源码clone下来

1

2

$git clone https://github.com/occipital/OpenNI2.git

$cd OpenNI2

Building OpenNI:

1) Go into the directory:"Platform/Linux-x86/CreateRedist".

Run the script:"./RedistMaker".

This will compile everythingand create a redist package in the "Platform/Linux-x86/Redist"directory.

It will also create adistribution in the "Platform/Linux-x86/CreateRedist/Final"directory.

2) Go into the directory:"Platform/Linux-x86/Redist".

Run the script: "sudo./install.sh" (needs to run as root)

The install script copieskey files to the following location:

Libs into: /usr/lib

Bins into: /usr/bin

Includes into:/usr/include/ni

Config files into:/var/lib/ni

github上有官方安装、依赖项及编译说明。

安装完成,继续make  PCL ,出错了

sthrough.cpp:9:

/usr/include/vtk-5.8/QVTKWidget.h:40:25: fatal error: QtGui/QWidget:No such file or directory

#include<QtGui/QWidget>

^

compilation terminated.

Linking CXX executable ../bin/pcl_openni_organized_edge_detection

make[2]: ***[apps/CMakeFiles/pcl_openni_passthrough.dir/include/pcl/apps/moc_openni_passthrough.cpp.o]Error 1

make[1]: *** [apps/CMakeFiles/pcl_openni_passthrough.dir/all] Error2

make[1]: *** Waiting for unfinished jobs....

[ 66%] Built target pcl_openni_octree_compression

[ 66%] Built target pcl_openni_organized_edge_detection

Linking CXX executable ../bin/pcl_openni_shift_to_depth_conversion

[ 66%] Built target pcl_openni_shift_to_depth_conversion

make: *** [all] Error 2

原因是qt4 QtGui.h头文件是这么定义的 Qt::WindowFlags window_flags;

但是 QVTKWidget.h   87行是这么使用的 Qt::WFlags f=0);

所以解决办法,如果不想换vtk5.8,可以修改一下WFlags。亲测有效。

cd /usr/include/vtk-5.8$ sudo vim QVTKWidget.h

如果编译器找不到头文件<QtGui/Qwidget>,可以尝试修改#include <QtGui/Qwidget>为#include <qt4/QtGui/Qwidget>

安装完成。

安装PCL OPENNI相关推荐

  1. [总结]联想笔记本E460/虚拟机VMware10.0+Ubuntu14.04+opencv+ROS+PCL+OpenNI+g2o+DSO+Pangolin+win7(Ubuntu双系统)安装过程整理

    虚拟机VMware10.0+Ubuntu14.04 参考这个人的博客: http://blog.csdn.net/u013142781/article/details/50529030 目前已经没有1 ...

  2. 编译安装PCL点云库,Kinect2驱动,乐视Astra相机驱动

    编译安装PCL点云库 安装方法一 3d点云安装 apt-cache cearch pcl 安装 sudo apt install 上面查出来的 opencv不建议用以上方法因为需要 安装 opencv ...

  3. ubuntu18.04安装PCL

    目录 一.安装依赖 二.下载 三.编译 四.安装PCL 五.安装可视化库依赖 六.安装依赖 七.验证 八.卸载(这一步暂未验证) 附:问题记录 一.安装依赖 sudo apt-get update s ...

  4. Ubuntu源码编译安装PCL

    ubuntu上可以通过命令apt install libpcl-dev安装PCL,但是一般版本都比较老,所以我喜欢下载最新的代码然后编译安装 步骤如下: 安装依赖以及第三方库:Boost,Eigen, ...

  5. Ubuntu16.04安装PCL库的python实现python-pcl,并且通过pcl加载pcd文件验证python-pcl是否安装成功

    1. 安装PCL库 使用如下指令安装PCL库. sudo apt install libpcl-dev 如果提示"Unable to locate package libpcl-dev&qu ...

  6. 查看pcl版本 linux,Ubuntu16上安装PCL

    在linux系统上安装环境VTK+PCL+QT5,踩过无数坑... 一.版本对应 编译PCL之前要安装VTK,博主试过pcl1.8+vtk8.2,编译失败,所以注意对应关系.根据经验,归纳如下: 1. ...

  7. PCL学习笔记01:在Ubuntu上安装PCL

    文章目录 一.PCL官网 二.在Ubuntu上安装PCL 三.PCL官网教程 四.溜达一圈PCL 五.PCL基本结构 (一)有组织的点云 (二)无组织的点云 六.测试PCL是否安装成功 (一)编写程序 ...

  8. ubuntu下安装PCL并测试(含视频安装过程记录)

    ☛☛ 视频安装过程记录 ☚☚ 原文章的标题为Ubuntu16.04下安装PCL1.7并测试(含视频安装过程记录),但我觉得随着时间的推移,版本会发生改变 1.更新源 sudo apt-get upda ...

  9. ubuntu18.04安装pcl库

    参考Ubuntu18.04安装PCL 1.9.1(图文详解,附踩坑和测试)_ubuntu安装pcl_振华OPPO的博客-CSDN博客 遇到的问题 1 安装依赖时软件未满足依赖关系 sudo apt-g ...

最新文章

  1. Windows 下连接mysql工具NavicatForMysql
  2. 【Linux】【服务器】 CentOS7下安装Redis详细过程步骤
  3. mysql校对规则设计编码命令
  4. python json解析方法_Python 中的 JSON 方式讲解
  5. 在控制台中输出 出现SIGBAT或者EXC_BAD_ACCESS的原因的方法
  6. 推荐一个最近开源的Matting工具箱
  7. mysql 分组字符串链接_MySQL字符串连接函数 ,分组连接函数
  8. 删除下拉框只找23火星软件_下拉推广选择23火星软件
  9. c++成员声明中的非法限定名_new 一个对象有哪两个过程?很多人在面试中都问住了...
  10. 增加定时检测linux占用内存,及时清理功能
  11. 浅谈TCP/IP协议中TCP与UDP的区别
  12. 搜寻Linux软件实用指南
  13. 5G模块M.2座子管脚和封装分析
  14. html界面设计用什么软件,html网页开发常用软件有哪些
  15. mysql替代符号,mysql特殊符号
  16. [LeetCode]Burst Balloons 爆气球
  17. 记 安装单机版 腾讯 蓝鲸智云
  18. 2022第二届中国ESG与可持续发展国际峰会将于11月17日-18日在上海举行
  19. 华为mstp配置实例
  20. 《Spring Boot 实战派》--13.集成NoSQL数据库,实现Elasticsearch和Solr搜索引擎

热门文章

  1. 可以进行投票的app关注投票软件网络投票的软件投票软件
  2. [error] Error: Fail to open IDE 问题解决
  3. 大学考试分数越高学分越多吗_千万别到了大四才知道,绩点和学分的用处,那可就真的为时已晚!...
  4. Android_传感器光学
  5. 生活经验:如何防止洗手间下水管堵塞
  6. 15.浏览器输入一个网址(www.baidu.com)后执行的全过程
  7. 2006-02-12星期日-有云 [99-06年家中手机变化]
  8. 阿里巴巴内网宣布将取消“361”制度!员工质疑:换汤不换药
  9. Google Earth Engine ——
  10. 直播or短视频,你更倾向于哪个?