简体   繁体   中英

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

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) {

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM