Search Unity

Merge point clouds

Discussion in 'AR' started by ST_ProductVIz, Jan 20, 2019.

  1. ST_ProductVIz

    ST_ProductVIz

    Joined:
    Nov 29, 2017
    Posts:
    27
    Hi all,

    I use the AR foundation package and try to collect the point clouds i get from the ARPointCloudManager. Therefor, I subsribe to the pointCloudUpdated event and save the points to a global cloud every time an update is raised. Is this the right approach to get a global point cloud or am I something missing here?

    According to https://github.com/google-ar/arcore-android-sdk/issues/463, it was suggested to add an anchor to each individual point cloud to take into account later pose refinements. Would this still be necessary when using the AR foundation package?

    Code (CSharp):
    1.    
    2.     void Start()
    3.     {
    4.         pointCloudManager.pointCloudUpdated += PointCloudManager_pointCloudUpdated;
    5.     }
    6.  
    7.     private void PointCloudManager_pointCloudUpdated(ARPointCloudUpdatedEventArgs obj)
    8.     {
    9.         var points = new List<Vector3>();
    10.         obj.pointCloud.GetPoints(points);
    11.         globalCloud.AddRange(points);
    12.     }
    13.