c++ - PCL-错误 C2039 : 'PointType' : is not a member of 'boost::shared_ptr<T>'

标签 c++ point-cloud-library

我正在尝试从 pcl NARF tutorial 中实现一些代码

但是这段代码:

boost::shared_ptr<pcl::RangeImage> range_image_ptr (new pcl::RangeImage); 
pcl::RangeImage& range_image = *range_image_ptr;   
range_image.createFromPointCloud (point_cloud, angular_resolution, pcl::deg2rad (360.0f), pcl::deg2rad (180.0f), scene_sensor_pose, coordinate_frame,oise_level, min_range, border_size);

总是导致以下错误:

error C2039: 'PointType' : is not a member of 'boost::shared_ptr' C:\CLibraries\PCL 1.5.1\include\pcl-1.5\pcl\range_image\impl\range_image.hpp 193

error C2039: 'points' : is not a member of 'boost::shared_ptr' C:\CLibraries\PCL 1.5.1\include\pcl-1.5\pcl\range_image\impl\range_image.hpp 194

有没有人知道如何修复它?

最佳答案

对于将来遇到此问题的任何人:错误显示为错误的文件。它说 range_image.h 有错误 实际问题是我没有使用指向点云的指针。

rangeImage.createFromPointCloud(pointCloud, angularResolution,...

应该是这样的:

rangeImage.createFromPointCloud(*pointCloud, angularResolution,...

关于c++ - PCL-错误 C2039 : 'PointType' : is not a member of 'boost::shared_ptr<T>' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42204100/

相关文章:

c++ - QtCreator : "Cannot open include file: ' windows. h'”

c++ - 用 GLUT 绘制大文本?

c++ - opencv Mat 16位来自QVector

c++ - C memcmp 第三个参数类型

c++ - 使用迭代最近点 (ICP) 时如何在点云库 (PCL) 中标记 NULL 数据

c++ - 通过 C++ 打开存储在互联网上的文件

java - 如何从 Android Studio 写入 PCD 文件?

c++ - 以 x y z r g b 格式读取 ascii 点云

c++ - C++ 中的点云库 (PCL) 等待/延迟/ sleep 函数

c++ - 我可以使用什么库在 GUI 中显示 3D 图像和/或点云?