MarkerDetector Status is "Pending", never "Ready"

Hello All,

I'm trying to follow the MarkerUnderstandingExample. I have MarkerTracking enabled in permissions for this project.

Any thoughts on what could keep MarkerDetector.Status stuck at Pending?
The code example includes an if statement that requires the MarkerDetector.Status be Ready to print detected data, and my MarkerDetector never seems to progress to this stage.

Many thanks for any help with this!

Give us as much detail as possible regarding the issue you're experiencing:

Unity Editor version: 2023.2.14.f1
ML2 OS version: 1.6.0
Unity SDK version:
Host OS: Windows

Error messages from logs (syntax-highlighting is supported via Markdown):

Hi @dliston,

Have you set the com.magicleap.permission.MARKER_TRACKING in the android manifest?

Best,

El

Yep, that box is checked. Is it true that the MarkerDetector will transition from Pending to Ready before it can pick up QR codes in the environment?

Here's my simplified script that uses components of MarkerUnderstandingExample, also tried the original script in its place.

QR.cs (10.3 KB)

Got it. It will probably be common sense that the app would need acccess to the camera, but I overlooked this and it wasn't mentioned in the instructions.

Correction, camera permissions are necessary but not sufficient ... there must be something else in the Unity project settings that blocks the MarkerDetection status from becoming "ready".

Here are my troubleshooting steps: I have two Unity projects running an identical QR.cs script (above) and permissions are identical. One program advances to MarkerDetection.Status == Ready and the other hangs at 'MarkerDetection.Status == Pending'.

Any thoughts or suggestions? THANKS!!

Yes the marker detector will switch between Pending and Ready every frame. Ready is when data can be polled while pending is when the Marker Detector is processing the frame.

@etucker will know more but I think you need to specify a size or enable estimate marker size in your script. Then Set a Marker Detector Profile:

        detectorSettings.QRSettings.EstimateQRLength = true;
        detectorSettings.MarkerDetectorProfile = DetectorProfile;
        detectorSettings.MarkerType = MagicLeapMarkerUnderstandingFeature.MarkerType.QR;

        markerFeature.CreateMarkerDetector(detectorSettings);

In the provided QR.cs script, it does seem to work in my project, however, the utilText.text variable is set to "PENDING" while the marker detector is pending during the update check. The marker tracker may not always have the Ready status every frame which may be causing the issue that you are running into.

Let me know if this helps and feel free to ask any further questions.

If you wanted to, you could create a coroutine that would wait until the marker detector had the ready status to update the marker representation object.

Best,

El

Hi El,

Thanks for trying out that script. In the Unity project I need to get working (editor: Unity 2023.2.14f1) I have never seen the (MarkerDetection.Status == Ready) and I still don't know why this is. I tried some variants that set the text based on this flag and it never seems to occur. Using simple programs using other editors (2022 LTS), I have seen the text update to that encoded by the QR code.

If you show a QR code to the program you have running (using editor 2023.2.14f1), does it successfully change the text box as expected? For me, I have never seen it work with editor 2023.2.14f1.

If you can confirm this, that would be helpful. There may be a settings issue.

Thanks!

Here's a simpler script that can help show what's happening. I can get this script to function using 2022 LTS where it will display "Pending" in red text superimposed with "0" in blue text (utilText.text = detector.Data.Count.ToString()). When I get a QR code within 5 inches of the ML2 (I'll fine-tune these settings later), it will display the proper text. It does a strange thing, however, where the display will blank for about 5-10 seconds before it shows the responsive text.

I didn't do anything special to set up the project ... just used the ML2 Setup Tool and ensured all the boxes are green, and set the two required permissions. For whatever reason, I can't replicate this behavior using the 2023 editor.

QR.cs (4.4 KB)

When it comes to developing for the Magic Leap 2 with Unity, we recommend using LTS versions exclusively as these are our development targets. It's likely that this issue is caused by the version that is being used.

Is there something in your project that requires the 2023 version of Unity?

Best,

El

Honestly, I was unable to get the OpenXR version of MarkerUnderstanding to work in a reproducible way in my app using either 2022 or 2023 editors. The MLSDK version of the MarkerDetectors seemed to work fine, however, so I will use this for the time being. I would prefer to transition to OpenXR but it seems too early.

Hi Dorion,

Thank you for speaking with us today.

Your ticket number is #34484.

Please send the video of the issue via this email chain.

Have a great evening.

Tyler
Magic Leap Customer Care.

Hello Tyler,

Thanks for looking into this. Attached please find a video of the display artifact on my headset.

You'll see that there is a red ghosted image that flashes up intermittently on the device SN G372XT100072.

Please let me know the next steps with this device.

Dorion