qt_visualizer 教程点云没有出现

问题描述

我针对 VTK 8.2.0 编译了 PCL1.10.1 并尝试在我的 QT Gui 项目中像 pcl 一样开始使用 PCL qt_visualizer 教程。 https://pcl.readthedocs.io/projects/tutorials/en/latest/qt_visualizer.html#qt-visualizer

点云没有出现。渲染窗口工作。我可以更改背景颜色并添加坐标轴。

enter image description here

我从 doc/tutorials/content/sources/qt_visualizer

复制了代码

我使用了 cmake 3.16.3。根据

 'atom-text-editor':
   'backspace': 'abort!'
   'delete': 'abort!'

boost 版本是 1.71.0.0ubuntu2

有什么想法吗?

解决方法

改变

typedef pcl::PointXYZRGBA PointT;
typedef pcl::PointCloud<PointT> PointCloudT;

在 pclviewer.h 中

typedef pcl::PointCloud<pcl::PointXYZRGB> PointCloud;

解决了我的问题。不知道为什么。