如何在ROS中使用PCL可视化kinect数据的表面法线?

时间:2018-07-11 09:00:45

标签: c++ ros point-cloud-library kinect-v2

我正在尝试在ROS中使用PCL从kinect2数据中获取表面法线。我在可视化常规数据时遇到麻烦。

我正在使用Following Viewer来查看实时点云。

我已在此代码中添加了point normal code PCL,以计算和可视化法线。

我遇到以下运行时错误:

ERROR: In /home/chandan_main/Downloads/VTK-7.1.0/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1794
vtkOpenGLPolyDataMapper (0xa1ea5e0): failed after UpdateShader 1 OpenGL errors detected
  0 : (1281) Invalid value


[pcl::IntegralImageNormalEstimation::setInputCloud] Input dataset is not organized (height = 1).
[pcl::IntegralImageNormalEstimation::initCompute] Input dataset is not organized (height = 1).
[addPointCloudNormals] The number of points differs from the number of normals!
[pcl::IntegralImageNormalEstimation::setInputCloud] Input dataset is not organized (height = 1).
[pcl::IntegralImageNormalEstimation::initCompute] Input dataset is not organized (height = 1).
[addPointCloudNormals] The number of points differs from the number of normals!
[pcl::IntegralImageNormalEstimation::setInputCloud] Input dataset is not organized (height = 1).
[pcl::IntegralImageNormalEstimation::initCompute] Input dataset is not organized (height = 1).
[addPointCloudNormals] The number of points differs from the number of normals! 

1 个答案:

答案 0 :(得分:0)

我现在可以恢复正常。我刚刚用过

while(!viewer-> wasStopped()) { viewer-> spinOnce(100); boost :: this_thread :: sleep(boost :: posix_time :: microseconds(100000));  }

因为我试图实时恢复正常,这显示了错误。我还重建了有问题的VTK库。