GijsvanEsch
GijsvanEsch

Reputation: 11

Extracting Depth data google tango

I'm having difficulties with my android app i have the following code from examples:

@Override
public void onXyzIjAvailable(final TangoXyzIjData xyzIj) {
       // Update depth data
       updateYSDepth(xyzIj);

}

And somehow it gives me this error

JNI ERROR (app bug): attempt to pass an instance of com.google.atap.tangoservice.TangoPointCloudData as argument 1 to void com.ologicinc.rostango.TangoNodes.vio.VioDepthNode$2.onXyzIjAvailable(com.google.atap.tangoservice.TangoXyzIjData) Anyone encountered this problem before?

Also someone suggested using the following:

void onPointCloudAvailableRouter(void* context, const TangoPointCloud* tangoPointCloud) {

}

I cant seem to find anything about the onPointCloudAvailableRouter online

Upvotes: 1

Views: 238

Answers (1)

Sam598
Sam598

Reputation: 117

Are you setting this config on startup?

config.putInt(TangoConfig.KEY_INT_DEPTH_MODE, TangoConfig.TANGO_DEPTH_MODE_XYZ_IJ);

Contrary to the documentation the depth mode is not setup by default in the latest release, and you will get that error if it is not.

Also xyzIj is deprecrated, you should be using:

TangoConfig.TANGO_DEPTH_MODE_POINT_CLOUD

and the callback

@Override
public void onPointCloudAvailable(TangoPointCloudData pointCloud) {

}

Upvotes: 2

Related Questions