ARCore Location – Android Studio

During our Research & Development sessions, an area of recent focus has been AR (Augmented Reality). If you’re unfamiliar with AR then have a short read of this to see how it could positively impact your business.

Predominantly our research was focussed around the newly released ARKit on iOS. During that time, Google announced their AR platform – ARCore. We started exploring the capabilities of each platform. Some of our experiments were based on locating objects in the real world using AR. One of the things we found was lacking in ARCore was the ability to use real world coordinates in the AR space. Whereas Apple with ARkit has integrations with core-location, such as ProjectDent, at the time of writing, there’s no equivalent projects for ARCore (Android).

This is where ARCore-Location comes in. We’ve developed a handy toolkit for developers to render just about anything at a GPS coordinate in AR, with just a few lines of code. It comes packaged with two example renderers – one to render an annotation, as can be seen in the image to the right, and one to render an image.

We’ve shown how you can create and use your own renderers in our example, showing a 3D object rendered at GPS coordinates.

Several challenges are presented when attempting to build this technology. One of which is that mobile phone compasses only have an accuracy of about 15 degrees, even when calibrated. For most applications this is adequate, but when trying to superimpose markers over the real world it can be very problematic. This is a problem we haven’t resolved, and welcome your ideas on how best to do so! You can create an issue request, or if you’d like to directly contribute, you can make a pull request with your improvements.

The internal bearing of true north used by ARCorelocation can be adjusted using:

locationScene.setBearingAdjustment( locationScene.getBearingAdjustment() - 1 );

The example project makes use of this when tapping the edges of the screen, so the user can manually adjust the bearing for higher accuracy.

The library works by creating Anchors in the AR scene. ARCore seems to struggle with Anchors that are further away than 100m, so for optimal performance, ARCorelocation caps the distance of the actual object/marker in Anchor terms to 50 metres away. Anchors are re-drawn into the scene on a loop every 8 seconds, which means that if the device is travelling quickly, the user may be able to catch up with a marker which is supposed to be distant. This could be improved by detecting travelling within AR or with location data, and updating the Anchors after a distance threshold is reached.

Find the repository on Github:

Old project without Sceneform? Try our legacy repository here:

Not a developer?

We’d love to help you with anything AR. Feel free to contact us, or read about what it is and how it could help your business.

Starting a new project?

Fill in the form below to download our brief of requirements template: