Blank Screen with PCL OpenNI Viewer [closed]

asked 2014-09-30 18:19:28 -0500

I am trying to use the OpenNI Grabber with the PCL OpenNI Viewer, but just get three solid colors when the program is run. I am using a kinect.


#include <pcl io="" openni_grabber.h=""> #include <pcl visualization="" cloud_viewer.h="">

class SimpleOpenNIViewer { public: SimpleOpenNIViewer () : viewer ("PCL OpenNI Viewer") {}

 void cloud_cb_ (const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &cloud)
   if (!viewer.wasStopped())
     viewer.showCloud (cloud);

 void run ()
   pcl::Grabber* interface = new pcl::OpenNIGrabber();

   boost::function<void (const pcl::PointCloud<pcl::PointXYZ>::ConstPtr&)> f =
     boost::bind (&SimpleOpenNIViewer::cloud_cb_, this, _1);

   interface->registerCallback (f);

   interface->start ();

   while (!viewer.wasStopped())
     boost::this_thread::sleep (boost::posix_time::seconds (1));

   interface->stop ();

 pcl::visualization::CloudViewer viewer;


int main () { SimpleOpenNIViewer v; (); return 0; } LINK

When I open up rviz as a point cloud viewer the data displays correctly, so I know the camera works fine.

I don't know where to begin troubleshooting this issue, so any help is greatly appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason PCL Question: The PCL community prefers to answer questions at by tfoote
close date 2014-11-23 02:59:51.919453


It looks like all of the code you're using is from PCL. You'll probably get better answers if you ask this on the PCL users mailing list.

ahendrix gravatar image ahendrix  ( 2014-09-30 18:27:47 -0500 )edit