How it works
We do localization by basically trying to match a small 3D scan the client makes inside the initial, bigger scan, you made using InsidAR ScanApp.
1. Main Scan
It all starts with the main scan. You need to store the scans inside your location using InsidAR ScanApp on our servers. Please take into the consideration the Limitations.
2. Client App
The client app should use InsidAR Unity Package in order to be able to grab the 3D data inside your app as well. The translation/rotation offset between your scan and the main scan is by calling our API. The Unity package(Unity SDK reference) is able to:
- Provide the InsidAR Scan
- Offer methods for API Calls: Localization, Persistent Anchors CRUD, Maps CRUD
Right now our dashboard is at beginning. It can be used to visualize scanned maps and to move/place and see anchors inside a map. More features will be available soon.
** InsidAR Unity Package works over ARCore/ARKit 's SLAM system. For this we are actually use Unity's wrapper, ARFoundation. It is still in preview so future updates might be breaking for InsidAR. We used Unity 2018+ with ARFoundation 1.5.0 preview-5 and ARCore 2.1.0 preview 5. In case you try on other versions and it's throwing errors please Contact us and we will try to offer a working version as soon as possible.**
Open Unity Package
The InsidAR Unity Package contains all you need to make a localization app. Check out the example scene for how it works or follow the next steps in a new project!
- Open new Unity Project and import InsidAR package
- Import ARFoundation(1.5.0 preview 5) and ARCore(2.1.0 preview 5) from Package Manager
- Switch platform to Android
- Check 'Allow unsafe code' inside player settings. We do this since it's required for getting the image from AR Camera.
- If on Android set min API Level to at least 24 and set a correct package name.
- Add ARSession and ARSessionOrigin to scene (and delete the default camera)
- Add ARSession Origin to scene. Add ARPointCloudManager component to it. Select AR Camera and set tag to MainCamera
- Or - Drag our ARSessionOrigin to scene
- Drag the InsidARManager prefab in the scene
- Drag ARPointCloudManager to the empty attribute inside FeaturePointExtractor script of InsidARManager
- Drag the ARCamera under ARSessionOrigin inside InsidARManager - ComputerVision - CameraImageManager
- Setup the API Key inside InsidARManager script
That's it! Now you should be able to scan (FeaturePointExtractor) and API endpoints(NetworkManager)
Unity Package Reference
Here you can setup the main variables
This class manages the scan workflow
Switches between scanning and not scanning states. While this is opened the scan keeps growing.
Deletes all scan points
Methods for calling most API endpoints.
Object where the relative position/rotation from parent scan is stored. This is usually setup after response from calling MatchScan().
public delegate void OffsetPositionDomain(string response)
void MatchScan(string scanName)
The server can store multiple scans identified by the scanName. Triggers OnScanMatched and sets offsetPosition.
void GetScanNames(ProcessResponse callback)
Get a list with names of all your scans stored on the server.
Get positions of all stored anchors relative to the AR camera
Upload Anchors(string scanName, List<Vector3< positions)
Upload anchors on server