ARWorldmap size limits

Hi!

I have a question about ARWorldmaps and their limits. I am planning to make a scan of a rather big area. I started playing with the ARWorldmap sample from AR Foundation (Unity) and managed to create my maps, save them and reload them (with content placed). However this only works well with small maps. When the map gets to big, I can still load the map but the relocalization does not work (or only after a LOT of time and running around).

Does anybody have an idea on how to improve this? Are there any fix limits on how big a map can be? Maybe something like telling the app, to only use a certain part of the map as localization points?

I already tried, dividing it into multiple maps, which improves the relocalization speed but obviously means, that the relocalization has to be repeated multiple times.

Any help is appreciated! :)

Replies

Hi, I'm trying to scan a big area too. What I've found doing some tests is that the ARWorldMap keep increasing in size, but at some point there is a cancellation of some feature points from the ARWorldMap. In my test I have three scenarios of three different sizes (1: 50sqm, 2: 100sqm, 3: 200sqm), what happens in my case is that between scenario 1 and 2 some feature points are deleted but the relocalization still works properly. Between the scenario 2 and 3 there is massive cancellation of feature points, basically all the first part of the scan is gone.

I've plotted the point clouds of the scenario 2 and 3 to have a visual representation. (blue: feature points, yellow: user path while mapping)

Scenario 2:

Scenario 3:

I don't know for sure if that's a fixed limit, but I've repeated the test 5 times and all the point clouds are deleated in the initial part.

p.s. I'm not english, sorry if I made some mistakes

This is really interesting and should explain the issue. Still no idea, how to solve it though. Can you tell me what you did to plot this data? Because the data I receive from the ARFoundation plugin is unreadable.

Since the saved ARWorldMap with the NSKeyedArchiver is unreadable, I just used the method of the session object to retrieve the map and from it the feature points. Here is a simplification of the code I use:

func saveARWorldMapPointLists(){
    arView?.session.getCurrentWorldMap {[weak self] map, error in
      guard self != nil, map != nil else {return}
      var fpCoord = [] //Just save the coordinates of the feature points
      for fp in map!.rawFeaturePoints.points{
        fpCoord.append([fp.x,fp.y,fp.z])
      }
      saveAsJson(fpCoord)
    }
  }

Then I just plot the point cloud in a Jupyter notebook, something like this:

import json
import numpy as np
import os
import open3d as o3d

def loadPointCloud(file):
    with open(file, 'r') as f:
        points = json.load(f)
        pointcloud_old = o3d.geometry.PointCloud()
         
        new_pcd = np.asarray(points)
        pointcloud_old.points = o3d.utility.Vector3dVector(new_pcd)
        pointcloud_old.paint_uniform_color((0.05, 0.05, 1))
        o3d.visualization.draw_geometries([pointcloud_old]) #here you can plot more point clouds, as I did with the user position