-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong transforms returned from GARFrame.anchors #102
Comments
Seems like all transforms are getting the translations equal to the device's translation at the beginning of the ar session |
Hi Ertem, can you clarify the steps to reproduce this issue? I am not able to reproduce this on the GeospatialExample app. Note that the GeospatialExample does not save geospatial anchors on streetscape geometry. Are the sample app's terrain and rooftop anchors affected as well? Can you additionally check what values are read from the user defaults to ensure that is not an issue https://github.com/google-ar/arcore-ios-sdk/blob/master/Examples/GeospatialExample/GeospatialExample/ViewController.m#L540 |
Hi Ben, I was able to properly add saved terrain anchor from example app, but unfortunately the WGS84 anchors didn't load (my app uses them too). |
When you click the "SHOW GEOMETRY" switch on the sample app, do you see different behavior? When that switch is enabled, the sample app creates anchors on the streetscape geometry which are not saved between sessions, however if you place them on the terrain they may appear the same as normal anchors. When that switch is disabled, anchors are placed on ARKit planes instead, and can be saved. |
When I add and then load WGS84 anchors the "SHOW GEOMETRY" switch is in off state, but the saved anchors are not appearing in the scene |
Hi @15kingben have you managed to reproduce the issue? Saved WGS84 still don't load in any circumstances |
I am now able to reproduce the issue, sorry for the misunderstanding. I am taking a look now |
Hi Ertem, it seems like an issue with https://github.com/google-ar/arcore-ios-sdk/blob/master/Examples/GeospatialExample/GeospatialExample/ViewController.m#L667 where the nodes are removed when they are added because the current garFrame does not yet have the new anchors. The terrain and Rooftop anchors are async so take at least one frame to resolve. I'm not sure if this was always the case, perhaps SceneKit changed the timing/threading of certain things. It's a race condition regardless. I'll add a fix for this in the next release. |
Thanks for your elaboration on that one! |
Hi @15kingben Thanks |
The only fix would be in the sample app, note that GARFrames and GARAnchors are immutable, so they will never be updated over time. Rather, you need to get the latest snapshot from garFrame.anchors and update any anchors accordingly. |
About 3 days ago I started to notice that transforms returned from GARFrame.anchors were wrong. The nodes were either not in the desired spot nor not showing at all. The issue can be reproduced with the sample app from this repository.
The issue only takes place when restoring the session, for example adding saved anchors.
I'm using ARCore 1.42 on iPhone 14 Pro, i also reproduced the issue with iPhon 12 too
The text was updated successfully, but these errors were encountered: