多版本pcl安装

文章讲述了在Ubuntu系统中查看和管理PCL(PointCloudLibrary)库的过程,包括使用dpkg和apt命令查询库信息,安装PCL1.8.0的详细步骤,以及处理编译过程中遇到的boost、LZ4相关的错误。同时,提到了多版本PCL的使用方法,即在CMakeLists.txt中指定PCL版本。
摘要由CSDN通过智能技术生成

查看与pcl有关的库

dpkg -l | grep pcl

查看libpcl-dev库所在位置

dpkg -L libpcl-dev

查看libpcl的版本

apt-show-versions | grep libpcl

由于安装了noetic 所以自带了pcl-1.10
其库文件位于/usr/include/pcl-1.10/pcl/
其cmake相关文件/usr/share/doc/libpcl-dev/
在这里插入图片描述

多版本安装pcl1.8.0

pcl安装在位置/usr/local/pcl-1.8.0/pcl

pcl1.8.0下载地址
https://github.com/PointCloudLibrary/pcl/tree/pcl-1.8.0

参考安装方法
https://blog.csdn.net/weixin_44401286/article/details/113695219

mkdir build && cd build
cmake  -DCMAKE_INSTALL_PREFIX=/usr/local/pcl-1.8.0/pcl \ -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \..
make -j4
sudo make install

编译过程出错

问题二、四需要修改编译中产生的文件,要等到编译报错之后再改。其余可以提前改

问题一 error :#include <boost/uuid/sha1.hpp>

参考文中对应error2部分
https://blog.csdn.net/fffyyyhhh12/article/details/126889810#t6

问题二 报错LZ4_有关的

make[2]: *** [tools/CMakeFiles/pcl_compute_cloud_error.dir/build.make:283: bin/pcl_compute_cloud_err

参考以下链接中的 1报错内容:
https://blog.csdn.net/weixin_44684139/article/details/112516620
或者参考erro4
https://blog.csdn.net/fffyyyhhh12/article/details/126889810#t6

error: no matching function for call to ‘boost::uuids::random_generator_pure::random_generator_pure(boost::random::mt19937*)’
     boost::uuids::random_generator OutofcoreOctreeDiskContainer<PointT>::uuid_gen_ (&rand_gen_);

问题三 OutofcoreOctreeDiskContainer

参考文中对应error5部分https://blog.csdn.net/fffyyyhhh12/article/details/126889810#t6

问题四 pcl_feature_matching

make[2]: *** [apps/CMakeFiles/pcl_feature_matching.dir/build.make:291: bin/pcl_feature_matching] Error 1
make[1]: *** [CMakeFiles/Makefile2:3754: apps/CMakeFiles/pcl_feature_matching.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

参考链接下面链接的 问题6:
https://blog.csdn.net/dui845819593/article/details/128486864

查找

whereis liblz4.so
wxh@wxh-com:~/cmake_lib/pcl-pcl-1.8.0/build$ whereis liblz4.so
liblz4: /usr/lib/x86_64-linux-gnu/liblz4.so /usr/lib/x86_64-linux-gnu/liblz4.a

将/usr/lib/x86_64-linux-gnu/liblz4.a 添加到txt文件的内容的末尾
/home/wxh/cmake_lib/pcl-pcl-1.8.0/build/apps/CMakeFiles/pcl_feature_matching.dir/link.txt

终于可以了,然后

sudo make install

在这里插入图片描述

2、多版本使用

https://blog.csdn.net/weixin_44401286/article/details/113695219

使用时,在工程的CMakeLists.txt中需要指定使用哪个版本的PCL,如下方式:

set(PCL_DIR "/usr/local/pcl-1.8.0/pcl/share/pcl-1.8")
find_package(PCL 1.8 REQUIRED)
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值