最近在跑ORB_SLAM2_SSD_Semantic-master,出现了很多错误,后来发现是pcl的版本不对,我刚开始安装的是pcl-1.12,发现pcl::EuclideanClusterComparator模块进行了调整,之前的pcl中EuclideanClusterComparator有三个参数,而pcl-1.12版本中只有两个参数(行吧。。。行吧。。。)所以选择安装pcl-1.8……话不多说,我们开始。。。
首先进行下载:https://github.com/PointCloudLibrary/pcl/releases
这里我们选择1.8.0版本
进入根目录进行编译:
mkdir build
cd build
cmake ..
make -j12
error1:boost::math::isnan
解决:在vlp_grabber.h文件中加入**#include<boost/math/special_functions/fpclassify.hpp>**
error 2:#include <boost/uuid/sha1.hpp>
原因:sha1.hpp的路径不对(查找自己电脑上sha1.hpp的路径)
解决:在pcl_visualizer.cpp中将**#include <boost/uuid/sha1.hpp>改为#include <boost/uuid/detail/sha1.hpp>**
**error 3:error: invalid initialization of reference of type ‘const std::vector<float>&’ from expression of type ‘const boost::shared_ptr<std::vector<float> >’
144 | return (plane_coeff_d_);**
解决:在plane_coefficient_comparator.h中的**return (plane_coeff_d_)**修改为
return ( plane_coeff_d_)*
error 4:/bin/ld: ../../lib/libpcl_kdtree.so.1.8.0: undefined reference to `LZ4_resetStreamHC'
/bin/ld: ../../lib/libpcl_kdtree.so.1.8.0: undefined reference to
LZ4_setStreamDecode' /bin/ld: ../../lib/libpcl_kdtree.so.1.8.0: undefined reference to
LZ4_decompress_safe'
/bin/ld: ../../lib/libpcl_kdtree.so.1.8.0: undefined reference toLZ4_decompress_safe_continue' /bin/ld: ../../lib/libpcl_kdtree.so.1.8.0: undefined reference to
LZ4_compress_HC_continue'解决:**/pcl/build/kdtree/CMakeFiles/pcl_kdtree.dir/下的link.txt里在末尾写上:-llz4**
error 5:error: no matching function for call to ‘boost::uuids::random_generator_pure::random_generator_pure(boost::random::mt19937*)’ 77 | boost::uuids::random_generator OutofcoreOctreeDiskContainer<PointT>::uuid_gen_ (&rand_gen_);
解决:注释octree_disk_container.hpp中的76、77行:
error 6:/home/young/pcl-1.8.0/features/include/pcl/features/integral_image_normal.h:254: undefined reference to `pcl::IntegralImageNormalEstimation<pcl::PointXYZ, pcl::Normal>::initData()'
解决:在octree_disk_container.hpp加入**#include <pcl/features/normal_3d.h>**
error 7:/bin/ld: ../lib/libpcl_recognition.so.1.8.0: undefined reference to `pcl::BOARDLocalReferenceFrameEstimation<pcl::PointXYZRGBA, pcl::Normal, pcl::ReferenceFrame>::computeFeature(pcl::PointCloudpcl::ReferenceFrame&)'
解决:在pcl-1.8.0/features/include/pcl/features/board.h加**#include <pcl/features/board.h>**
终于!!!!!!成功了!!!!!!(我直接落泪~~~~)
完结~~撒花~~~!!!
呼呼~~~
最后,别忘了sudo make install哦~
有问题欢迎留言!
版权归原作者 小方只会百度 所有, 如有侵权,请联系我们删除。