Open ertembiyik opened 4 months ago
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). I don't use any streetscape geometry inside my app nor in the example one
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! To help you more, I wanted to mention that I'm able to reproduce the issue with RealityKit too and it seems to me like the transforms returned from GARFrame's anchors are invalid even after the first frame was processed. They won't update to the correct ones even after some time passes. So I think the issue is somewhere in the sdk itself or more likely in the api response, because I was able to reproduce the same behavior on ARCore 1.41
Hi @15kingben Can you please share the approximate date of the next release? This issue is fatal for apps using WGS84 anchors
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