Can an MKPlacemark be used as an ARAnchor so that anyone visiting a particular site can see the same object placed in the correct location?

A real estate client requested AR for a new building. The only aspect that I am unsure of is whether ARKit could take advantage of GPS coordinates so that anyone visiting the site can see the building without having to place it themselves. We would love to pre-load the model into an app and have it fixed to a particular location.


What are your thoughts?

Replies

Hi T3DS,


For this notion of anchor persistence at a specific location I suggest checking out ARWorldMaps:<https://developer.apple.com/documentation/arkit/arworldmap>


You could for example lead your user to a MKPlacemark where they could then relocalize to a previously saved ARWorldMap.


Relocalization to outdoor spaces can be tricky though since changes in the physical environment such as lighting and movement of objects e.g. foliage, can make it harder to relocalize.


A simpler and perhaps more reliable approach would simply be guiding the user with the MKPlacemark to a specific reference image or object that they could detect at that location (and thereby place an anchor).

<https://developer.apple.com/documentation/arkit/arreferenceimage>

<https://developer.apple.com/documentation/arkit/arreferenceobject>

Thanks for the answer to this 4k4. I was wondering if it is possible to place content at a specific position relative to an Image Anchor that isn't in view when the device sees the reference image? So you guide the user to the specific reference image, ARKit detects it and places an anchor but a node is placed outside of that initial view.


My current thinking is that it'll have to be a combination of both world tracking with detection images?

You're welcome ay8s. In hindsight the reply rambles a bit as stream of concisousness but is accurate nonetheless.


In answer to your question, ARCamera has an ARFrame with array variable anchors which contains all anchors in session, not just currently visible anchors and including image anchors. So yes, you could place content relative to a previously detected image anchor that isn't in view.


I don't know much about your exact use case but I'd say you're most likely correct in assuming that this would require a world tracking session with detection images.