Start a new topic

QR code related data error

The Unity version is in use in 2021.3.32f and I am writing because I have a question regarding QR recognition

If you take a QR code, there are 3 cases

1. normal perception


Unity   : Marker added: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)


2. If there is a problem and the update continues, the values are crossed normally


Unity   : Marker added: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, QR, (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, QR, (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, QR, (4.42, 0.69, -8.63)/(0.22588, -0.66484, -0.67608, -0.22336)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, QR, (4.42, 0.69, -8.63)/(0.22588, -0.66484, -0.67608, -0.22336)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, QR, (4.42, 0.69, -8.63)/(0.22588, -0.66484, -0.67608, -0.22336)


3. If you continue to have problems


Unity   : Marker added: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)
Unity   : Marker updated: 0000000000000004-B400006F0AC201C0, , (0.00, 0.00, 0.00)/(0.00000, 0.00000, 0.00000, 1.00000)


There are three cases, and the reproduction code is as follows

Why these problems occur and if they are correct, when can they be fixed



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
namespace Qualcomm.Snapdragon.Spaces.Samples
{
    public class QRController : SampleController
    {
        public SpacesQrCodeManager arQrCodeManager;
        public Action<SpacesARMarker> OnAdded;
        public Action<SpacesARMarker> OnUpdated;
        public Action<SpacesARMarker> EventRemoved;
        public override void OnEnable()
        {
            base.OnEnable();
            arQrCodeManager.markersChanged += OnMarkersChanged;
        }

        public override void OnDisable()
        {
            base.OnDisable();
            arQrCodeManager.markersChanged -= OnMarkersChanged;
        }

        private void OnMarkersChanged(SpacesMarkersChangedEventArgs args)
        {
            foreach (var marker in args.added)
            {
                Debug.Log("Marker added: " + marker.trackableId + ", "+ marker.Data + ", " + marker.transform.position + "/" + marker.transform.rotation);
                OnAdded?.Invoke(marker);
            }

            foreach (var marker in args.updated)
            {
                Debug.Log("Marker updated: " + marker.trackableId + ", " + marker.Data + ", " + marker.transform.position + "/" + marker.transform.rotation);
                OnUpdated?.Invoke(marker);
            }

            foreach (var marker in args.removed)
            {
                Debug.Log("Marker removed: " + marker.trackableId);
                EventRemoved?.Invoke(marker);
            }
        }
    }
}



 

 


Could you please add some more information?

  • Version of the Snapdragon Spaces Services installed on the device 
  • Version of Snapdragon Spaces plugin for Unity used
  • Is the Device A3 or another one?
  • Screenshots of your setup in Unity including specifically the SpacesQrCodeManager setup and tracking modes 


Just for me to fully understand your problem; In your example the QR Code is instantiated at the coordinate center origin and doesn't move again right? Is it visible in the scene though? 

I remember we had a bug in an early version where a second QR code would get instantiated in the coordinate center origin and stay there, while the second would be tracked. It's possible you*re running into that issue.  

It was resolved through an internal meeting

Can you tell me when the next version will come out?

The current target release date for the next version of Snapdragon Spaces is set for beginning of September pending delay from quality assurance. 

Login to post a comment