Vuforia Digital Eyewear Sample - Vuforia not Initialised

Hi,

I developed a MR application for an iPhone, which used Vuforia's Model Target feature, that we are currently looking at porting over to a proper headset. We got a Magic Leap headset on loan and I've been trying to get the digital eyewear sample working without luck (Vuforia Digital Eyewear Sample | Packs | Unity Asset Store).

Nothing happened when I ran the sample with my added model target, in the console I had a PERMISSION_ERROR and saw that Vuforia was not initialising. I've allowed access to the camera when the application is launched as well as double checking that access to the camera is allowed through Settings -> Privacy -> Camera on the ML device.

After some digging it seems like delayed initialisation of Vuforia could work with an additional script to request permissions at runtime but I'm not sure how to implement that and also surprised that the sample would not work out of the box.

Any help appreciated on how to fix this or if there are any obvious permission settings I'm missing.

Unity Editor version: 2022.3.42f1
ML2 OS version: 1.8.0
Unity SDK version: v2.4.0
Host OS: Windows

Error messages from logs:
AndroidPlayer "Ml_Magic Leap 2@ADB:GA62XT0100K1:0" Vuforia Engine initialization failed: PERMISSION_ERROR

PERMISSION ERROR

One or more permissions required by Vuforia Engine are missing or not granted by user.
For example, the user may have denied camera access to this app.
In this case, you can enable camera access in Settings:
Settings > Privacy > Camera > Test
Also verify that the camera is enabled in:
Settings > General > Restrictions.
DefaultInitializationErrorHandler:SetErrorCode(VuforiaInitError)
DefaultInitializationErrorHandler:OnVuforiaInitializationError(VuforiaInitError)
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object, CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object)
System.Delegate:DynamicInvokeImpl(Object)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)

Hi @thorbjorg.petursdottir,

When you open your project and go to Project Settings > XR Plugin Management > OpenXR. What feature groups/features are selected? Also in Project Settings > Permissions. What ML Permissions are selected? This may help us figure out the cause of this issue. To cover more bases, you can also reach out to Vuforia as they may be able to help you as well.

You can also try to enable perception snapshots from the Project Settings -> XR Plugin Management -> OpenXR -> Gear icon next to MagicLeap 2 support.

Hi, many thanks for your reply! It magically started working all of a sudden, I did have the perception and permissions enabled.

Another thing I've come across is that the Vuforia model target tracking is a lot slower than what I expected it to be, given the power of the compute pack, it is almost the same as running the model tracking on an iPhone.

Just wondering whether you know if this is due to Vuforia integration with Magic Leap (not optimised) or whether there are any settings within Magic Leap/Unity that I can alter to increase the robustness of the tracking?

Many thanks,
Thorbjorg

I would reach out to the Vuforia support team and let them know that you are not able to reach the level of fidelity that you would like. On our end, I can recommend turning off any features/subsystems that are not being used outside of what is necesary for Vuforia model tracking.

Okay will do, when you say features/subsystems do you mean other things in the scene? My scene is quite minimal:
image

Or would removing any of these features help?

I'm not sure which features are used by Vuforia for object recognition. I would imagine that marker understanding is not necessary for that at the very least.

I would recommend reaching out to Vuforia to see what subsystems are necessary for this feature.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.