Arkit with Unity better positioning on long distance

I would like to use Arkit and Unity for an AR guided tour of our city, where every person will see a series of videos anchored in space, and the tour guide will give more info and context.

I have a demo, made in Unity where first u go around placing cubes, to be used as placeholder for the videos. This works very well in small enviroments like an office or a home.

But when we try this solutions on the actual place, the cube are placed fine, but when going back to the starting point i have noticed that the camera in Unity is not at the starting point. So the cubes are not aligned with the actual real places. It look likes there are some errors accumulating that will make the real position differ from the one in Unity.

I am not sure how to solve this problem, i can’t find any similar problem on the forum. Could this be solved by software ? Is this an expected behaviour ? maybe it has a max range. Could it be a problem with Unity and the distance from the origin ? I don’t think this is the case, but maybe it starts to loose the origin ?

I am using an Ipad Pro to make the tests, but for the client it would use an Ipad 10'' Thanks

Hello,

for an AR experience that spans the area of an entire city, you will definitely need to use a different approach. The main challenges compared to a room-sized experience are that:

  1. With an increasingly large area, you might experience drift and/or exceed the size that ARKit can handle for its world map.
  2. For a city guide use case, developers likely will not remain in the AR experience continuously, but put the phone down while they walk to the next landmark. This requires a way to relocalize/recognize the area where the next video can be found.

Which approach works best for you depends a bit on the details for your use case. For example, whether it's enough if the AR videos show up somewhere in the vicinity of a certain landmark, or if you want to determine their position very precisely, in order to overlay the video to a real building or landmark.

It sounds like the best suited solution for a city tour use case would be Location Anchors, provided they are supported in your city. Location Anchors use a combination of GPS and visual features for a very precise localization. You can find a list of supported regions here.

If Location Anchors are not an option, you could also investigate one of the following alternatives:

  • Use GPS for a coarse localization (you can use the CoreLocation framework for that). Once the user is in the vicinity of a landmark, the app loads one of multiple saved ARWorldMaps and attempts to relocalize to it. For an example, you can have a look at the Saving and Loading World Data example. A challenge with that approach is that the environment might look quite different than at the time when the map was created (different time of day, season, there are people in the scene, buildings may have changed, etc.). All of that can make relocalization more difficult or impossible.
  • You can also try to create ARReferenceObjects from the objects that you want to augment with a video. This might work for certain types of landmarks like statues or fountains, but can suffer from similar challenges as the ARWorldMap if lighting or other appearance properties don't match.
  • If it is an option to put up signs or posters in the city, then you could also use images or App Clip codes as a trigger for the AR videos.
Arkit with Unity better positioning on long distance
 
 
Q