PCL-1.10安装(Ubuntu16.04)

这篇博客介绍了在Ubuntu16.04上安装PCL-1.10的详细步骤,包括依赖安装、源码下载、编译和测试。在安装过程中遇到了VTK库的问题,作者通过分析CMakeLists文件发现需要更高版本的VTK,最终解决了问题并成功安装。

PCL官方教程:http://pointclouds.org/documentation/tutorials/

PCL官方github库: https://github.com/PointCloudLibrary/pcl.git

github库太慢了,使用国内镜像码云库

Gitee.com 码云库: https://gitee.com/mirrors/pcl

背景
Ubuntu16.04 + pcl-1.10

安装

1、 安装依赖

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
# 注意这里libvtk的版本需要与pcl匹配,如安装的pcl是1.9以上,需要使用 vtk6.2
# pcl>1.9 则使用 sudo apt-get install libvtk6.2 libvtk6.2-qt libvtk6-dev
# 否则,会在运行测试demo时,会报错,下文会给出解决办法
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 libopenni2-dev

vtk介绍:(visualization toolkit)是一个开源的免费软件系统,主要用于三维计算机图形学、图像处理和可视化。

2、 下载源码

# https://github.com/PointCloudLibrary/pcl.git
git clone https://gitee.com/mirrors/pcl
git checkout pcl-1.10.0

gitee 国内镜像 每天同步一次github数据

3、编译源码

cd pcl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \
           -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \
           -DCMA
from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iostream:39, from /home/wzz/shenlan/slambook/ch5/joinMap/joinMap.cpp:1: /usr/include/c++/9/bits/stl_function.h:177:12: note: ‘std::minus’ 177 | struct minus : public binary_function<_Tp, _Tp, _Tp> | ^~~~~ In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37, from /usr/include/boost/mpl/aux_/arithmetic_op.hpp:34, from /usr/include/boost/mpl/minus.hpp:19, from /usr/include/boost/mpl/vector/aux_/iterator.hpp:20, from /usr/include/boost/mpl/vector/aux_/vector0.hpp:22, from /usr/include/boost/mpl/vector/aux_/clear.hpp:18, from /usr/include/boost/mpl/vector/vector0.hpp:24, from /usr/include/boost/mpl/vector/vector10.hpp:18, from /usr/include/boost/mpl/vector/vector20.hpp:18, from /usr/include/boost/mpl/vector.hpp:36, from /usr/include/pcl-1.10/pcl/register_point_struct.h:57, from /usr/include/pcl-1.10/pcl/point_types.h:44, from /home/wzz/shenlan/slambook/ch5/joinMap/joinMap.cpp:8: /usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp:68:8: note: ‘boost::mpl::minus’ 68 | struct minus | ^~~~~ In file included from /usr/include/pcl-1.10/pcl/point_types.h:44, from /home/wzz/shenlan/slambook/ch5/joinMap/joinMap.cpp:8: /usr/include/pcl-1.10/pcl/point_types.h: In function ‘const pcl::PointWithRange& pcl::common::operator-=(pcl::PointWithRange&, const float&)’: /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h: In function ‘const pcl::PointWithRange& pcl::common::operator*=(pcl::PointWithRange&, const float&)’: /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘mulscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘mulscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘mulscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/pcl-1.10/pcl/point_types.h:518:1: error: ‘mulscalar’ is not a member of ‘pcl::traits’ 518 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
最新发布
09-16
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值