I am wondering about ArAnchor behavior.
I know that when the session is started with
ARKitWorldTrackingSessionConfiguration.planeDetection = ARPlaneDetectionHorizontal;
the session notify of created/updated/removed ARPlaneAnchor. If my understanding is OK, ARPlaneAnchor will get updated each time ARKit extend the discovered plane or change the discovered plane position. That is for anchor directly created by arkit.
But the API let you create your own anchors. You can create an ARAnchor and add it to the session.
ARAnchor *newAnchor = [[ARAnchor alloc] initWithTransform:position_to_track_matrix]; [session->_session addAnchor:newAnchor];
When I do that, I receive anchor update for the created anchor, but I would like to know why it get updated. (The test was done with ARKit 1.5 beta 2)
Does arkit update the position of a user created anchor when arkit update it's understanding of the world ?
For example, if I move the device with arkit tracking from A point to B point. Then from B point to C point. Between B and C, tracking result will be bad because there is not enough light. Then between C and A, at a point called O, I add an ARAnchor. As the device tracking was lost between B and C the current location of O is away from the expected location regarding to the origin point A. I expect that when the device come again to A point, there will be a sort of loop closure and maybe arkit will update the ARAnchor so that O will be at the correct real position. Should this be the behavior of ARKit user created anchors ?
If not, what is the behavior/purpose of user created anchors?
I searched on this forum, on the official documentation and on the web but I have not found any helpful answer. If one already exists, please point me to the thread.
I hope my english is not too bad and my explanations are clear.
Thank for your help.