Localize and navigate via a predefined map for specific use case scenarios
The Navigation scene allows you to localize your environment with the point cloud map created earlier using the ARWAY Mapping app and then navigate through the map via the content created on the ARWAY Web Studio within the Developer Portal.
You will need to add the Map_id and Cloud_id beforehand and then on runtime, 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. After localizing, you could select the navigation path which you wish to take.
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)
In order to navigate from the user's current location to the selected destination, NavController.cs and AStar.cs scripts are being used.
NavController, AStar (Script)
The Content Manager script allows you to give a predefined MAP_ID and CLOUD_ID to the scene thus allowing you to create single navigational content easier for specific use case scenarios.
Therefore, the user will be able to localize and view a specific map rather than go through a list of all the maps created to date.
Content Manager (Script)
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.
In order to add content to ARSpace, simply drag and drop the assets as a child gameobject to the ARSpace gameobject.
Step 1: Open the Navigation scene found in the
Assets/ARWAYSDK/Scenesfolder 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 Destination dropdown at the top and you should be able to see all the destinations added defined in the Content Manager script.
Step 7: Select the destination which you want to localize from the list. The app will then download the required map data from the cloud servers.
List of Destination from the dropdown menu
Step 8: Now, press the localize button after selecting your destination, to localize your surroundings with the selected map.
Press the localize button after selecting destination