[英]Facing error during compilation of Iterative closest point algorithm
I am trying to compile the program from this site. 我正在尝试从此站点编译程序。
( http://pointclouds.org/documentation/tutorials/iterative_closest_point.php )! ( http://pointclouds.org/documentation/tutorials/iterative_closest_point.php )!
But during compilation i faced the following error. 但是在编译过程中,我遇到了以下错误。
'pcl::Registration<PointSource,PointTarget,Scalar>::setInputCloud' : cannot convert parameter 1 from 'boost::shared_ptr<T>' to 'const boost::shared_ptr<T> &' \\sample\\kinect2_grabber.h 424 1 Sample
the code which got the error is as follows:- 出现错误的代码如下:
icp.setInputCloud (cloud);
icp.setInputTarget (cloud);
I have declared this cloud inside the function convertRGBDepthToPointXYZRGB
like this 我已经在函数
convertRGBDepthToPointXYZRGB
这样的内部声明了这个云
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud( new pcl::PointCloud<pcl::PointXYZRGB>() );
I don't know how to rectify the above error.Please somebody help me to solve the above error. 我不知道如何纠正以上错误。请有人帮我解决以上错误。
Thanks 谢谢
You have templated the IterativeClosestPoint
object on type pcl::PointXYZ
for both template arguments, so that the functons setInputCloud
and setInputTarget
, whose argument types are determined by the class template, expect an object of pcl::PointXYZ
as their argument. 您已经为两个模板参数在
pcl::PointXYZ
类型上模板化IterativeClosestPoint
对象,以便其参数类型由类模板确定的函数setInputCloud
和setInputTarget
期望将pcl::PointXYZ
对象作为其参数。 However, you are trying to pass pcl::PointXYZRGB
to the object. 但是,您试图将
pcl::PointXYZRGB
传递给该对象。 Instead, template the object on pcl::PointXYZRGB
for both source and target. 而是在
pcl::PointXYZRGB
对象作为源和目标的模板。
API for the IterativeClosestPoint
class: IterativeClosestPoint
类的API:
http://docs.pointclouds.org/1.7.1/classpcl_1_1_iterative_closest_point.html http://docs.pointclouds.org/1.7.1/classpcl_1_1_iterative_closest_point.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.