Log in or register to post comments

Using World Anchors with Vuforia Extended Tracking

May 2, 2017 - 8:09am #12

Hello

I use Vuforia to position a Hologram initially but then want to fix it and disable the tracking. Later I want to restart the tracking and re-position the object.

I would like to initially detect the Target, let it position the Hologram, disable Vuforia and set a WorldAnchor (through the WorldAnchorManager script from the Holotoolkit). At a later time I would like to re-activate the Vuforia tracking and move the object to the new target position.

I tried to do this in the OnTrackableStateChanged function. I can set the WorldAnchor and disable Vuforia through 

Quote:

VuforiaBehaviour.Instance.enabled = false;

in that function initially. But when I try to re-activate the tracking & positioning it does not work with WorldAnchors.

Of course I first called

Quote:

WorldAnchorManager.Instance.RemoveAllAnchors()

and then re-enabled the Vuforia tracking with 

Quote:

VuforiaBehaviour.Instance.enabled = true;

and then again disable vuforia and add a new anchor in the OnTrackableStateChanged function, but the object does not get moved to the new position of the image Target!

Whenever I set a WorldAnchor on a child of the ImageTarget it will never get moved to the new Targert positon even if I first remove the object. Is there maybe an Event when the re-positioning is done so I could add the new anchor there? Maybe it adds the anchor before the move by Vuforia happens?

Is there an Option for Vuforia to automatically manage WorldAnchors?

Using World Anchors with Vuforia Extended Tracking

May 2, 2017 - 4:56pm #11

Hello,

When running on HoloLens, Vuforia's Extended Tracking means that the pose has been handed off to the HoloLens spacial tracker. Thus, what I would suggest you do for you use case is:

  1. Enable Vuforia's tracker to detect the target (this happens by default)
  2. Monitor the TrackableBehaviour Status for EXTENDED_TRACKED
  3. Once EXTENDED_TRACKED is returned, disable the tracker via the TrackerManager class

At this point HoloLens is tracking the last pose of the target provided by Vuforia, and any subsequent changes to the position of the target will no longer be registered until to re-enabled the tracker, again using the TrackerManager class.

You may also find this article helpful: https://library.vuforia.com/articles/Solution/Working-with-the-HoloLens-sample-in-Unity

Thanks.

 

Using World Anchors with Vuforia Extended Tracking

May 3, 2017 - 5:09am #10

Hi @medabit thanks for your answer.

This only answers part of the question though. I tried to use the code TrackerManager.Instance.GetTracker<ObjectTracker>().Start() / .Stop() but I'm unsure if this is the correct tracker? It seems like I could not restart it afterwards.

My main questions concerns the WorldAnchors in Hololens. I would like to assign persistent WorldAnchors to the Holograms so that when I restart the experience, my Holograms will resume at their last place so I don't have to re-scan all Vuforia tags. My issue there is that when I add a WorldAnchor I am not able to re-engage tracking so that it re-positions the hologram. Even when I remove the Anchor before re-enabling the tracking it does not work. That's the main issue I want to solve.

Using World Anchors with Vuforia Extended Tracking

May 3, 2017 - 5:59pm #9

Hello,

chrigit wrote:

This only answers part of the question though. I tried to use the code TrackerManager.Instance.GetTracker<ObjectTracker>().Start() / .Stop() but I'm unsure if this is the correct tracker? It seems like I could not restart it afterwards.

Please explain your evidence that the tracker did not restart. Your syntax looks inconsistent with our examples:

ObjectTracker objectTracker = TrackerManager.Instance.GetTracker<ObjectTracker>();

objectTracker.Stop();  // stop tracker

chrigit wrote:

My main questions concerns the WorldAnchors in Hololens. I would like to assign persistent WorldAnchors to the Holograms so that when I restart the experience, my Holograms will resume at their last place so I don't have to re-scan all Vuforia tags. My issue there is that when I add a WorldAnchor I am not able to re-engage tracking so that it re-positions the hologram. Even when I remove the Anchor before re-enabling the tracking it does not work. That's the main issue I want to solve.

Sorry, I find this response confusing. First you say that you want holograms to resume their last location so you don't have to rescan Vuforia targets. Then you say you want to restart the tracker to re-position the holograms.

If you don't want to rescan the targets, then Vuforia cannot re-position the holograms. Perhaps you can you provide a clearer use case description?

Thanks.

Using World Anchors with Vuforia Extended Tracking

May 4, 2017 - 10:41am #8

The tracker did not restart in the way I expected. I have a voice command "reposition" bound to enabling the tracker again. I expected that if I disable the tracking, then move the tag to another place and restart the tracking, that it would detect the tag and move the associated holograms to it's location. This did not happen. Maybe I made a mistake so I will test this again.

I am sorry if I was not clear enough what I am trying to achieve. There are 2 parts:

