Topic has a solution and is locked
Log in or register to post comments

ObjectTarget Placement

December 1, 2016 - 6:21am #1
Topic solved

Hi,

 

I am trying to use Vuforia together with HoloLens to recognize a target object I have previosly scanned using the Vuforia Object Scanner. The target is being recognized perfectly fine and this works pretty good. However, I can't position holograms on my target to augment it with virtual elements.

 

Even when I place a hologram at position (0,0,0) in local coordinates in my object target prefab, it does not appear at this position once running. There's always some offset. Also the position of my holograms depends on where I am actually standing when the target is recognized. This shouldn't be the case.

 

I know this is actually some pretty hard stuff to implement, but as I understand Vuforia should be able to take care of this. It's what it is made for. I have read this post: https://library.vuforia.com/articles/Solution/How-To-Align-Digital-Content-on-an-Object

But it doesn't really help unfortunately.

 

Thank you for any help in advance!

 

Greetings,

Dino

ObjectTarget Placement

June 18, 2019 - 10:03am #11

Did you ever find a solution to the offset problem? I'm having this issue now, even with the latest version of vuforia.

ObjectTarget Placement

February 28, 2019 - 3:37am #10

I didn't run into this issue. But you are right, if you keep tracking it will always override the current placement. Unfortunately my previous solution also only worked for a specific small target and I am facing this offset issue now again with a new larger target.

ObjectTarget Placement

January 11, 2017 - 5:13am #9

I have now a solution, that works for me at the moment. It is not perfect, but I guess there will be a corrected version available by Vuforia sooner or later.

Since my colleague and me figured out, that the augmented object is always in the right direction and only the distance is whats wrong, I have written a workaround to correct that. At the moment Vuforia trys to hold the augmented object in a position in space, such that you see it through the HoloLens exactly at the position of the recognized object. Unfortnunately, norrmally you don't see it due to the depth impression.

Because the correction OnTargetFound is overwritten (see previous comment), my correction applies if extended tracking is activated. The rest of the time the augmented object is flying around, looks very wierd. You can set it invisible during this phase, if you like.

There is still an offset of 3 cm in z axis, that I can't explain, but it's corrected in the code below.

Hope that helps anyone!

ObjectTarget Placement

January 11, 2017 - 5:06am #8

-- deleted comment --

ObjectTarget Placement

January 3, 2017 - 12:40am #7

DinoF wrote:

since I want to track my object only once and then disable vuforia tracking and keep it in place, I didn't run into this issue. But you are right, if you keep tracking it will always override the current placement.

 

How did you disable Vuforia once an object is tracked? I tried different proposed solutions but none of them seems to work.

ObjectTarget Placement

December 27, 2016 - 3:54am #6

Hello,

 

since I want to track my object only once and then disable vuforia tracking and keep it in place, I didn't run into this issue. But you are right, if you keep tracking it will always override the current placement. Unfortunately my previous solution also only worked for a specific small target and I am facing this offset issue now again with a new larger target. 

Please, if you find any good solution let me know too :)

ObjectTarget Placement

December 20, 2016 - 1:57am #5

Hello,

thank you for that solution! Unfortunately, it doesn't work for me since the new transformation is overwritten by Vuforia after the OnTrackingFound() event (as far as i can comprehend that - if I set a new position in the Update method, it hast an effect, but that's obviously not desirable) . How did you managed to work around that?

 

Thanks!

ObjectTarget Placement

December 9, 2016 - 12:36am #4

Hello,

 

I've managed to fix my problem by applying the following position transformation in the TargetFound handler of my ITrackableEventHandler:

var camera = Camera.main;

var headPosition = camera.transform.position;

var targetPosition = gameObject.transform.position;

           

var positionDelta = targetPosition - headPosition;

var factoredDelta = 0.5f * positionDelta;

gameObject.transform.position = targetPosition - factoredDelta;

 

So, when the target is found, I have to take the hololens (user's head) position into account. This way, I get perfect placement.

 

I hope this can help someone.

 

Greetings

ObjectTarget Placement

December 2, 2016 - 2:03am #3

Hello,

 

yes I did. By #7 you mean the Landscape Left setting? It is set (can't actually select anything else). It feelds kind of like my the coordinate systems do not match. When I e.g. move away from my actual real world target, the hologram does too, but in the opposite direction. Similar when I move to the left, the holograms appears a bit more to the right.

 

I have relly no idea how to fix this.

 

Thanks

ObjectTarget Placement

December 1, 2016 - 4:52pm #2

Hello,

Have you closely followed the documentation? https://library.vuforia.com/articles/Training/Developing-Vuforia-Apps-for-HoloLens

Sounds like it could be related to #7 in section Building and executing a Vuforia app for HoloLens.

Thanks

Log in or register to post comments