localjoost / qrcodeservice Goto Github PK
View Code? Open in Web Editor NEWShow a MRTK2 service to read (and position) QR codes using HoloLens 2
License: MIT License
Show a MRTK2 service to read (and position) QR codes using HoloLens 2
License: MIT License
please help me to provide a solution for bellow issue.
QRCodeService gives an error when try to upgrade the project in 2020.3.7 unity version. i will also installed Mixed Reality OpenXR Plugin using mixed reality feature toolkit.
issue is --> Assets\MRTKExtensions\QRCodes\SpatialGraphCoordinateSystemSetter.cs(20,17): error CS0246: The type or namespace name 'PositionalLocatorState' could not be found (are you missing a using directive or an assembly reference?)
I tried the code from the 'main' and 'changePackageName' branches on Unity 2019.4.17f1 and faced the same issue. The development console in the scene shows me: NullReferencePointer
Here is the debug log for your reference, the code got detected but nothing then happened on the scene.
Found QR code hello
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
MRTKExtensions.QRCodes.QRCodeTrackingService:SendProgressMessage(String)
MRTKExtensions.QRCodes.QRCodeTrackingService:QRCodeWatcher_Updated(Object, QRCodeUpdatedEventArgs)
WinRT.EventSource'3:Invoke(IntPtr, IntPtr)
WinRT.<>c__DisplayClass1_0:<_invoke>b__0(_Invoke)
WinRT.Delegate:MarshalInvoke(IntPtr, Action1)
WinRT.EventSource:_invoke(IntPtr, IntPtr, IntPtr)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Exception thrown at 0x76CF94FB in QRCodeService.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x1585D278.
Exception thrown at 0x76CF94FB in QRCodeService.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x1585F650.
Exception thrown at 0x76CF94FB (KernelBase.dll) in QRCodeService.exe: WinRT originate error - 0x80004003 : 'Invalid pointer'.
Exception thrown at 0x76CF94FB in QRCodeService.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x1585F8C8.
Exception thrown at 0x76CF94FB in QRCodeService.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Microsoft.MixedReality.QR.dll!67861C01: ReturnHr(79) tid(1698) 80004003 Invalid pointer
Msg:[winrt::hresult_error: Invalid pointer]
Exception thrown at 0x76CF94FB (KernelBase.dll) in QRCodeService.exe: 0x40080202: WinRT transform error (parameters: 0x80004003, 0x00000000, 0x00000027, 0x1585E790).
Hello,
I am attempting to use your demo QR code example that reads multiple QR codes and anchors objects to them as per your blog (https://localjoost.github.io/Showing-multiple-location-based-items-based-on-QR-codes-using-MRTK3-and-HoloLens-2/). I am relatively new to HoloLens development. I used the recommended version of Unity 2021.3.23f1 and all the other configurations mentioned in the MRTK3MultiQR branch. The code builds correctly but it does not show anything as UI on the HoloLens 2, the app just opens and shows nothing. I try to read QR codes, I also generated codes that link to https://localjoost.github.io but still the app shows nothing. Could please point me in the right direction?
Thank you
Hi, I want to try reading QRcode with your code. But I have some problems.
Before showing the situation, I get the code from your "openxr" branch.
And print QRcode in your blog. When I turn off the app, the green box shows above the QRcode.
When I build the Scene1, the text don't change after the "Initializing QR tracker attempt 1".
And when I build the Scene2, the airplane and tracker shows, but the QR displayer doesn't show the QRCode information like link .. or something.
I am trying to this so much time and I really want your help... Thanks
Hi, thank you for this post, it's very useful to understand better how hololens manage QR codes.
I cloned your project and use exact unity version to test if it works, but no qr codes detected.
"Initializing QR tracker attemp 1" is not updating.
Any advice?
Thank you so much!
Hello Joost,
I was trying to deploy this example to my HoloLens and found the VS2019 gave me the error "Certificate cannot be opened: WSATestcertificate.pkx ".
I encountered this issue before working on other projects - usually it can be fixed by regenerating a new certificate in Unity. I've tried to recreate one, delete the old one, recreate one again for a few times - making sure it's not expired/new. But every time it gives me the same error when it tries to build in VS.
I also tried to use the "fully built package" version mentioned in your post - it also gave me an error saying the publisher certificate could not be verified and suggested me to contact app developer when I attempted to open the package.
Any clues why? Thanks in advance!
First things first, thank you so much for sharing your amazing detection tool. You have maybe no idea how long I have been searching for implementation of QR code into Unity for Hololens2, this is amazing.
Although it detects the QR code (see debug log in image), there is no airplane appearing in the holographic render either in the editor space in Unity. It almost seems that the pose doesn't work in my case.
My env. : I just open the Unity project straight from your repo.
Here's a screenshot: https://i.gyazo.com/6750c319a46329cab26dcd9e42d89519.png
And here's the QR code I am trying to open: https://fiverr-res.cloudinary.com/images/q_auto,f_auto/gigs/144590579/original/61d0e370b940f1a5c0b7ec89c72ba8bab0dfb9b1/can-create-a-professional-and-amazing-qr-code.png
Thanks in advance and thank you again for this nice free tool!
Hello ,
thank you for this project.
I already tested the project on the main branch with unity 2019 , 3 months ago and everything works fine.
I tried to retest yesterday and there is a problem with the tracking for the two scenes (it manages to detect the qr code and display the plane but it displays nothing on the debug window nor the qr code information ( I tested the main , change package , bloc1 branches)
it sems like the information are not uploaded
Hello!
What do you think, is it possible to locate and mark multiple QR-codes at the same time? I mean the following:
We have two QR-codes: one with matching value and other with non-matching value. I would like to achieve that to mark the matched code with green and the non-matched code with red at the same time.
Is this implementation capable for this purpose?
Thank you!
Hello, @LocalJoost .it is a great project.
the unity version is : 2020.3.18
When I cloned the openxr branch, I found that there were some problems
Hello!
first of all thank you very much for your project. It works perfectly.
I am a beginner in programming for HoloLens 2, so my question is probably not directly for your project, but maybe you can help me.
The plane appears on the center of the QR code, but I want to use this QR code as an orientation to connect a local coordinate system in my space, for example from a robotic system, to the coordinate system of HoloLens2. So that the origins are the same and I can display a hologram on the Hololens with the coordinates from the robotic system. I don't know where in your project to access the coordinates and how to merge the systems.
Hello,
I tried to update the MRTK by importing with unitypackage they give on their repository but everything start to errors.
Is it possible to update the MRTK with this project? And if yes, how?
Hi, easy to solve issue here:
The first link in the readme.md is unfortunately a 404.
br,
Max
I get the following error when I try to port this project to Unity 2022.3.14f using MRTK2.8.
Assets\MRTKExtensions\QRCodes\SpatialGraphCoordinateSystemSetter.cs(20,17): error CS0246: The type or namespace name 'PositionalLocatorState' could not be found (are you missing a using directive or an assembly reference?)
Can you please help me fix this issue.
Thank you
Getting Following Exception in SendProgressMessage
get_isActiveAndEnabled can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function
Can u help me understand what may be the issue?
Hello, we use QRCode services for model positioning development, but errors will occur when using the function “”Unity-XR-Holographic Emulation / Hololens2-Holographic Remoting ”” .
The QRcode can be scanned during the first play, but its marker appears at the origin position(0,0,0) ,it isn’t positioned correctly.
After playing again, there will be an error called “ COMexception”
We Use
Hololens2
In UNITY2019.4 version plus MRTK 2.4 and 2.5.1, the same error will appear
I want to ask if there are any suggestions to improve this error.
Thank you very much!
Hello Joost
Just as an update on a issue I had with the "Microsoft.MixedReality.QR" code.
When running Unity Holographic Remoting on Play Mode, Unity became unresponsive/hanging and then crashed.
I assumed that it was something weird in Unity and so opened a support ticket.
After amazing support from unity it was pointed out that there was an infinite loop in then "QRCodeService" source.
Response from Unity Support.
We've been able to find the cause of this crash. When exiting Playmode and MonoBehavior.OnDisable() triggered, Time.time will be reset to 0.
In the QRTrackerController.cs script on line 33, this reset is causing an infinite loop as the following will always be true:
while (!MixedRealityToolkit.IsInitialized && Time.time < 5);
therefore causing the Editor to hang.
If you change the logic of the while statement to avoid triggering this infinite loop such as adding a condition like Time.time > 0 then the editor will not hang. Please let me know if this fixes the issue for you.
Best regards
After applying the recommendation the issue was resolved for me.
If possible could you please update accordingly.
Kind Regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.