Log in or register to post comments

lose track but keep object position in vuforia+unity

January 6, 2015 - 2:12am #16

I have a game object that tracking it with vuforia camera by a specific image target.

my problem is when I move far away from the marker but still vuforia camera see it , it change its position and rotation.

is there any way to keep game object position and orientation when lose track.

lose track but keep object position in vuforia+unity

January 9, 2015 - 12:11pm #15

You may want to consider the use of Extended Tracking, which allows tracking of targets even when they are move far / out of the field of view.

for more details, see:

https://developer.vuforia.com/resources/dev-guide/extended-tracking

 

lose track but keep object position in vuforia+unity

January 11, 2015 - 3:09am #14
Thanks for replaying.
 
I tried Extended Tracking before but  the object still changes its position and rotation.

lose track but keep object position in vuforia+unity

January 11, 2015 - 9:34am #13

The ability of Extended Tracking to accurately maintain a stable positioning is depending on the features richness in your environment; in general, as stated innthe developer guide, the more detailed and feature­rich the environment, the better Extended Tracking works.

So, perhaps you could try different environment setups (e.g. try your targets in  different rooms with different furniture or other scene details) to see if it makes a difference; good lighting conditions can also help here.

 

lose track but keep object position in vuforia+unity

January 14, 2015 - 12:29am #12

Execuse Me sir

I think that there are misunderstand here

I ended the phase of recognition which object was recognizied marker and appeared

what i ask for it is I write a script to move object far away from the marker , when I go far away from the marker the object is rotated upside-down and changed its position

Thanks for replaying 

I really appreciated your help 

lose track but keep object position in vuforia+unity

January 16, 2015 - 12:49am #11

 ...when I go far away from the marker the object is rotated upside-down and changed its position ...

That happens probably because at some point your target (when you are very far from it) is hardly visible in the camera view, which results in difficult tracking; that's why I was suggesting to use Extended Tracking to correct this behaviour and ensure stability of position and rotation; but if you mean something different, then you could try to explain it a bit more clearly; also, a small video documenting the issue would help understand it better.

 

 

lose track but keep object position in vuforia+unity

January 20, 2015 - 1:10am #10

Sorry sir for being late.

Here is the video.

https://www.dropbox.com/s/6nangnrd2zrjhzq/VIDEO0032.mp4?dl=0

Thanks in Advance.

lose track but keep object position in vuforia+unity

January 20, 2015 - 2:14am #9

Ok, thanks for the video !

So, based on the video and on your description, you want to know how to avoid that your augmentation, after dragging it out of the target zone, gets incorrectly oriented / positioned.

For that, you need to keep tracking of the position of your Image Target, even when the target goes out of view, so that the relative transformation between the camera and the world keeps somewhat consistent with the initial one.

The way to achieve this is by enabling Extended Tracking on your Target; however, this will only work if the amount of features in your environment (e.g. in your room, on your table, ..) are sufficient to allow Vuforia to maintain the tracking.

 

lose track but keep object position in vuforia+unity

January 21, 2015 - 1:59am #8

Thanks sir for the quick replaying.

In the video I already enabling extended Tracking.

Also my object is not a child of image target, so it doesn't related to marker.

So I don't understand why the object changing its position.

lose track but keep object position in vuforia+unity

January 21, 2015 - 5:07am #7

Also my object is not a child of image target, so it doesn't related to marker.

Ok, in the first half of the video, it seems the object is attached to the marker (Image Target); then, as soon as the target goes out of view, the object seems to be "detached" from the parent target and starts floating with a different logic.

Is that what is happening ? i.e. are you detaching the object form the marker when the target is out of view? 

 

lose track but keep object position in vuforia+unity

January 21, 2015 - 7:06am #6

AlessandroB wrote:

Is that what is happening ? i.e. are you detaching the object form the marker when the target is out of view? 

 

No sir I don't detaching my object. here attached photo to my hierarchy .

from the beginning the object is not a child from the image target.

AttachmentSize
Image icon hierarchy.png16.02 KB

lose track but keep object position in vuforia+unity

January 21, 2015 - 12:29pm #5

OK. So, if the augmentation is not child of any Target, then you must be using some custom logic (via script) to update the position of the model;

this sounds like an application logic issue... What is the relationship between the position of your augmentation object and the use of Vuforia ? Are you setting the position of the object based on the Image Target position via some custom mathematical relationship ?

 

lose track but keep object position in vuforia+unity

January 28, 2015 - 3:38am #4
Thanks sir for your reply
 

I'll describe my scenario in the following points to clarify the idea and problem:

 
1- I'v 3 objects
 
2- The object number 1 is a 3D model (it is augmented and child from the ImageTarget)
 
3- The object number 2 is a button (it is also augmented and child from the ImageTarget)
 
4- The object number 3 is an image (it is NOT a child from the ImageTarget and SHOULDN'T BE augmented)
 
5- I set the object number 3 to hidden at the application run time
 
6- When i scan the marker the 2 augmented objects appears (3D and button)
Until now there is no problem
 
7- When i click the button, the hidden image is set to visible (Please remember that it is NOT a child from the ImageTarget)
 
8- Although it is not a child from the ImageTarget and shouldn't be augmented i find it related to the marker and change it's position based on marker position (This is my problem)
 
i hope these points describe the problem well, i can also send you a sample of my project if you need
 
Thank you,

lose track but keep object position in vuforia+unity

January 28, 2015 - 5:23am #3

8- Although it is not a child from the ImageTarget and shouldn't be augmented i find it related to the marker and change it's position based on marker position (This is my problem)

 

OK; so, you can update the Position and Orientation of your Object, you can find the ImageTargets TrackableBehaviour at runtime, then get the Transform component of it, and extract the position and orientation from that Transform, in World Coordinates (i.e. using Transform.position and Transform.rotation):

http://docs.unity3d.com/ScriptReference/Transform.html

You can then set the position and orientation of your Object by deriving it from the one of the Trackable (plus adding any custom Offset translation / rotation).

If I understand correctly what you explained previously, even though there is no parent-child relationship between that specific object and the Trackable, however you are trying to set the position of your object by deriving them from the ones of the Trackable.

However, as soon as the Trackable gets out of view (tracking  lost), the position and orientation of the Trackable might get to an invalid / obsolete state; as a consequence, if your Object position is somehow mathematically derived from those of the Trackable, they will also be affected by the loss of tracking.

In case you are using Extended Tracking, the Trackable position and orientation will continue being tracked, which theoretically should ensure some "continuity" in the update of your Object position as well; however, if the environment does not provide a sufficient amount of features for Extended Tracking to work properly, then your Object might also be affected by this, as long as its position and orientation are derived from /related to the ones of the Trackable.

 

In addition, there is also another element to keep in mind, i.e. the use of a specific World Center Mode;   perhaps what you observe is also a consequence of the fact that, as soon as your target gets out of view, the World Center suddenly changes from the Target to the Camera; this might also explain why there is a sudden change of position and orientation.

To verify if this is the case, you can select the ARCamera in your Scene, and set the World Center Mode (in the Inspector) to CAMERA (instead of FIRST_TARGET)

Hope this helps.,

 

lose track but keep object position in vuforia+unity

January 29, 2015 - 1:10am #2

Thanks, Sir, for the quick replaying.

To verify if this is the case, you can select the ARCamera in your Scene, and set the World Center Mode (in the Inspector) to CAMERA (instead of FIRST_TARGET)

This solution is really helpful, it solved my problem.

Thank you ,Sir, on your spaciousness chest and your help.

lose track but keep object position in vuforia+unity

January 29, 2015 - 2:12am #1

You're welcome.

Log in or register to post comments