No docs for Java, c#/unity?

After banging my head against a wall for nearly three days, im at a loss.

How do I write code under the java/c#/unity wrappers with no api documentation?
It seems to be that the only reference is in the ‘orbbec astra book’ where is shows a short tutorial using c++, however I cannot translate this to any other language because some functions are missing or have different names, everything I tried has failed.

Can anyone give me any hints on how to get a string representation of a depth frame in unity(c#)?

I have tried to alter the code in the unity sample and see there is a function:

void printDepth(Astra.DepthFrame depthFrame, Astra.CoordinateMapper mapper)
{
}

Without any documentation I don’t know anything about those objects which are required as parameters.

Thanks in advance

Ok ive managed to get some depth data in unity after a lot of fumbling around in the dark, would like to know how to do the same with the java wrapper ideally…just a summary of available functions in the sdk and a brief description of each would be enough, its not like i’m expecting a guide or anything :laughing:

Thanks.

Agreed. As far as i know, the java wrapper is unusable because it’s missing the jni dll. Either this or a mismatch in dll naming. The minimum required would be a simple Javadoc with the API functions, arguments, and return values.

Hello, you can get them from github, I searched and found this repository to work to create valid jars with their JNI code: GitHub - orbbec/OpenNI2 at orbbec-dev .

I distribute the version on maven for anyone to use, it works great:

http://forum.rea.lity.tech:8081/#artifact/org.openni/OpenNI/2.3.1


  <repositories>
    <repository>
      <id>public</id>
      <name>RealityTech public repository</name>
      <url>http://forum.rea.lity.tech:8081/repository/public/</url>
    </repository>
  </repositories>
<dependency>
  <groupId>org.openni</groupId>
  <artifactId>OpenNI</artifactId>
  <version>2.3.1</version>
</dependency>

Any update on availability of java docs for orbbec jar file?

Are you using OpenNI 2 or the Orbbec sdk?

I’ve been trying to use the Orbbec SDK - I decompiled the jar file to look at method names and signatures available (and then grepping around other examples or src to try and finding matching signatures in other languages and guess), but it’s hard to tell what method parameters are (e.g. what String value I should be passing to something like StreamSet.open() )
I’ve been trying to get multiple sensors working on the same device, so got the device URI using OpenNI2, and have been trying to pass that through to Orbbec SDK. I tend to get errors that look like this:

java.lang.UnsupportedOperationException: Invalid operation
    at com.orbbec.astra.ApiStatus.throwIfError(ApiStatus.java:73)
    at com.orbbec.astra.NativeMethods.checkStatus(NativeMethods.java:13)
    at com.orbbec.astra.ImageStream.<init>(ImageStream.java:15)
    at com.orbbec.astra.DepthStream.<init>(DepthStream.java:8)
    at com.orbbec.astra.DepthStream.get(DepthStream.java:18)
    at com.orbbec.astra.DepthStream.get(DepthStream.java:22)

Which are hard to debug as I don’t know what the Invalid operation is.
Wondering if I’ll have better luck using OpenNI2 to get the frames from multiple sensors?

Here’s the code I was trying (shortened for clarity):

...
Astra.initialize();
// initialize OpenNI
OpenNI.initialize();
List<DeviceInfo> devicesInfo = OpenNI.enumerateDevices();
for(DeviceInfo deviceInfo : devicesInfo) {
System.out.println("Device uri = " + deviceInfo.getUri());
    StreamSet streamSet = StreamSet.open(deviceInfo.getUri());
    StreamReader reader = streamSet.createReader();
    reader.addFrameListener(new FrameListener() { public void onFrameReady(StreamReader reader, ReaderFrame frame) { ...}
    DepthStream b = DepthStream.get(reader); //Exception thrown here!!
}

Have a look at my post if you missed it. Working Java Example DepthStream and PointStream

I put that bit of code together using the same approach as you.

I’ve moved to OpenNI so I can run on a Raspberry pi, there is a halfway decent java example in Open NI that enumerates avaliable configurations from the device. I’ve adapted that example quite easily to generate a point cloud. I also posted that to the forum.

I based my code off your earlier post :slight_smile: – I haven’t seen your post with the OpenNI example written in Java. Just looked for it and found it here: OpenNI2 on Raspberry PI + Java - I’ll give it a shot. Thanks for sharing :slight_smile:

Is there still no docs for C# after almost a year of a customer complaining? Is this company still in business? Hey Orbbec, I will spend an afternoon writing docs for you if you give me a couple of free sensors! PM me!