QRCodeService icon indicating copy to clipboard operation
QRCodeService copied to clipboard

Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8

Open thong63 opened this issue 2 years ago • 11 comments

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

Screenshot 2024-03-24 075733

thong63 avatar Mar 24 '24 13:03 thong63

I have no idea what branch you have used, but please refer to https://localjoost.github.io/Upgrading-reading-and-positioning-QR-codes-with-HoloLens-2-to-Unity-2020-+-OpenXR-plugin/ for using newer versions of Unity first

LocalJoost avatar Mar 24 '24 13:03 LocalJoost

Hi Joost,

I downloaded QRCodeService ‘slightly_improved_version’ from github LocalJoost/QRCodeService at slightly_improved_version (github.com)https://github.com/LocalJoost/QRCodeService/tree/slightly_improved_version I am trying to port it to Unity 2022.3.14f using MRTK 2.8 but run the error Missing PositionalLocatorState. Can you help me fix it?

Thank you,

@.***https://www.rockwellautomation.com/ Thong Nguyen Sr. Research Scientist 1201 South Second Street 5W21 Milwaukee, WI 53204 P 1–414-382-1685

From: Joost van Schaik @.> Sent: Sunday, March 24, 2024 8:07 AM To: LocalJoost/QRCodeService @.> Cc: Thong Nguyen @.>; Author @.> Subject: EXTERNAL: Re: [LocalJoost/QRCodeService] Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8 (Issue #19)

[Use caution with links & attachments]

I have no idea what branch you have used, but please refer to https://localjoost.github.io/Upgrading-reading-and-positioning-QR-codes-with-HoloLens-2-to-Unity-2020-+-OpenXR-plugin/https://urldefense.com/v3/__https:/localjoost.github.io/Upgrading-reading-and-positioning-QR-codes-with-HoloLens-2-to-Unity-2020-*-OpenXR-plugin/__;Kw!!JhrIYaSK6lFZ!pSWvcfmG1HYFRydzkZXxFA6K_D6Id8urKUGcnTSPVwbcTd--EJMCPTE_MjC0L89V2zY8-SwC-tcD5Bs2Jg2j-9d46OJywlhLVA$ for using newer versions of Unity first

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/issues/19*issuecomment-2016804047__;Iw!!JhrIYaSK6lFZ!pSWvcfmG1HYFRydzkZXxFA6K_D6Id8urKUGcnTSPVwbcTd--EJMCPTE_MjC0L89V2zY8-SwC-tcD5Bs2Jg2j-9d46OLok_CyvQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A662BUYUXZIOHPFBDCU5ZHLYZ3FWZAVCNFSM6AAAAABFFV3OM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHAYDIMBUG4__;!!JhrIYaSK6lFZ!pSWvcfmG1HYFRydzkZXxFA6K_D6Id8urKUGcnTSPVwbcTd--EJMCPTE_MjC0L89V2zY8-SwC-tcD5Bs2Jg2j-9d46OIrvf_m-w$. You are receiving this because you authored the thread.Message ID: @.@.>>

thong63 avatar Mar 24 '24 13:03 thong63

Please try this branch first https://github.com/LocalJoost/QRCodeService/tree/openxr

LocalJoost avatar Mar 24 '24 13:03 LocalJoost

Hi Joost,

I am surprised to receive your reply on Sunday. Thank you. I will give it a try. Have a good weekend.

@.***https://www.rockwellautomation.com/ Thong Nguyen Sr. Research Scientist 1201 South Second Street 5W21 Milwaukee, WI 53204 P 1–414-382-1685

From: Joost van Schaik @.> Sent: Sunday, March 24, 2024 8:17 AM To: LocalJoost/QRCodeService @.> Cc: Thong Nguyen @.>; Author @.> Subject: EXTERNAL: Re: [LocalJoost/QRCodeService] Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8 (Issue #19)

[Use caution with links & attachments]

Please try this branch first https://github.com/LocalJoost/QRCodeService/tree/openxrhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/tree/openxr__;!!JhrIYaSK6lFZ!tSNweQhj6O_kZv04nA6473KlqaBM991wsmSbYbjpvUFVne_5gtKT04jv9Ds4cMORpO77ZAfNcu0OjXzte8tU0zc47wh1iBSEbg$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/issues/19*issuecomment-2016807310__;Iw!!JhrIYaSK6lFZ!tSNweQhj6O_kZv04nA6473KlqaBM991wsmSbYbjpvUFVne_5gtKT04jv9Ds4cMORpO77ZAfNcu0OjXzte8tU0zc47wiah2jSJg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A662BU4NB3TLBWZUUASRY3LYZ3G6LAVCNFSM6AAAAABFFV3OM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHAYDOMZRGA__;!!JhrIYaSK6lFZ!tSNweQhj6O_kZv04nA6473KlqaBM991wsmSbYbjpvUFVne_5gtKT04jv9Ds4cMORpO77ZAfNcu0OjXzte8tU0zc47wh3e7dgKQ$. You are receiving this because you authored the thread.Message ID: @.@.>>

thong63 avatar Mar 24 '24 13:03 thong63

;) this QR stuff is a side project, not work, so you actually have a better change of getting an answer from me in the weekend and the (CET) evenings. Anyway, I was just between potting up some seedlings and sowing new flowers and veggies, so I was answering you in a short break between botanical activities

LocalJoost avatar Mar 24 '24 15:03 LocalJoost

Hi Joost,

It nice that you can sow and plant seeds. In Wisconsin, US, we just got 10cm of snow. ☹

I just finished deploying the QRCodeService-openxr using Unity 2022.3.14f1 with MRTK2.8.3. Unity successful created a Visual Studio solution but I get a note saying ‘QR tracking is not supported’ @.***

QR tracking not supported UnityEngine.Debug:Log (object) MRTKExtensions.QRCodes.QRCodeTrackingService:SendProgressMessage (string) (at Assets/MRTKExtensions/QRCodes/QRCodeTrackingService.cs:148) MRTKExtensions.QRCodes.QRCodeTrackingService:InitializationFail (string) (at Assets/MRTKExtensions/QRCodes/QRCodeTrackingService.cs:137) MRTKExtensions.QRCodes.QRCodeTrackingService/<InitializeTracker>d__40:MoveNext () (at Assets/MRTKExtensions/QRCodes/QRCodeTrackingService.cs:63) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<MRTKExtensions.QRCodes.QRCodeTrackingService/<InitializeTracker>d__40> (MRTKExtensions.QRCodes.QRCodeTrackingService/<InitializeTracker>d__40&) MRTKExtensions.QRCodes.QRCodeTrackingService:InitializeTracker () MRTKExtensions.QRCodes.QRCodeTrackingService:Initialize () (at Assets/MRTKExtensions/QRCodes/QRCodeTrackingService.cs:44) Microsoft.MixedReality.Toolkit.MixedRealityToolkit/<>c:<InitializeAllServices>b__68_0 (Microsoft.MixedReality.Toolkit.IMixedRealityService) (at .@.@./Core/Services/MixedRealityToolkit.cs:1035>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder (System.Action`1<Microsoft.MixedReality.Toolkit.IMixedRealityService>) (at .@.@./Core/Services/MixedRealityToolkit.cs:1158>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeAllServices () (at .@.@./Core/Services/MixedRealityToolkit.cs:1035>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeServiceLocator () (at .@.@./Core/Services/MixedRealityToolkit.cs:560>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeInstance () (at .@.@./Core/Services/MixedRealityToolkit.cs:678>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:RegisterInstance (Microsoft.MixedReality.Toolkit.MixedRealityToolkit,bool) (at .@.@./Core/Services/MixedRealityToolkit.cs:830>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:get_Instance () (at .@.@./Core/Services/MixedRealityToolkit.cs:653>) Microsoft.MixedReality.Toolkit.MixedRealityToolkit/EditorEventListener/<>c:<.cctor>b__1_1 () (at .@.@./Core/Services/MixedRealityToolkit.cs:1573>) UnityEditor.EditorApplication:Internal_CallHierarchyHasChanged ()

I successfully deploy the application to a Hololens. However, it does not pick up my QR Code

@.***

Hololens screen capture @.***

Can you suggest what I need to do to fix this issue?

Thank you very much for your support.

@.***https://www.rockwellautomation.com/ Thong Nguyen Sr. Research Scientist 1201 South Second Street 5W21 Milwaukee, WI 53204 P 1–414-382-1685

From: Joost van Schaik @.> Sent: Sunday, March 24, 2024 10:15 AM To: LocalJoost/QRCodeService @.> Cc: Thong Nguyen @.>; Author @.> Subject: EXTERNAL: Re: [LocalJoost/QRCodeService] Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8 (Issue #19)

[Use caution with links & attachments]

;) this QR stuff is a side project, not work, so you actually have a better change of getting an answer from me in the weekend and the (CET) evenings. Anyway, I was just between potting up some seedlings and sowing new flowers and veggies, so I was answering you in a short break between botanical activities

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/issues/19*issuecomment-2016841068__;Iw!!JhrIYaSK6lFZ!uTy7W_XMRZrwwL07xU1Iq873rLH-ustsM-zmUU_66kVxydwe__OvMJ0uFqY5qAPXXcrjvDceS5-gZjsQdwxlLE4EFPD8CGgMqg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A662BU3KOLXWLT7KNPVXEALYZ3UXRAVCNFSM6AAAAABFFV3OM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHA2DCMBWHA__;!!JhrIYaSK6lFZ!uTy7W_XMRZrwwL07xU1Iq873rLH-ustsM-zmUU_66kVxydwe__OvMJ0uFqY5qAPXXcrjvDceS5-gZjsQdwxlLE4EFPAb-sfFYw$. You are receiving this because you authored the thread.Message ID: @.@.>>

thong63 avatar Mar 24 '24 15:03 thong63

First of all, I should add that both potting and sowing took place in the attic hobby room, not outside. We don't have snow here, but it's way too cold for sowing outside. "QR tracking is not supported" you get in the editor only, because the QR tracking only works it in HoloLens. So if you try to run in the editor, you get this warning. Duh ;) You can deploy in HoloLens, but it does not pick your QR code. What are you using for QR code? It does not recognize just any old QR code, it searches for a specific a QR code. Which you can plainly see in the editor. The sample you have downloaded look for a QR code having "https://localjoost.github.io" as a payload. As it also says so on my blog: https://localjoost.github.io/Positioning-QR-codes-in-space-with-HoloLens-2-building-a-'poor-man's-Vuforia'/#tracker1

Did you read my blog, or did you just pull the code and tried it to get to work?

LocalJoost avatar Mar 24 '24 16:03 LocalJoost

Hi Joost,

Thank you for pointing out my mistake. I read both ‘Reading QR codes with an MRTK2 Extension Serivce’ and ‘Upgrading reading and position QR Codes with Hololens 2 to Unity 2020 + OpenXR plugin’ and forgot about your original post. I was so focused on porting to Unity 2022 with MRTK 2.8.3 that I forget that this code looks for a payload ‘https://localjoost.github.io’ . I was expecting the app will show the received payload even if it is not ‘https://localjoost.github.io’.

Thank you. I got it working.

@.***https://www.rockwellautomation.com/ Thong Nguyen Sr. Research Scientist 1201 South Second Street 5W21 Milwaukee, WI 53204 P 1–414-382-1685

From: Joost van Schaik @.> Sent: Sunday, March 24, 2024 11:11 AM To: LocalJoost/QRCodeService @.> Cc: Thong Nguyen @.>; Author @.> Subject: EXTERNAL: Re: [LocalJoost/QRCodeService] Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8 (Issue #19)

[Use caution with links & attachments]

First of all, I should add that both potting and sowing took place in the attic hobby room, not outside. We don't have snow here, but it's way too cold for sowing outside. "QR tracking is not supported" you get in the editor only, because the QR tracking only works it in HoloLens. So if you try to run in the editor, you get this warning. Duh ;) You can deploy in HoloLens, but it does not pick your QR code. What are you using for QR code? It does not recognize just any old QR code, it searches for a specific a QR code. Which you can plainly see in the editor. The sample you have downloaded look for a QR code having "https://github.com/LocalJoost/https://urldefense.com/v3/__https:/github.com/LocalJoost/__;!!JhrIYaSK6lFZ!sitVY-YtIDCwtWQeXNpZCBDY-z0U35M9KPHOtXDypaGnZ1bNdjYZmtekrYHqdNdL503BgaThbUVxjwHMHuPtXU90gaS0XckpPg$" as a payload. As it also says so on my blog: https://localjoost.github.io/Positioning-QR-codes-in-space-with-HoloLens-2-building-a-'poor-man's-Vuforia'/#tracker1https://urldefense.com/v3/__https:/localjoost.github.io/Positioning-QR-codes-in-space-with-HoloLens-2-building-a-'poor-man's-Vuforia'/*tracker1__;Iw!!JhrIYaSK6lFZ!sitVY-YtIDCwtWQeXNpZCBDY-z0U35M9KPHOtXDypaGnZ1bNdjYZmtekrYHqdNdL503BgaThbUVxjwHMHuPtXU90gaQY_YfK8A$

Did you read my blog, or did you just pull the code and tried it to get to work?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/issues/19*issuecomment-2016856463__;Iw!!JhrIYaSK6lFZ!sitVY-YtIDCwtWQeXNpZCBDY-z0U35M9KPHOtXDypaGnZ1bNdjYZmtekrYHqdNdL503BgaThbUVxjwHMHuPtXU90gaRXd2WdlQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A662BU76AVZ4DXEJ5PHPEOLYZ33H3AVCNFSM6AAAAABFFV3OM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHA2TMNBWGM__;!!JhrIYaSK6lFZ!sitVY-YtIDCwtWQeXNpZCBDY-z0U35M9KPHOtXDypaGnZ1bNdjYZmtekrYHqdNdL503BgaThbUVxjwHMHuPtXU90gaTLCgmBxA$. You are receiving this because you authored the thread.Message ID: @.@.>>

thong63 avatar Mar 24 '24 17:03 thong63

Great to to hear that. Yeah, the samples evolved a bit over time and became more elaborate. Of course, you can change the code to respond to any QR code pretty easily, but my idea was that it would do different things for different QR codes. So I checked it to only respond to one single code. My latest sample with QR codes actually shows responses to multiple different QR codes, dunno if that is interesting to you :) https://localjoost.github.io/Showing-multiple-location-based-items-based-on-QR-codes-using-MRTK3-and-HoloLens-2/

LocalJoost avatar Mar 24 '24 17:03 LocalJoost

Hi Joost,

I need to recognize the QR payload and then act on the payload using switch/case statement in my code. I am using MRTK 2.8.3 and not MRTK3 because version 2.8.3 supports multiple platforms including Android and iOS. Thank you for getting over the hump. I tried 3 three different projects until you steer me to the openXR version. The previous 3 projects don’t work with Unity 2022 and MRTK.

Thank you. I would love to go out to lunch or dinner with you to learn more of about your work!

@.***https://www.rockwellautomation.com/ Thong Nguyen Sr. Research Scientist 1201 South Second Street 5W21 Milwaukee, WI 53204 P 1–414-382-1685

From: Joost van Schaik @.> Sent: Sunday, March 24, 2024 12:17 PM To: LocalJoost/QRCodeService @.> Cc: Thong Nguyen @.>; Author @.> Subject: EXTERNAL: Re: [LocalJoost/QRCodeService] Missing PositionalLocatorState when port to Unity 2022.3.14f using MRTK2.8 (Issue #19)

[Use caution with links & attachments]

Great to to hear that. Yeah, the samples evolved a bit over time and became more elaborate. Of course, you can change the code to respond to any QR code pretty easily, but my idea was that it would do different things for different QR codes. So I checked it to only respond to one single code. My latest sample with QR codes actually shows responses to multiple different QR codes, dunno if that is interesting to you :) https://localjoost.github.io/Showing-multiple-location-based-items-based-on-QR-codes-using-MRTK3-and-HoloLens-2/https://urldefense.com/v3/__https:/localjoost.github.io/Showing-multiple-location-based-items-based-on-QR-codes-using-MRTK3-and-HoloLens-2/__;!!JhrIYaSK6lFZ!v2sjvggFh3cwRALLGMqVxjaM6qSlCVKwzSAvql2JpPlJxd9gKGEKHQdJbJkmtttbvyuElvCOdJkDBEh_NEoOReRKoAaPnbH70g$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/LocalJoost/QRCodeService/issues/19*issuecomment-2016876446__;Iw!!JhrIYaSK6lFZ!v2sjvggFh3cwRALLGMqVxjaM6qSlCVKwzSAvql2JpPlJxd9gKGEKHQdJbJkmtttbvyuElvCOdJkDBEh_NEoOReRKoAaf3n4Jdg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A662BUYM62MEMBKGSD6SETDYZ4DCBAVCNFSM6AAAAABFFV3OM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHA3TMNBUGY__;!!JhrIYaSK6lFZ!v2sjvggFh3cwRALLGMqVxjaM6qSlCVKwzSAvql2JpPlJxd9gKGEKHQdJbJkmtttbvyuElvCOdJkDBEh_NEoOReRKoAZb2XxpLg$. You are receiving this because you authored the thread.Message ID: @.@.>>

thong63 avatar Mar 24 '24 19:03 thong63

Great to hear it got you going. Interesting you state your reason for sticking with MRTK2.8.x is multi platform support. Did you notice this little side panel left bottom on my blog? image

I think MRTK3 is even more suited to multi platform support than 2. And since MRTK2 is now in 'maintenance mode', this mean it won't support newer and future Unity versions. While I have already seen announcements of provisionary MRKT3 implementation on Apple Vision Pro by a community member. In addition, you might want to take into consideration the QR tracking and positioning code in my samples uses a library that utilizes a native HoloLens API that works on HoloLens 2 - and HoloLens 2 only.

Thank you. I would love to go out to lunch or dinner with you to learn more of about your work!

You are welcome. This is what MVPs do. About that lunch or dinner - sounds like fun, but there is the minor detail of me living about 4000 miles away from Wisconsin. That distance, as well as the Atlantic Ocean, makes dropping by bit tricky ;). Should you find yourself for some reason near Amersfoort, the Netherlands in the future - please drop by.

Good luck.

LocalJoost avatar Mar 24 '24 19:03 LocalJoost