I am trying to create a simple scene where a few objects are placed on the table. Object placement works perfect but when I move the device, the objects drift around a bit. Which at one point makes the objects placed at the corner feel like they are not on the table but floating in the air.
Even in the sun moon and earth example in Unity examples here: https://github.com/googlesamples/tango-examples-unity The earth n moon drifts as you move the device
Is this a bug or is there any special setting which I'm missing?
The objects drift because as the Tango device moves through space, it is only tracking its own position in 3D space. For objects to remain static in a dynamic environment, the device needs to understand the position of the placed objects in 3D space and their relation to the surroundings in order to anchor the objects and reduce drift.
Luckily,
TangoCore
has you covered here and the 3 Core technologies of Motion Tracking, Depth Perception and Area Learning all work together to help out.If I'm not mistaken, the Sun and Moon example is the scene "SimpleAugmentedReality" under
tango-examples-unity / UnityExamples / Assets / TangoSDK / Examples / Scenes /
However if you would like to anchor the objects in 3D space and reduce drift, you'll need to use Area Learning and Depth Perception as well. Area learning performs Loop Closures as the device realises it has "seen" an area before and adjusts the path and markers to provide a more accurate device and augmented content position.
So here is what you can do to learn what you need to. Save your current scene, go to open Scene and follow this path
tango-examples-unity / UnityExamples / Assets / TangoSDK / Examples / Scenes /
and load up some of the other scenes to get an understanding of how the technologies intertwine.For example, you could load up the
ExperimentalMeshBuilderWithColour
scene, and learn how the Depth Processing works programmatically, and then load theMotionTracking
scene and learn how to access and use Motion Tracking from theTangoManager
Game Object. And finally (also probably most frustratingly difficult) learn how Area Learning is managed with theAreaDescriptionManagement
andAreaLearning
scenes.This will not only solve your drift issues, but also give you a much fuller understanding of the capabilities of the Tango Technology and allow you to express your ideas much easier.