google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.96k stars 1.22k forks source link

ArCore camera pose drift and frozen #1342

Open kingbrilliant opened 2 years ago

kingbrilliant commented 2 years ago

SPECIFIC ISSUE ENCOUNTERED

Our project used a TextureView, not a GLSurfaceView, in our own thread we just used the pose of the camera, but we found that on Samsung S21 device the pose of camera is frozen or drif, but the pose of camera on a pixel device is correct, does anyone can help?

I got this log: INVALID_ARGUMENT: Passed timestamp is too new. [mtc.pose_node.latest_imu_timestamp_ns='193470195637552'] === Source Location Trace: === third_party/redwood/perception/pose_manager/pose_manager.cc:395 third_party/redwood/perception/pose_manager/pose_manager.cc:112 vr/perception/depth/projects/motion_stereo/manager/motion_stereo_manager.cc:183 vr/perception/depth/projects/motion_stereo/manager/motion_stereo_manager.cc:779

vio_initializer.cc:668] generic::internal: [SSBA Outputs Validation] Failed: bias estimates too large. Accel bias in m/sec^2 3.36369, maximum threshold 2 Gyro bias in rad/sec 0.00583154, maximum threshold 0.15; Initializer's SSBA failed to produce a valid output.

W0207 10:04:51.901015 11802 vio_fault_detector.cc:162] VIO is moving fast with speed (m/s): 0.92447 but RANSAC failed to provide valid frame to frame translation by reporting degeneracy.

VERSIONS USED

jcobreros commented 2 years ago

I'm not programming with ARCore, but as a user I'm seeing results that are consistent with OP's observation. Testing on a Galaxy S21 ultra, ARCore apps used to work great on Android 11. Both "3D Live Scanner" and "Depth lab" apps used to work great. Same thing for 3d measuring apps. Now, (I think after updating to Android 12, but I can't be sure) they are almost impossible to use. Both work fine for a couple of seconds, then the pose either freezes or drifts like crazy, and this kills the depth estimation.

I've tried calibrating the magnetometer, accelerometer and gyro using Samsungs diagnostics app. It makes no difference. I see pretty smooth and consistent IMU readings on those apps. No glitches or bias. But anything that uses ARCore is impossible to use.

For a comparison, a Galaxy Note 10 Lite, a mid range OLD phone that is not even certified for the Depth API, works pretty well in all those apps. IF I hold both phones side by side, the Note 10 does a pretty good job at estimating depth, while the S21 ultra doesn't get a single consistent measurement.

Anything I can do to help diagnose the problem, I'm available to help. I can also find my way around Android Studio, but I'm not an advanced android programmer.

kingbrilliant commented 2 years ago

I'm not programming with ARCore, but as a user I'm seeing results that are consistent with OP's observation. Testing on a Galaxy S21 ultra, ARCore apps used to work great on Android 11. Both "3D Live Scanner" and "Depth lab" apps used to work great. Same thing for 3d measuring apps. Now, (I think after updating to Android 12, but I can't be sure) they are almost impossible to use. Both work fine for a couple of seconds, then the pose either freezes or drifts like crazy, and this kills the depth estimation.

I've tried calibrating the magnetometer, accelerometer and gyro using Samsungs diagnostics app. It makes no difference. I see pretty smooth and consistent IMU readings on those apps. No glitches or bias. But anything that uses ARCore is impossible to use.

For a comparison, a Galaxy Note 10 Lite, a mid range OLD phone that is not even certified for the Depth API, works pretty well in all those apps. IF I hold both phones side by side, the Note 10 does a pretty good job at estimating depth, while the S21 ultra doesn't get a single consistent measurement.

Anything I can do to help diagnose the problem, I'm available to help. I can also find my way around Android Studio, but I'm not an advanced android programmer.

Could you send this ticket to the developer of ArCore?

jcobreros commented 2 years ago

Sorry, do you mean opening a new issue in this repo?

kingbrilliant commented 2 years ago

Sorry, do you mean opening a new issue in this repo?

Could you help send my logs to the corresponding developers? The ArCore SDK team?

MasterHansCoding commented 11 months ago

Me too, on my Oppo A94, the app I was building was perfectly working without any drift on Android 11. I just passed to Android 12 and I notice drift which makes the app impossible to use. The phone was proposing to Switch to Android 13, hoping this bug was resolved I did update, and I notice the same drift.

It is frustrating. My options are change the firmware version to Android 11 and risk to break my phone, or wait for Android to do something ...

We're doomed guys no more arcore for us