Log in or register to post comments

How to obtain DeviceTrackableResults in Unity?

August 1, 2018 - 1:47pm #1

The Unity docs for PositionalTracker state:

"The PositionalDeviceTracker publishes DeviceTrackableResults that are are in world coordinate system and use a physical unit (meter)."

https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1PositionalDeviceTracker.html

This is nice, but how can I access this published information?! In the Unity docs, I cannot even find a reference to a DeviceTrackableResults type.

Could it be that this is a copy & paste error from the native docs and it hasn't been implemented in Unity?

How to obtain DeviceTrackableResults in Unity?

March 8, 2019 - 5:07pm #6

Hello @inayo,

I tried to fix my previous post but it still doesn't look good.

Unity Core samples, with Ground Plane, can be found here: https://assetstore.unity.com/packages/templates/packs/vuforia-core-samples-99026

Thanks,

Vuforia Engine Support

How to obtain DeviceTrackableResults in Unity?

March 8, 2019 - 4:57am #5

 medabit your example appears scrambled.

 

Also the Unity ground plane example has not been updated for Vuforia 8...

https://assetstore.unity.com/packages/templates/packs/vuforia-ground-plane-107216 

How to obtain DeviceTrackableResults in Unity?

August 3, 2018 - 11:23am #4

Hello,

I found the following in our Core Samples (/Assets/SamplesResources/SceneAssets/GroundPlane/Scripts/GroundPlaneUI.cs):

void OnDevicePoseStatusChanged(Vuforia.TrackableBehaviour.Status status, Vuforia.TrackableBehaviour.StatusInfo statusInfo)

    {

        Debug.Log("OnDevicePoseStatusChanged(" + status + ", " + statusInfo + ")");

        switch (statusInfo)

        {

            case Vuforia.TrackableBehaviour.StatusInfo.INITIALIZING:

                m_TrackerStatus.text = "Tracker Initializing";

                break;

            case Vuforia.TrackableBehaviour.StatusInfo.EXCESSIVE_MOTION:

                m_TrackerStatus.text = "Excessive Motion";

                break;

            case Vuforia.TrackableBehaviour.StatusInfo.INSUFFICIENT_FEATURES:

                m_TrackerStatus.text = "Insufficient Features";

                break;

            default:

                m_TrackerStatus.text = "";

                break;

        }

    }

Does this help?

Thanks,

Vuforia Engine Support

How to obtain DeviceTrackableResults in Unity?

August 3, 2018 - 6:33am #3

Thanks for your quick response, as always.

While you're at it: I spotted another (potential) inconsistency in the docs. In the description of TrackableBehaviour:

https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1TrackableBehaviour.html

there is a reference to an enum named "StatusInfo".

It would be pretty cool to get this extended status information somehow, if the Status is set to NO_POSE and you want to know why.

However, I could not find a way to actually retrieve a value based on StatusInfo. You can get the Status, for instance in the OnTrackableStateChanged() handler of the ITrackableEventHandler interface. But I have no clue how to access the StatusInfo? It's also not a member of the TrackableBehaviour objects either, there is only "CurrentStatus", but not "CurrentStatusInfo".

How to obtain DeviceTrackableResults in Unity?

August 2, 2018 - 1:55pm #2

Hello,

Appreciate the notice. Looking into it now.

Thanks,

Vuforia Engine Support

Log in or register to post comments