I have got an Orbbec Astra depth sensor attached via USB and the device manager shows the driver is correctly installed.
I have downloaded the "Astra & OpenNI2" bundle from orbbec.com but have only installed the SensorDriver_V4.3.0.4.exe
and the OpenNI2 package seperatly which I have downloaded from structure.io.
I have got the following code, which compiles just fine. But when running it returns Device open failed: DeviceOpen using default: no devices found
.
The same happens when running NiViewer.exe
What am I doing wrong here? Is there some additional driver needed?
#include "stdafx.h"
#include <OpenNI.h>
int main()
{
openni::Status rc = openni::STATUS_OK;
openni::Device device;
openni::VideoStream depth, color;
const char* deviceURI = openni::ANY_DEVICE;
rc = openni::OpenNI::initialize();
printf("After initialization:\n%s\n", openni::OpenNI::getExtendedError());
rc = device.open(deviceURI);
if (rc != openni::STATUS_OK)
{
printf("Device open failed: %s\n", openni::OpenNI::getExtendedError());
openni::OpenNI::shutdown();
return 1;
}
return 0;
}
you just needed to copy the 3 files (provided in the zip custom OpenNI 2.3 from ORBBEC) in your already installed OPENNI2 2.2 SDK folder structure ( similar to zzzz\OpenNI2\Drivers :
Basically doing this, you are extending the number of OPENNI2 managed camera by adding a "driver". Current default install folder contains the following already :
(so add the 3 orbbec files there)
Important: if you launch niviewer.exe from command line, it will search for a relative subfolder \OpenNI2\drivers subfolder first (so update this one in this case), or otherwise will look for this sub folder inside the default installation environment parameter (OPENNI2_REDIST or OPENNI2_REDIST64) depending on your installation. So take care ! Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With