Robotics StackExchange | Archived questions

.ONI file load using OpenNI2

I am programming in C++ and have been able to save a .oni depth file for testing purposes using OpenNI2.

I am now however unable to load this .ONI file back into a program to use. My code used is as follows:

Status rc_ = openni::STATUS_OK; Device

device; rc = OpenNI::initialize();

char* fileaddress =

"C:\Users\James\DepthRecording1.oni";

rc_ = device_.open(fileaddress);

After the .open line has been executed, rc_ has the following status : STATUSNODEVICE.

This is however the method of loading files as specified in the OpenNI2 documentation, and this code is proven to work if file address is switch for "openni::ANY_DEVICE", in which case it loads my 3D camera (Orbbec Astra). Does anyone know what needs to be changed/ added in order to be able to load the file?

Asked by Jiimmmbo on 2016-09-11 14:08:14 UTC

Comments

This forum addresses issues and questions related to Gazebo. You will have better luck with OpenNI questions on a different forum.

Asked by nkoenig on 2016-09-12 10:38:06 UTC

Answers