Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

current pose doesn't fit to current xyzij data #49

Open
conect opened this issue Nov 7, 2015 · 0 comments
Open

current pose doesn't fit to current xyzij data #49

conect opened this issue Nov 7, 2015 · 0 comments

Comments

@conect
Copy link

conect commented Nov 7, 2015

Within tango-examples-java/PointCloudJava/app/src/main/java/com/projecttango/experiments/javapointcloud/PointCloudActivity.java

shouldn't mCurrentTimeStamp be set before getting the current pose:

if (mTangoUx != null) {
mTangoUx.updateXyzCount(xyzIj.xyzCount);
}
mPointCloudManager.updateCallbackBufferAndSwap(xyzIj.xyz, xyzIj.xyzCount);
TangoPoseData pointCloudPose = mTango.getPoseAtTime(mCurrentTimeStamp,
framePairs.get(0));
mRenderer.updatePointCloudPose(pointCloudPose);

            // Make sure to have atomic access to TangoXyzIjData so that
            // UI loop doesn't interfere while onXYZijAvailable callback is updating
            // the mPoint cloud data.
            synchronized (mUiDepthLock) {
                mCurrentTimeStamp = (float) xyzIj.timestamp;
                mPointCloudFrameDelta = (mCurrentTimeStamp - mXyIjPreviousTimeStamp)
                        * SECS_TO_MILLISECS;
                mXyIjPreviousTimeStamp = mCurrentTimeStamp;
                mAverageDepth = getAveragedDepth(xyzIj.xyz);
                try {
                    mPointCount = xyzIj.xyzCount;
                } catch (TangoErrorException e) {
                    Toast.makeText(getApplicationContext(), R.string.TangoError,
                            Toast.LENGTH_SHORT).show();
                } catch (TangoInvalidException e) {
                    Toast.makeText(getApplicationContext(), R.string.TangoError,
                            Toast.LENGTH_SHORT).show();
                }
            }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant