Ubuntu 16.04 安装PCL库以及测试
参考链接:https://blog.csdn.net/dantengc/article/details/78446600
参考博客,官网一直安装不成功,后来参照一篇博客终于安装成功了,记录如下。
1.需要预安装依赖库。官网上提供了使用PPA安装,比较简单,但是之后安装时有错误。(ubuntu16.04 使用ppa预安装时,最后一句apt-get install libpcl-all 应该更改为apt-get install libpcl-dev(好像前者针对ubuntu14.04,后者才 针对ubuntu 16.04),虽然可以运行成功,仍然不推荐,因为我采用这种方法后面还是有错误了!)
采用一下方式依次安装依赖库:
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
2.下载源码并编译
git clone https://github.com/PointCloudLibrary/pcl.git
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 -j4 (线程数根据情况选择)
sudo make install
测试
按照以上步骤直接生成.cpp文件运行会发现找不到头文件,原因是需要使用Cmake 编译(包括连接到PCL库等)
具体操作直接参照官网(http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php#using-pcl-pcl-config)
步骤包括:
(1).在project 文件夹下生成 pcd_write.cpp(见官网上提供的链接)
(2).生成 CMakeLists.txt,直接复制一下内容(不需要任何修改):cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(MY_GRAND_PROJECT)
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(pcd_write_test pcd_write.cpp)
target_link_libraries(pcd_write_test ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})
(3).编译运行
cd /PATH/TO/MY/GRAND/PROJECT (project 所在的文件夹)
mkdir build
cd build
cmake ..
make
./pcd_write_test
Ubuntu 16.04 安装PCL库以及测试的更多相关文章
- Ubuntu 16.04安装cuda7.5 GCC
http://www.linuxidc.com/Linux/2017-01/139320.htm 在介绍Ubuntu 16.04安装 CUDA7.5开始前,先辨析几个概念GPU.NVIDIA.NVID ...
- ubuntu 16.04 安装opencv 2.4.13
ubuntu 16.04 安装opencv 2.4.13 https://blog.csdn.net/u011557212/article/details/54706966?utm_source=it ...
- Ubuntu 16.04安装Memcached(单机)
Ubuntu 16.04安装Memcached,不过不仅限与Ubuntu,可以用CentOS等去安装,只不过测试时使用的是Ubuntu机器.Windows下不建议使用,本机调试可以使用,线上环境除了W ...
- Ubuntu 16.04安装QQ国际版图文详细教程
因工作需要,我安装了Ubuntu 16.04,但是工作上的很多事情需要QQ联系,然而在Ubuntu上的WebQQ很是不好用,于是在网上搜索了好多个Linux版本的QQ,然而不是功能不全 ...
- Ubuntu 16.04 安装Mysql 5.7 踩坑小记
title:Ubuntu 16.04 安装Mysql 5.7 踩坑小记 date: 2018.02.03 安装mysql sudo apt-get install mysql-server mysql ...
- ROS_Kinetic_01 在ubuntu 16.04安装ROS Kinetic 2017.01更新
ROS_Kinetic系列学习(一),在ubuntu 16.04安装ROS Kinetic. Celebrating 9 Years of ROS! ubuntu16.04已经发布半年多了,ROS的K ...
- Ubuntu 16.04安装sogou 拼音输入法
一.更换为国内的软件源 安装搜狗输入法之前请先更换为国内的软件源,否则无法解决依赖问题.首先,用以下命令打开源列表: sudo gedit /etc/apt/sources.list #用文本编辑器打 ...
- [转]Ubuntu 16.04安装有道词典
原文:https://www.cnblogs.com/scplee/archive/2016/05/13/5489024.html 以前用Ubuntu 14.04 的时候,直接下载有道词典官方deb安 ...
- ubuntu 16.04 安装Tensorflow
ubuntu 16.04 安装Tensorflow(CPU) 安装python ubuntu 16.04自带python2.7,因此可以略过这一步 安装pip sudo apt-get install ...
随机推荐
- Django 命令
django #安装: pip3 install django 添加环境变量 #1 创建project django-admin startproject mysite ---mysite ---se ...
- ImportError: No module named managers
代码: import os import cPickle as pickle filename = '../dftest.pkl' if(os.path.exists(filename)): w=op ...
- 开源微信管家平台——JeeWx 捷微4.0 微服务版本发布,全新架构,全新UI,提供强大的图文编辑器
JeeWx捷微4.0 微服务版本发布^_^ 换代产品(全新架构,全新UI,提供强大的图文编辑器) JEEWX 从4.0版本开始,技术架构全新换代,采用微服务架构,插件式开发,每个业务模块都是独立的 ...
- Win7 Win8 Win10取不到机器码的处理办法
1.更改UAC也就是用户账户的控制权限 2.以管理员身份运行软件
- 基于maven来Spring MVC的环境搭建遇到“坑”
1.注解配置路径问题: 在web.xml中配置spring mvc 路径时, 应该配置如下:classpath:classpath:spring-* 2.jdk版本和Spring MVC版本不一致问题 ...
- form表单中$_FILES数组的使用
<form enctype="multipart/form-data" action="upload.php" method="post&quo ...
- Nginx入门基础(一)
Nginx介绍 Nginx 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP服务器. 官方测试Nginx能够支撑5万并发链接,并且cpu.内存等资源消耗却非常低,运行 ...
- SDL2.0 vs2017环境配置
到SDL的官网下载VC++的Development Libraries. 新建一个项目,进入属性窗口. VC++目录->包含目录加入include所在路径,库目录加入lib\x86所在路径. 链 ...
- 18. 4Sum (JAVA)
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums s ...
- 针对特定网站scrapy爬虫的性能优化
在使用scrapy爬虫做性能优化时,一定要根据不同网站的特点来进行优化,不要使用一种固定的模式去爬取一个网站,这个是真理,以下是对58同城的爬取优化策略: 一.先来分析一下影响scrapy性能的set ...