第一篇文章 先试试 水一下。。
在学习PCL点云库教程中,经常有各种库函数报错(因为代码使用版本和现在更新的版本差别大,有些函数都改掉了)
这里记录一下:
我用的是ubuntu18.04 pcl-1.11 eigen3 vtk-7.1
多帧点云配准 pairwise_incremental_registration中:
reg.setPointRepresentation (boost::make_shared<const MyPointRepresentation> (point_representation));
报错:不存在用户定义的从 "boost::shared_ptr<const MyPointRepresentation>" 到 "const std::shared_ptr<const pcl::PointRepresentation<PointNormalT>>" 的适当转换
改成:
reg.setPointRepresentation (pcl::make_shared<const MyPointRepresentation> (point_representation)); 即可
reg.setInputCloud (points_with_normals_src);
报错:函数 "pcl::Registration<PointSource, PointTarget, Scalar>::setInputCloud [其中 PointSource=PointNormalT, PointTarget=PointNormalT, Scalar=float]" (已声明 所在行数:698,所属文件:"/usr/include/pcl-1.11/pcl/registration/registration.h") 不可访问
改:reg.setInputSource (points_with_normals_src);