Project Tango Pose data producing drift while stationary AND in motion

情到浓时终转凉″ 提交于 2019-12-06 04:09:05

问题


I am creating an augmented reality app using the Project Tango. An essential part of this is accurate position tracking. Of course I understand that no inertial tracking system is perfect, but the Tango seems to have worked pretty well so far.

However, in the past few days, the translation data (x, y, z) from the Tango appears to be experiencing slight drift, even when the device is held stationary. I have the device writing X, Y, and Z coords to the screen, and when the device is sitting still, with nothing in its field of view changing, the X value slowly rises, and the Y and Z values slowly fall. The rotation values hold steady and are always accurate. The drift occasionally changes direction, and can gain speed as well, sometimes increasing at rates of 0.1 units per second.

Rotating the device also produces strange translation behavior, with large drifting occurring upon rotation about any of the three axes. Moving the device, predictably, causes larger drifts, and appears to increase the "velocity" of the events.

Ordinarily I would chalk this up to the device's inaccuracy, but its performance seems to have suffered since I started using it two weeks ago. The values used to be much more stable. Is there anything I can do to "reset" it to the way it used to be, or is there something that's I've done that could be causing this?

Attached below is the callback function for pose data:

        @Override
        public void onPoseAvailable(final TangoPoseData tangoPoseData) {
            if (tangoPoseData.baseFrame == TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION
                        && tangoPoseData.targetFrame == TangoPoseData.COORDINATE_FRAME_DEVICE) {
                rotationQuat = new vec4((float) tangoPoseData.rotation[TangoPoseData.INDEX_ROTATION_X],
                        (float) tangoPoseData.rotation[TangoPoseData.INDEX_ROTATION_Y],
                        (float) tangoPoseData.rotation[TangoPoseData.INDEX_ROTATION_Z],
                        (float) tangoPoseData.rotation[TangoPoseData.INDEX_ROTATION_W]);

                rotationMat = rotationQuat.toMatrix();
                Matrix.rotateM(rotationMat, 0, 90, 1.f, 0.f, 0.f);


                position = new vec3(SCALE_FACTOR * (float) tangoPoseData.translation[TangoPoseData.INDEX_TRANSLATION_X],
                        SCALE_FACTOR * (float) (tangoPoseData.translation[TangoPoseData.INDEX_TRANSLATION_Z]),
                        SCALE_FACTOR * (float) (-1 * tangoPoseData.translation[TangoPoseData.INDEX_TRANSLATION_Y]));

                float[] translationMatrix = new float[16];

                Matrix.setIdentityM(translationMatrix, 0);
                Matrix.translateM(translationMatrix, 0, -1.0f * position.x, -1.0f * position.y, -1.0f * position.z);

                SceneCamera.Instance().setEye(position);
                SceneCamera.Instance().setCameraOrientation(rotationMat);
                SceneCamera.Instance().setCameraTranslation(translationMatrix);

                main.displayVals(position, rotationQuat);
            }
        }

SceneCamera is a class being used to move the "camera" in space.

SCALE_FACTOR = 1.0

The Y and Z axes being switched in translation was necessary to convert to OpenGL coordinates.

Any guidance on this issue would be greatly appreciated.

EDIT: The drifting appears to be present in the Project Tango Explorer app as well. When using the Area Learning functionality of that app, the device's position jitters and drifts when held still, and when rotated about the Z axis (axis going through the screen), significant translation drift occurs, when it should be remaining in place. This leads me to believe it is a problem with the Tango's calibration and not my code.


回答1:


I've tried both the java, and the c point-cloud-example with Ramanujan Version 1.17

The depth test shows drifts in arbitrary direction. I printed the translation and rotation values, while testing. And despite the fact that the tango was static and not moved. Also the tango explorer app has a similar behaviour.

                   tx   |   ty    |   tz   |   rx   |   ry   |    rz   |  rw  
 AVERAGE      | -0,0005 | -0,0027 | 0,0134 | 0,6890 | 0,0518 | -0,0060 | 0,7228 
 MAX          |  0,0206 |  0,0092 | 0,0281 | 0,6901 | 0,0546 | -0,0023 | 0,7238 
 MIN          | -0,0159 | -0,0244 | 0,0022 | 0,6880 | 0,0495 | -0,0080 | 0,7217 
DIFF(MAX;MIN) |  0,0366 |  0,0336 | 0,0258 | 0,0021 | 0,0051 |  0,0057 | 0,0021 

The values above show small differences, which aren't that significant after merging the point clouds.

But the problem is that it drifts while moving around. And the error above accumulates.

  • Are such values "normal"? And I have to deal with it?
  • or is that a tango issue?

There are other relatet topics:

  • Transforming and registering point clouds
  • Project Tango: Converting between coordinate systems and merging point clouds
  • Future prospects for improvement of depth data on Project Tango tablet

There is a disscussion on google plus. ADF could help, I will give it a try!




回答2:


A shot in the dark: make sure your tablet is perfectly still during bootup. Why? Based on my experience with the Invensense 9150, sensor calibration during initialization improves with steady state input. Just press the power button and let it sit flat until it has booted.




回答3:


I have noticed the same intermittent drift lately. It seems to have begun about the time tango play store apps were updated for Pythagoras but before my tango device had Pythagoras pushed to it. Still on Nash here. The drift would start and stop suddenly and seemed to drift at a nearly constant rate. For example: using the Tangominitown Unity app it would start fine. After a few seconds while the tablet remained still, the app would suddenly behave as if I were moving rapidly forward. This would continue for several seconds during which the rate appeared to slow slightly then it would suddenly stop drifting. Coincidentally I began getting frequent "Tegra services have stopped" messages around the same time. This is in addition to the usual Tango services have stopped. Probably unrelated. EDIT: I just noticed that the drift shows up in Google Maps as well. While stationary, the Maps position will occasionally show a sudden curved trajectory that covers roughly 1/3 of a 50ft diameter circle in about 3 seconds, then stops.



来源:https://stackoverflow.com/questions/30876433/project-tango-pose-data-producing-drift-while-stationary-and-in-motion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!