PCL/python-pcl Linux源码编译安装

链接

PCL官网:http://www.pointclouds.org/

PCL GitHub:https://github.com/PointCloudLibrary/pcl

python-pcl GitHub:https://github.com/strawlab/python-pcl


PCL编译安装

1、下载pcl-pcl-1.9.1.zip,解压;

2、mkdir build && cd build

3、cmake .. -DCMAKE_BUILD_TYPE=Release

4、make -j8 && make install -j8


python-pcl安装

1、安装依赖包:numpy, Cython==0.25.2

2、sh build.sh


问题

1、服务器端编译PCL,不需要OpenGL/VTK等显示工具。

VTK找不到只会报警告,不碍事。

CMake Warning at CMakeLists.txt:366 (find_package):
  By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "VTK", but
  CMake did not find one.

  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.

若需要关闭OpenGL依赖,修改PCL源码包根目录CMakeLists.txt 第414行如下。

# 错误代码
Could NOT find OpenGL (missing: OPENGL_INCLUDE_DIR)

# 取消OpenGL依赖
option(WITH_OPENGL "Support for OpenGL" FALSE)

2、指定安装路径

修改PCL源码包根目录CMakeLists.txt,找到这两行,打开。

SET(CMAKE_SKIP_BUILD_RPATH  TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)  

然后,在使用cmake生成工程的时候,加上:

cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install

3、安装python-pcl时,提示找不到pcl_2d-1.8.pc

错误代码

Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable

修改pcl_install_path/lib/pkgconfig/pcl_features-1.8.pc,第10行,去掉最后的pcl_2d-1.8

Requires:  pcl_common-1.8 pcl_search-1.8 pcl_kdtree-1.8 pcl_octree-1.8 pcl_filters-1.8

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值