google-ar / arcore-android-sdk

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

getpose not always consistent (similar to issue#722) #977

Closed fxvn78 closed 4 years ago

fxvn78 commented 4 years ago

SPECIFIC ISSUE ENCOUNTERED

Also see issue #722. calling camera.getPose().tx(), camera.getPose().ty(), camera.getPose().tz() something gives inconsistent values for a given device position.

Most times, the values are less then a few cm off but sometimes they are off by more the 10+cm or even higher.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

1) In code, set a text view to record the cameraPose in HandleClick (called by DrawFrame()) after confirming the device is in the tracking state and a UI button is pressed. The UI button is used to capture the pose one the device is positioned to test.

2) Let the device recognize the environment and notice virtual points and planes are shown on the screen.

3) place device in a location that maintains tracking state and use a UI button to capture the camera Pose coordinates. Note Text view can be used to view live and saved coordinates.

4) move the device to various locations (losing camera tracking does not seem to matter)

5)return device back to original location. Notice that in most cases, the camera pose coordinates are close in value to the original recorded location but sometimes the coordinates are way off.

6) problem seems to occur more often if a different "colored" plane is rendered in the background from when the original pose was recorded.

WORKAROUNDS (IF ANY)

since the problem seems to happen more often when a different colored planes, we ignore the data and re-run. If there is anything that can be done to work around this, please share.

ADDITIONAL COMMENTS

why would a different detected plane(s) influence the camera pose? It would also help to know what the colors and mesh size means (e.g. do they reflect confidence in the measurements)? Note consitent data with no planes (only a low number of points) seems to give consistent data for the pose.

fxvn78 commented 4 years ago

issue is solved with anchors since coordinates are not guaranteed to be consistence across frames.