1.) I want to be able to stop the tracking of the tag so that when I move around this tag, the holograms won't constantly be repositioned automatically. When I have tracking enabled and look at the tag from the side it sometimes misplaces the holograms. To counter that I want to wait for detection of the tag, let Vuforia move and position my holograms, then disable the tracking. At a later point I might move the tag but as I deactivated the tracking it won't automatically update the position of my holograms so I have to reactivate the tracking again to position the holograms at the tags new location. I achieved this disabling the VuforiaBehaviour.Instance and then later enabling it again as mentioned before. I could not get the same behaviour with the TrackerManager but I will try again.

2.) When I start the application, let the tag get detected so the holograms will automatically be positioned and then restart the app while the tag is not in view of the hololens, then the holograms will not appear at their previous place but at the default location I put them in unity. Holograms need a "WorldAnchor" https://developer.microsoft.com/en-us/windows/mixed-reality/world_anchor_in_unity assigned to them so that I can reload their position on the restart of the application. Setting, removing the WorldAnchors as well as re-loading them from a persistent store is no problem. The problem lies in combining the WorldAnchors with Vuforia: While a hologram has a WorldAnchor, it can't be moved so when I start the application, the holograms will load at the previous location but if I then let Vuforia detect the tag at another place, the holograms will not get moved there. So I should remove the WorldAnchors before scanning the tag so that the objects can be moved. BUT this does not work. Removing the Anchors does work but Vuforia will not place them at the tag location even after I removed the anchors. An example:

I start the Application, Vuforia detects the tag and places the holograms, I disable the tracking, I set a WorldAnchor on the object, I move the tag to a new location, remove the WorldAnchor from the object, re-enable tracking => Expectation: Vuforia detects the tag and moves the objects to the new location What happens: Vuforia detects the tag but does NOT move the objects to the new location.

 

(Extended Tracking is enabled on the tag)

Using World Anchors with Vuforia Extended Tracking

May 5, 2017 - 3:19pm #7

Hello,

Thank you for the detailed explanation. We'll investigate further.

Thanks.

Using World Anchors with Vuforia Extended Tracking

May 11, 2017 - 11:55am #6

Hello,

We are still investigating the issue. However, we have a question about your workflow:

chrigit wrote:

I set a WorldAnchor on the object, I move the tag to a new location...

By definition, is it not correct that an object can't be moved when it has a world anchor set? That is our understanding.

Please note that our internal world anchor mechanism can be turned off via DigitalEyewearARController.Instance.EnableWorldAnchorUsage(false) in case it causes problems with this use case.

Hope this helps.

Thanks.


Using World Anchors with Vuforia Extended Tracking

June 29, 2017 - 2:33pm #5

I have a very similar request.  I am using a Vuforia Image Target to initially place the Hologram but would then like to lock it in position and disable tracking.  My goal is that when a large item is placed and you walk a fair distance away from it, the object stays in the same place.  The image target is just used for the initial placing.  If anyone knows of an easy way to do this then please let me know.  

Using World Anchors with Vuforia Extended Tracking

July 26, 2017 - 1:37pm #4

Hi, I have a very similar request, I want to disable Vuforia, after i want apply to World Anchor to the hologram and after all I need my hologram stay on the same position.

For the time being, I managed to turn Vuforia off by a voice command with TrackerManager.Instance.GetTracker<ObjectTracker>().Stop(); or VuforiaBehaviour.Instance.enabled = false; but when i aplied the worldAnchorScript, the object will hide.

I think it is with ARCamera in hierrarchy, or with ImageTarget because when i dont use Vuforia It is fully functional.

I do not know what I'm doing wrong ,and I'm desperate.

Anyone any ideas?



In a simple sentence, I'd like to see the hologram on the picture   turn off Vuforia, Apply WorldAnchor to the hologram, and then i can walk around the hologram and hologram stay on the same place.

The hologram remains on the camera in the field of view and I do not know how to make the hologram stay on the same place.

Thank you!

Sorry for my bad English.

Jan.

Using World Anchors with Vuforia Extended Tracking

January 8, 2018 - 8:01am #3

Hello there, can you get the EXTENDED_TRACKING TrackableBehaviour status to work on HoloLens? I have tried monitoring the status but it just shows me “Failed to start extended tracking” all the time... :(

Using World Anchors with Vuforia Extended Tracking

January 16, 2018 - 12:07am #2

I solved that issue using different objects for recognition and anchoring, moving the second ones acording to recognition in the first. It requires moving the object to anchor when recognition is done and setting anchor (first you have to delete it if they were previously anchored). I also disable extended tracking for this application, as it doesn't work properly with anchored objects.

Using World Anchors with Vuforia Extended Tracking

May 25, 2019 - 11:13am #1

I am grasping at straws here, but in general if you want an object to stay in world position in AR you have to parent it to the AR stage. If not, the object is considered attached to the camera instead as if it were in a regular 3D scene with no tracking.

Log in or register to post comments