microsoft / mixedreality-qrcode-sample Goto Github PK
View Code? Open in Web Editor NEWA single repository of Mixed Reality samples in Unity.
License: MIT License
A single repository of Mixed Reality samples in Unity.
License: MIT License
Hi,
could the package also work on the meta Quest (3), using OpenXR? I am currently trying to get it to work.
Thank you!
For anyone like me who is just getting started: Meta Quest (3) currently does not support direct access to the camera feed, which is the main reason featuers like "QR-Code Tracking" don't exist yet.
I'm using Unity 2020.3.38f1c2, the closest available version to the official examples, and for MRTK, I'm using version 2.8.2.
I outputted 'issupported' and found it consistently false. In addition, I outputted 'accessStatus' and found it initially as 'DeniedBySystem', then changed to 'Allowed'. The specific runtime screenshots are as follows:
The code in the image below is within the QRCodeManager script
It is impossible to use this sample project in Remoting standalone app mode build for Windows while remoting to Hololens 2. In Unity editor, everything works fine.
It can be easily reproduced just by building the sample project targeting Windows standalone x64 and launching it. It will always give this error on start or anytime there is an attempt to initialize the QR code tracking
The error is the same also when remoting is correctly setup in the project and QR setup is only launched after the headset is succesfuly connected to the app on pc.
I have tried to temporarily include all necessary dlls in Windows environment path, which fixed the first error, but subsequently it gives the following error.
I have also tried to build the project with Il2CPP to find out if the issue is not only on Mono, but it is unbuildable on both pcs i tried it on. I should have all neccessary things for Visual Studio installed, i even added bunch of old optional stuff from Visual studio installer/Desktop development with C++ section that i figured could be linked to this problem, but no luck. I also build relatively often with Il2CPP and never had build issue like this.
I have Microsoft Visual C++ installed from 2005 all the way to 2022
I have tried every solution on both different computers, both give the same results.
Due to issue being with something with WinRT library, i have tried also OpenXR branch, which unfortunately gives the same errors. To me it appears there might be something wrong with how the QR tracking is linked to WinRT.
In Editor, there are these two special scripts to initialize important dlls on project start
Might this be a reason why everything works in Editor, but not in build?
Is there any known solution how to get QR code tracking working while Remoting to Hololens 2 from Standalone Windows app?
Which sample are you reporting a bug in?
MixedReality-QRCodeSample
Describe the bug
When trying to run/build the sample i get the following errors:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After installing the fundation and qr code packages no errors should remain in the project
Configuration
This sample currently uses MRTK2. It would be great to update to MRTK3 (I'll take an initial look at this!).
https://github.com/microsoft/MixedRealityToolkit-Unity/tree/mrtk3
Which sample are you reporting a bug in?
MixedReality-QRCode-Sample
Describe the bug
When I start my app, the QRCodeManager spawn multiple QRCode in the scene that has been seen in a previous session
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the QRCode Maanger to spawn only the QRCode shown to the camera after the app is started
Please add the Packages folders
Hey everyone,
this is a question, not a bug report. I was wondering if it is possible to obtain the pose of the QR code with Holographic Remoting? Unfortunately, I don't have a HoloLens currently - otherwise I would try myself.
Thanks!
Hello, I use Unity 2020.3.14f1 and remoting to Hololens 2 in editor, after fix some missing reference issue, everything is good, I can detect and track QR codes.
After I build a windows standalone, I get something like "... cannot find vcruntime140_app.dll ...", then I copy the dlls from Plugins folder to the the same folder of exe and a new error shows, a "COMExcpetion" error:
COMException
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <39cd5065f72f426c85b196a374d4b1db>:0
at WinRT.Platform.RoGetActivationFactory (System.IntPtr runtimeClassId, System.Guid& iid) [0x0000f] in <8f8054538ba54a4781946220bf85f841>:0
at WinRT.WinrtModule.GetActivationFactory (WinRT.HString runtimeClassId) [0x00015] in <8f8054538ba54a4781946220bf85f841>:0
at WinRT.ActivationFactory`1[T]..ctor () [0x00098] in <8f8054538ba54a4781946220bf85f841>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <39cd5065f72f426c85b196a374d4b1db>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.Activator.CreateInstance[T] () [0x00021] in <39cd5065f72f426c85b196a374d4b1db>:0
at WinRT.WeakLazy`1+<>c[T].<.ctor>b__2_0 () [0x00000] in <8f8054538ba54a4781946220bf85f841>:0
at WinRT.WeakLazy`1[T].get_Value () [0x00020] in <8f8054538ba54a4781946220bf85f841>:0
at WinRT.ActivationFactory`1[T].As[I] () [0x00000] in <8f8054538ba54a4781946220bf85f841>:0
at Microsoft.MixedReality.QR.QRCodeWatcher+Statics..ctor () [0x00000] in <8f8054538ba54a4781946220bf85f841>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <39cd5065f72f426c85b196a374d4b1db>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.Activator.CreateInstance[T] () [0x00021] in <39cd5065f72f426c85b196a374d4b1db>:0
at WinRT.WeakLazy`1+<>c[T].<.ctor>b__2_0 () [0x00000] in <8f8054538ba54a4781946220bf85f841>:0
at WinRT.WeakLazy`1[T].get_Value () [0x00020] in <8f8054538ba54a4781946220bf85f841>:0
at Microsoft.MixedReality.QR.QRCodeWatcher.IsSupported () [0x00000] in <8f8054538ba54a4781946220bf85f841>:0
at QRTracking.QRCodesManager+<Start>d__29.MoveNext () [0x0000f] in E:\20210615 EPBS ID4 AR\Projects\Unity_ID4AR\Assets\RemoteQRTrack\Scripts\QRCodesManager.cs:82
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <39cd5065f72f426c85b196a374d4b1db>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <39cd5065f72f426c85b196a374d4b1db>:0
at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <1c1473f1ae4d4d669c2e1ef28e35b413>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
What can I do to solve it?
It's possible to update the sample to MRTK3?
I'm working on a demo for the HoloLens 2 that requires the physical input of generated links. To workaround the laborious process of typing hundrets of letters on the HoloLens, I'm using QR-Codes.
Everything works as intended, when I print the QR-Codes on paper. The goal is to scan QR-Codes from my phone or computer display. Now the HoloLens seems to have big problems to recognize QR codes on digital displays. On my PC monitor I need to stare at it for a long time, to get it to scan and on my phone it never works.
I suspect that the reflection of the infrared light interfering with camera image might be the problem here. Does anyone have an idea how to tackle this?
Using the latest OS:
22621.1252.arm64fre.ni_release_svc_sydney_rel_prod.231108-1545
PS: The same happens in the main menu of the HoloLens, not just my application
Which sample are you reporting a bug in?
Latest commit in OpenXR branch
Describe the bug
When attempting to build the project for a desktop target of IL2CPP, it fails to build with the following error:
Creating library Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.lib and object Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.exp
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol RoGetActivationFactory referenced in function IL2CPPLinkage_RoGetActivationFactory_m28A995C87663759610B3651CE3C0531D7D1E411A
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsCreateString referenced in function IL2CPPLinkage_WindowsCreateString_m7A2ACFBAA6CF8ADB276044CD79B504D7FA70CBA4
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsGetStringRawBuffer referenced in function IL2CPPLinkage_WindowsGetStringRawBuffer_m43E89486907592139AB0D52752B2D8D483E4FEE6
j55xj1sds3ws.obj : error LNK2019: unresolved external symbol WindowsDeleteString referenced in function IL2CPPLinkage_WindowsDeleteString_m8175860EEA9E79F2F530A1EC165CE65FDD475933
Library\Bee\artifacts\WinPlayerBuildProgram\u1oik\GameAssembly.dll : fatal error LNK1120: 4 unresolved externals
This appears to be caused by issues in one of the DLLs included with the sample.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A working build is created
Actual behavior
Project fails to generate a working build
Additional context
Having the QR working with IL2CPP is critical for any project that has strict performance requirements. Having run into this issue in my main project I manage, I tested the samples to see if this IL2CPP build failure existed here as well. Sadly, it appears to. Because the internals of the Microsoft.MixedReality.QR are not public, this seems to be the best place to put this bug report. It would help the project I manage considerably if this build issue could be solved!
Hello Sir,
please help me to provide a solution for bellow issue.
QRCodeSample scene gives an error when try to upgrade the project in 2020.3.13 unity version. i will also installed Mixed Reality OpenXR Plugin and MixedReality ToolKit using mixed reality feature toolkit and Microsoft.MixedReality.QR but still the prefab scripts are missing.
In the HoloLens connected to Unity by Remoting, there is not QR pops up in the scene in front of the user.
The Unitys .meta files are missing for this repository, this invalidates the created prefabs as Unity loses track of the referenced scripts.
Unity .meta files should be stored in version control.
if I stop and start the Qr Code tracking the hololens starts to render the space partially and eventually crash without errors
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.