Vuforia Engine provides pose status information on activated Observers at runtime for those that report pose information. This information can help you monitor and adapt to an Observer’s changing tracking status. For example, when the pose status changes, you can offer users directions and guidance using the pose status and status info.
The availability of pose status values depends on the Observer type. Furthermore, pose and status information are unavailable for Observers that do not report pose information, such as the BarcodeBehaviour
.
An Observer’s pose info is reported via Observations: If the pose information is available, information about the availability and reliability of the pose is reported as pose status and status info. The pose status describes the tracking state of the Observer during its lifetime and it is reported as 6 degrees of freedom pose. A pose status has an associated pose status info that provides further information on the Observer’s pose status.
The pose status and status info is available via the TargetStatus()
in the Unity C# API. The supporting pose status info information is reliant on the currently active Observers, e.g., ImageTargetBehaviour
.
You can choose under which pose status your Behaviours should be tracked in the Unity Editor by selecting an Observer Behaviour’s DefaultObserverEventHandler
component. See Using the Device Tracking in Unity for more information.
The pose status will be reported as NO_POSE until the Observer is detected for the first time.
VuMark, Image, Multi, and Cylinder Targets Pose Status and Status Info
The available pose status and status info provided on Observers of type: Image Target, Cylinder Target, Multi Target, and VuMark are identical. The table below lists the available pose status and associated status info values:
Status |
Status Info |
NO_POSE |
|
No valid pose available. The target is either not yet detected or tracking of it was lost. |
NOT_OBSERVED |
Provide the user with visual aid to identify the objects that can be tracked. |
|
TRACKED |
|
The target is being tracked - indicates normal operation. |
NORMAL |
Tracking working normally, and augmentations can be rendered. |
|
EXTENDED_TRACKED |
|
The target is tracked indirectly. It is either out-of-view, occluded, too-far or too-close to be tracked directly but its pose is maintained by the Device Pose Behaviour. Refer to Device Tracking for more details. |
NORMAL |
Tracking working normally. |
|
LIMITED |
|
The target is being tracked but only with very low accuracy. If your application requires exact target alignment, it is recommended to discard limited poses of targets. If accurate alignment is less of a concern, then using limited poses may provide a more continuous tracking experience. |
RELOCALIZING |
Motivate the user to return to the target if needed. |
Model Targets Pose Status and Status Info
A ModelTargetBehaviour
includes a unique status info which is reported when a Model Target is detected to be wrongly scaled:
Status |
Status Info |
NO_POSE |
|
Vuforia is trying to detect the target but a pose is not available yet. |
NOT_OBSERVED |
No actions required when this status info is reported. |
|
INITIALIZING |
|
The target is an Advanced Model Target that has not been recognized yet. We recommend showing a Viewfinder UI if you have multiple targets or a Symbolic Guide View for a single target. |
|
RECOMMENDING_GUIDANCE |
|
The target does not have an Advanced Guide View. We recommend showing a Guide View Overlay to assist the user in moving to a position where tracking can start. |
|
TRACKED |
|
The target is being tracked and indicates normal operation. |
NORMAL |
Circumstances are good, and augmentations can be rendered. |
|
WRONG_SCALE |
|
Vuforia detects a significant discrepancy between the target and the physical object. The target’s size is either too small or too large, up to a factor of 50x compared to the real-world size of the tracked object. The target will still track, but reported poses will not be in metrical coordinates. The target will appear at the wrong depth on HoloLens or Magic Leap. It is recommended to correct the scale. |
|
EXTENDED_TRACKED |
|
The target is tracked indirectly. It is either out-of-view, occluded, too-far or too-close to be tracked directly but its pose is maintained by the Device Pose Behaviour. Refer to Device Tracking for more details. |
NORMAL |
Motivate the user to return to the target if needed. |
|
WRONG_SCALE |
|
See TRACKED + WRONG_SCALE. It is recommended to correct the scale. |
|
LIMITED |
|
The target is being tracked but only with very low accuracy. If your application requires exact target alignment, it is recommended to discard limited poses of targets. If accurate alignment is less of a concern, then using limited poses may provide a more continuous tracking experience. |
RELOCALIZING |
Motivate user to return to the target if needed. |
|
WRONG_SCALE |
|
Vuforia detects a huge discrepancy between the target and the physical object. The target’s size is either too small or too large by more than a factor of 50x compared to the real word size of the tracked object. Tracking will not work reliably. Make sure to review and correct the scale of the Model Target. |
Area Targets and Anchors Pose Status and Status Info
Area Targets and Anchors do not report the pose status TRACKED but instead will report EXTENDED_TRACKED when tracking is working normally. AreaTargetBehaviour
and AnchorBehaviour
are always reported as NORMAL for extended tracked poses and RELOCALIZING for limited poses.
The following table lists the available pose status values for Area Targets and Anchors:
Status |
Status Info |
NO_POSE |
|
Vuforia is trying to detect the target or anchor point but a pose is not available yet. |
NOT_OBSERVED |
Guide the user to a starting position to start or re-enable tracking the environment. |
|
EXTENDED_TRACKED |
|
The target or anchor point is being indirectly tracked utilizing the Device Pose Behaviour and is set to operating normally. |
NORMAL |
Normal target or anchor point tracking conditions. Augmentations can be rendered with precise alignment. |
|
LIMITED |
|
The target or anchor point is being tracked but only with very low accuracy. If your application requires exact target alignment, it is recommended to discard LIMITED poses of targets. If accurate alignment is less of a concern, then using LIMITED poses may provide a more continuous tracking experience. |
RELOCALIZING |
A limited pose of a target or anchor point is known to have substantially larger inaccuracies than a normal extended tracked pose. Once the inferred pose of the target or anchor is estimated more accurately, it will again start to report extended tracked poses. |
Device Tracking Pose Status and Status Info
The Device Pose Behaviour represents the pose of the device with respect to the surrounding environment.
Device tracking uses Vuforia Fusion to utilize the core technologies available for each individual platform. Vuforia Engine abstracts away the information from the underlying platform and consolidates it with the pose status and status info.
The table summarizes the available values for the DevicePoseBehaviour
.
Status |
Status Info |
|
NO_POSE |
|
|
No device pose available. |
NOT_OBSERVED |
UNKNOWN |
Vuforia cannot determine a device pose or provide information on the reason. |
||
Reset the Device Pose Behaviour with Reset() or instruct the user to restart the entire AR experience when the situation is continuously reported for a certain length of time (e.g., 10 seconds). |
||
INITIALIZING |
||
The device tracking is initializing. |
||
Instruct the user to wait and to move the device slightly around. Vuforia reports this status using any provider to allow a consistent app behavior. On ARKit this is reported when no pose is delivered just after starting a ARSession. |
||
RELOCALIZING |
||
The device is trying to re-attach to the world and restore Anchor locations. |
||
Instruct the user to go back to a previously seen area. Reset the device pose or instruct the user to restart the entire AR experience when the situation is continuously reported for a certain length of time (e.g., 10 seconds). Some Anchors might not be reported after a relocalization. We recommend cleaning these up sometime after relocalization occurs. This status info is not reported on ARKit. In this status info, when using VISION_ONLY and detecting a previously undetected target, the device pose status switches to LIMITED/INITIALIZING after a short delay. This indicates that no relocalization occurred but internally the device pose was re-started. Previous mid-air anchors are lost. Other anchors and targets might be re-detected. |
||
LIMITED |
|
|
The device pose is of degraded quality. The application may advise the user to help recover a better device tracking. Anchor creation is not recommended. There are no guarantees about the accuracy or consistency of new anchors and creation may fail if there is not sufficient scene geometry. |
UNKNOWN |
|
Vuforia is not capable of providing information on the cause of the limited pose. |
||
Advise the user to hold the device still and check that lighting conditions are suitable and that the tracked area has sufficient visual features. A degraded 3-degree-of-freedom pose might be available as a fall back. |
||
INITIALIZING |
||
The device tracking is initializing. |
||
Instruct the user to move the device around to achieve better quality tracking. |
||
RELOCALIZING Only reported on ARKit |
||
The device is trying to re-attach to the world and restore Anchor locations. |
||
Instruct the user to return to a previously seen area. If the situation is reported for a certain length of time (e.g., 10 seconds), reset the device pose or instruct the user to restart the entire AR experience. Some Anchors/targets might not be reported after a relocalization. We recommend cleaning these up sometime after relocalization occurs. NOTE: The length of time depends on the expected user behavior and your use case. |
||
EXCESSIVE_MOTION Only reported on ARKit |
||
The device is being moved too fast. |
||
Instruct the user to move slower or hold the device still. |
||
INSUFFICIENT_FEATURES Only reported on ARKit |
||
The device is pointed at an area with very few visual features. While sensor readings support device tracking, the visual odometry system also relies on visual features in the environment. |
||
Instruct the user to point to an area with more visual features or check for proper lighting and contrast. |
||
INSUFFICIENT_LIGHT Only reported on ARCore |
||
Motion tracking is lost due to poor lighting conditions. |
||
Instruct the user to move to a more brightly lit area. |
||
TRACKED |
|
|
A reliable device pose is provided, and experiences are anchored with respect to the environment. |
NORMAL |
|
Normal device tracking conditions. |
||
Time to render your full augmented experience. NOTE: Hit test may still fail in certain cases (e.g., if insufficient scene geometry was discovered by the underlying platform or when pointing in a direction with no surface to hit). |
Handling of Status and Status Info in Unity
Most ObserverBehaviour
in Unity, including Image Targets, Model Targets, Area Targets and Anchors, come with the DefaultObserverEventHandler
that handles status updates out of the box.
By default, this event handler will show and hide augmentations parented to the target game object based on the current Status
. A dropdown in the inspector lets you configure which Status values should be considered for showing the augmentation.
For more complex use cases, you can directly subscribe to the OnTargetStatusUpdated
event of an ObserverBehaviour
. This event is available for all Observer Behaviours, including the DevicePoseBehaviour
and will be invoked whenever the OnStatusChanged
is triggered.
The following example shows a setup for subscribing and processing this event:
1234567891011121314151617181920212223Copyusing UnityEngine;
using Vuforia;
public class StatusEventHandler : MonoBehaviour
{
private ObserverBehaviour mObserverBehaviour;
void Awake()
{
ObserverBehaviour mObserverBehaviour = GetComponent<ObserverBehaviour>();
if (mObserverBehaviour != null)
mObserverBehaviour.OnTargetStatusChanged += OnStatusChanged;
}
void OnStatusChanged(ObserverBehaviour behaviour, TargetStatus status)
{
Debug.LogFormat("TargetName: {0}, Status is: {1}, StatusInfo is: {2}", behaviour.TargetName, status.Status, status.StatusInfo);
}
void OnDestroy()
{
if (mObserverBehaviour != null)
mObserverBehaviour.OnTargetStatusChanged -= OnStatusChanged;
}
}