Localize the places mapped with the ARWAY Mapping app during run time.
The Localization scene allows you to localize your environment with the point cloud map created earlier using the ARWAY Mapping app.
It looks for feature points via your camera and tries to match those feature points with the point cloud data scanned earlier, thus localizing it to your environment.
This scene requires you to firstly map a real-world space with the ARWAY Mapping app and submit the map data.
Pose Setter Script:
Pose Setter is a script that takes ARSpace as input and then tries to localize it to the surrounding area during localization, at the origin (0, 0, 0).
Pose Setter (Script)
What is ARSpace?
ARSpace is a gameobject present in the Unity scene hierarchy, that localizes any content placed under it as a child, to the localized origin (0, 0, 0).
So, in order to display assets during runtime in the built application, the assets must be made a child of the ARSpace gameobject.
How to add content to ARSpace?
In order to add content to ARSpace, simply drag and drop the assets as a child gameobject to the ARSpace gameobject.
By default there is a Gizmo gameobject as a child of ARSpace, which shows the localized origin in the scene during runtime.
How to Use?
Step 1: Open the Localization scene found in the Assets/ARWAYSDK/Scenes folder within the Unity project.
Step 2: In the Hierarchy window, look for ARWAYSDK gameobject and then click on it.
Step 3: In the Inspector panel, look for Arway SDK Script and enter your unique Developer Token in the Developer Token field and save the scene.
ARWAY SDK (Script)
Step 4: After saving, add the current scene to the build scenes. Then choose the platform of your choice (Android/iOS) and build the application.
Step 5: Install the built app on your device and open it.
Step 6: Upon opening the app, give it the required permissions when asked. Click on the Select Cloud Map dropdown at the top and you should be able to see all the Point Cloud Maps created using the ARWAY Mapping App.
Step 7: Select the map which you want to localize from the list. The app will then download the required map data from the cloud servers and give a message "Setup Done".
List of Point Cloud Maps
Step 8: Now, you'll see a Runbutton at the bottom. Press that button to localize your surroundings with the selected point cloud map.
Run button appears after setup is done.
You will see a localization counter at the top representing the number of times your device has localized and the total number of attempts respectively.