0

I am using primesense camera for a project which has device driver indicating Carmine 1.09 (installed from OpenNI folder). When I am running OpenNI2's viewer, you can see the depth data coming through so the camera is definitely connected.

However, when I am running a project using PCL, it just kept throwing an error exception saying "no devices connected". I tried many different version of primesense (i.e. https://github.com/jspricke/openni-sensor-primesense), but still not helping.

Here is where the problem occurs. Wherever there is a pcl:: command, it will try to throw this exception.

    try {
        if (!pcl::OpenNIGrabber().getDevice())
        {
            std::cout << "No device is found!" << std::endl;
            return;
        }
        else
        {
            std::cout << "Device is found!" << std::endl;
            pcl::Grabber* grabber = new pcl::OpenNIGrabber();
        }
    }
    catch (const pcl::PCLIOException& ex)
    {
        std::cout << ex.what() << std::endl;
        return;
    }
    catch(const char* msg)
    {
        std::cout << msg << std::endl;
        return;
    }

FYI. I'm currently using Windows8.1 64 bit, but the projects are all running 32 bits, with PCL 1.6 and OpenNI 1.5.4 (I tried the patched version as well).

Does anybody know a solution to this?

John Yang
  • 547
  • 1
  • 8
  • 21
  • 1
    First question - have you tried the OpenNI viewer? You write that you tried the OpenNI2 viewer but not the OpenNI viewer. – D.J.Duff Aug 04 '15 at 16:31
  • Second question - I'm a bit confused as to why you construct two grabber objects? – D.J.Duff Aug 04 '15 at 16:36
  • @D.J.Duff, Actually OpenNI simpmle viewer didn't work and it's returning exactly the same error message as no device is connected. I am pretty sure the device is there and displayed in device manager. So is there special driver to be used for PCL or OpenNI (so not just for OpenNI2)? – John Yang Aug 05 '15 at 05:48
  • @D.J.Duff, My grabber objects are just examples so I don't have to paste out all the codes. So pretty much it will throw errors at the first line of the code where getDevice() is called. pcl::Grabber* grabber = new pcl::OpenNIGrabber() by itself will also throw the same error. – John Yang Aug 05 '15 at 05:49
  • I guess because you are using PCL 1.6 you cannot use the OpenNI2Grabber but you might be able to port it back. Otherwise, I can't really help sorry. – D.J.Duff Aug 05 '15 at 12:34

0 Answers0