Environment: ARKit 2.0, iPhone X, iOS 12.1
While running an ARSeesion
at the ARWorldMappingStatusMapped
state,
ARSession.AddAnchor
.Then close the app and restart the ARSession
,
ARKitWorldTrackingSessionConfiguration.initialWorldMap
ARSession.runWithConfiguration
with the configuration and run option above.ARSession
indicates that it has reconciled the recorded world map with the current environment, read the positions of anchors (#B) from ARWorldMap.anchors
.But I found that positions of read anchors (#B) are not changed compared to positions when they were saved (#A). That's incorrect. Why?
Because the initial position of the phone is the position of coordinate origin. And the app was once closed and the phone was moved to another place. So the position of coordinate origin changed after restarting the ARSeesion
. Then ARSession
should also reconcile the positions of ARAnchors
saved in the world map to proper places, thus the positions of ARAnchors
should have been changed.
I found the cause. The initial session, whose initialWorldMap
is nil
and run option is 0
, started after I restarted the session for reconciling. So it conflicted with the reconciling session. Which cancels reconciling. Thus the positions of loaded anchors will not change because they are unknown to the ARSession
.