点云技术相关产学研社区

 找回密码
 立即注册加入PCL中国点云技术相关产学研社区

扫一扫,访问微社区

查看: 2365|回复: 1

获取点云出错

[复制链接]
发表于 2015-4-2 20:53:37 | 显示全部楼层 |阅读模式

运行教程的上程序pcl::OpenNIGrabber时,点云类型改成pcl:PointWithRange,运行弹出上面的错误,请问有谁知道是什么原因吗?
代码 如下:
void cloud_cb_ (const pcl::PointCloud<pcl::PointWithRange>::ConstPtr &cloud)
  {
    static unsigned count = 0;
    static double last = pcl::getTime ();
        
    if (++count == 30)
    {
      double now = pcl::getTime ();
               
          count = 0;
        
      last = now;
        
    }

  }

  void run ()
  {
    // create a new grabber for OpenNI devices
    pcl::Grabber* interface = new pcl::OpenNIGrabber();
        
        boost::function<void (const pcl::PointCloud<pcl::PointWithRange>::ConstPtr&)> f =
      boost::bind (&SimpleOpenNIProcessor::cloud_cb_, this, _1);
    // connect callback function for desired signal. In this case its a point cloud with color values
    boost::signals2::connection c = interface->registerCallback (f);

    // start receiving point clouds
    interface->start ();

    // wait until user quits program with Ctrl-C, but no busy-waiting -> sleep (1);
    while (true)
      boost::this_thread::sleep (boost::posix_time::seconds (1));

    // stop the grabber
    interface->stop ();
  }

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册加入PCL中国点云技术相关产学研社区

x
回复

使用道具 举报

发表于 2015-4-3 18:59:53 | 显示全部楼层
pcl::PointWithRange这个数据不支持吧
回复 支持 反对

使用道具 举报

本版积分规则

QQ|小黑屋|点云技术相关产学研社区 ( 陕ICP备13001629号 )

GMT+8, 2024-5-8 09:37 , Processed in 1.281492 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表