Openni_grabber error PCL

Hi folks,

I’m trying to run the following toy example that runs PLC on top of openni (I’ve downloaded the Orbbec once):

http://pointclouds.org/documentation/tutorials/openni_grabber.php

Compilation and all is good. However, when i run it i get the following error:

cesc@ubuntu:~/GIP/intelligentpig/models/PCL/orbbec_integrated_file_creator/build$ ./openniViewer
terminate called after throwing an instance of ‘pcl::IOException’
what(): void pcl::OpenNIGrabber::setupDevice(const string&, const pcl::OpenNIGrabber::Mode&, const pcl::OpenNIGrabber::Mode&) in /build/pcl-TDlAz0/pcl-1.7.2/io/src/openni_grabber.cpp @ 344 : No devices connected.
Aborted (core dumped)

I can run the NiViewer w/o any problem

root@ubuntu:~/GIP/OpenNI-Linux-x86-2.2/Tools# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cesc/GIP/OpenNI-Linux-x86-2.2/Tools:/home/cesc/GIP/OpenNI-Linux-x86-2.2/Tools/OpenNI2/Drivers
root@ubuntu:~/GIP/OpenNI-Linux-x86-2.2/Tools# ./NiViewer

Any idea? I’ve been looking around but did not find anything.

Thanks!

Cesc

Hi,

One quick update, I’ve been digging a little bit in the PCL sources and I can see that the OpenNI and OpenNI2 libraries are actually specified in the PCL CMake hierarchy. Do you guys know what changes need to be done in the PCL CMake to point to the Orbbec OpenNI?

Actually, related to that I’ve a dump question, but what is the diffrence between OpenNI and OpenNI2? I assume that for ASTRA and PCL i should only need OpenNI2. Right?

Thanks,

Cesc

Hi Fguim,

I know this post is old, but I am having the same problem. Did you find a way to work with the astra and pcl?

Cheers,

Isabel

Any news on this problem?

I was able to get the depth image working in the OpenNI2 viewer (bin/pcl_openni2_viewer) to work for PCL 1.8.1.

As noted in other posts in this forum, OpenNI2 is a bit dated and cannot support the color stream of the Astra Pro; however, it can access the depth stream (which is really all I need for my project at the moment.

It looks like PCL’s OpenNI2 viewer is supposed to account for a missing color stream, but it has a few bugs which instead cause it to fail and crash. I had to make a few changes.

visualization/tools/openni2_viewer.cpp

Change this line:
while (!cloud_viewer_->wasStopped () && (image_viewer_ && !image_viewer_->wasStopped ()))
To this:
while (!cloud_viewer_->wasStopped () && (!image_viewer_ || !image_viewer_->wasStopped ()))

After this line:
cout << "Device ID not set, using default device: " << device->getStringID () << endl;
Add the following:
device_id = device->getStringID();

The first fix will allow the loop to work without the color stream. The second fix enables a default device to be used (instead of segfaulting).