3

I'm working on Augmented reality using Project Tango. After loading adf file I place a 3d object to each positions those are marked during area learning process, and it adds 3d objects

I expected 3d object to be static as those objects were placed exactly on particular place using Coordinate object, but those get misplaced and even oscillating when I move camera

What I found to be the reason is whenever Tango gets connected, current position is taken as origin (0,0,0) and objects get placed (after recognising loaded adf, of course) relative to this origin

Is there any other way to precisely place 3d objects and making them static?

ABI
  • 1,536
  • 18
  • 38

2 Answers2

1

First, the position of object is relative to ADF that being saved. In order to get the object restores to the original location, you will need to get relocalized. That requires: 1. loading the ADF. 2. walk around the area and relocalize the device.

Tango Service start as (0, 0, 0) for the device with respect to start of service pair. But once the device is relocalized, app will start to receive the device with respect to area description frame pair's callback.

If you are using Unity, Area Learning example is doing exactly the same thing you are looking for.

xuguo
  • 1,816
  • 1
  • 11
  • 15
  • You're right, but is there any way to rectify the oscillations of objects – ABI Mar 22 '16 at 05:26
  • By rectify the oscillation, do you mean avoid the object "jumping" around in the space? I believe the "jump" is cause by the relocalization of device pose. If it's in AR, I don't think there's a way of improving that, because we will need to sync the timestamp between color frame and pose data. If it's not in AR, you could do some interpolation the device pose to smooth out the "jumps".. – xuguo Mar 22 '16 at 07:48
  • yes, I meant the same & oscillation occurs in AR only. I had seen some videos showing items in a supermarket with way marks. If it is not improvable, how could it be possible? – ABI Mar 22 '16 at 09:57
  • The "oscillation" shouldn't happen that often either. If you see it's oscillating all the time, it means the tracking is constantly losing in the space. That is most likely caused by the featureless environment. – xuguo Mar 23 '16 at 17:46
  • Found that changing device's position causes for invisibility and oscillation of the 3d objects, Is there any way to rectify this issue.. I need those objects to be static even when the device's pose changes. – ABI Apr 11 '16 at 10:30
  • Currently, there's no good way to make it stable as real object. But it should be within the reasonable range, how much of drift you are seeing from your application? – xuguo Apr 12 '16 at 21:33
  • I place 3d objects (after the adf is localised) at stored coordinates. When the device make a move, the 3D object placed in a coordinate follows the device. At times the placed 3D object is not visible from other places. Even when I tilt or rotate device the placed 3D objects become invisible. – ABI Apr 13 '16 at 07:15
  • @Json Guo, How may I get the pose wrt ADF and wrt Device after loading ADF? – ABI Apr 28 '16 at 06:42
  • @ABI, you can query it from PoseProvider.GetPoseAtTime, base frame is ADF, target frame is Device. – xuguo May 01 '16 at 22:38
  • I don't find any PoseProvider – ABI May 02 '16 at 11:00
  • Sorry, I though you are using Unity. C interface: https://developers.google.com/project-tango/apis/c/reference/group/pose#tangoservice_getposeattime Java interface: https://developers.google.com/project-tango/apis/java/reference/Tango.html#method-detail – xuguo May 03 '16 at 17:50
  • Could you tell me, What does ADF contain inside? – ABI May 10 '16 at 05:42
  • An ADF(Area Description File) is a file which is saving data for recognition of the learnt area. – Alfaplus Jul 19 '16 at 07:55
0

Probably if you are placing good the scene, is up to tangoCoordinateFramePairs: Normally if you are using an ADF file you should set :(in java)

   tangoCoordinateFramePairs.add(new TangoCoordinateFramePair(
    TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
    TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE));

Then in your render has to place correctly the scene.

Alfaplus
  • 1,713
  • 2
  • 19
  • 29