"pcl::PointXYZ point5 = cloud->points[57];\n\t\tviewer.addSphere(pcl::PointXYZ(point5), 0.0023, 1, 0, 0, point5);这句话显示报错,没有与参数列表匹配的重载函数pcl::visualization"PCLVisualizer::addSphere实例,该如何解决"\n\n根据错误提示信息,可以看出参数列表不匹配。根据PCL文档,pcl::visualization::PCLVisualizer::addSphere函数的参数列表应为:\n\ncpp\nbool addSphere(const pcl::PointXYZ &center, double radius, double r, double g, double b, const std::string &id = \"sphere\", int viewport = 0);\n\n\n因此,你需要将代码修改为:\n\ncpp\npcl::PointXYZ point5 = cloud->points[57];\nviewer.addSphere(point5, 0.0023, 1, 0, 0, \"sphere\", 0);\n\n\n这样就可以解决该问题。


原文地址: https://www.cveoy.top/t/topic/pRgB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录