LocalJoost / BlogComments

This repo is solely used for comments on https://localjoost.github.io/
4 stars 0 forks source link

Comments on "Positioning QR codes in space with HoloLens 2 - building a 'poor man's Vuforia'" #372

Open LocalJoost opened 3 years ago

LocalJoost commented 3 years ago

Original article: https://localjoost.github.io/Positioning-QR-codes-in-space-with-HoloLens-2-building-a-'poor-man's-Vuforia'/

Yourismus commented 3 years ago

Hello @LocalJoost :) Very Awesome project!!

I have tried to get the project onto my HoloLens. Everything worked and the app is able to recognize the qr code.

But somehow the marker and the plane are not displayed. Have you experienced this issue and could help me with this?

LocalJoost commented 3 years ago

Can you please post a little movie of what you are seeing? And what branch are you building, with what scene?

Yourismus commented 3 years ago

The scene i am building is Assets/App/Scenes/SampleScnene2.Unity I have attached a video. The app recognizes the qr code and the link but doesnt display the hologram

https://user-images.githubusercontent.com/75693995/109004218-c06ec400-76a8-11eb-98f3-a6eff6ae1b26.mp4

LocalJoost commented 3 years ago

I have no idea. Maybe try holding the QR code a bit higher up to the camera, move your head up and down a little? It works fine here

https://user-images.githubusercontent.com/4129183/109012812-b651c300-76b2-11eb-94db-f8cf7b557c48.mp4

Yourismus commented 3 years ago

Hm okay thank you. I will test it again.

loleklel commented 3 years ago

is there any possibility to get alignment with more than 1 QR?

LocalJoost commented 3 years ago

What do you mean exactly? You can of course use two QR codes mark two corners of a larger object. Is that what you mean?

loleklel commented 3 years ago

Hi,

I was thinking about an alignment virtual 3D object in real-world objects using QR codes. Is there maybe another way how to get the perfect alignment? I just found World Locking Tools, do you have any experience with this??

thanks in advance, Robin

út 2. 3. 2021 v 20:14 odesílatel Joost van Schaik notifications@github.com napsal:

What do you mean exactly? You can of course use two QR codes mark two corners of a larger object. Is that what you mean?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LocalJoost/BlogComments/issues/372#issuecomment-789147381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5QM5UJB7UBPPJKQUEXB23TBU2LDANCNFSM4XASHTUA .

LocalJoost commented 3 years ago

I am a bit confused. That is exactly what my sample is doing, right? Showing a marker - and an airplane - exactly matched to the position and location of the QR code?

loleklel commented 3 years ago

what I need is that the physical object will be alignment with the virtual one but not necessarily with QR code. I want to align the physical object, not the QR code. If I do it with one QR code then it will be not accurate enough...

LocalJoost commented 3 years ago

Ah. I see. You want to align without a QR code. I that case, have a look at Azure Spatial Anchors. It's in public preview now if I am not mistaken.

AnandMulay commented 3 years ago

Hello Sir, I'm using unity LTS version 2019.4.24, and it's not reading the QR code, other settings are the same as you've mentioned in blog 2, using the latest blog2 git code, which shows updated 14 days back. should I use the older LTS version 2019?

LocalJoost commented 3 years ago

Hi @AnandMulay ,

The annoying thing is I get mailed by all kinds of developers claiming they did 'exactly like me' save for that one thing they fail to remember of tell me. You give me very little context to work with. I suppose you are a developer. If this is all the info you get, would you be able to tell something?

I downloaded my code fresh from GitHub and it worked the first time. So what you are going to do is give me more information than that you are only a slightly different version of Unity.

Then send me the movie and the QR code you are using.

DWishR commented 3 years ago

Just wanted to say thank you. Your finding of WorldManager.GetNativeISpatialCoordinateSystemPtr() saved me from having to import any of the XR packages that break my version of MRTK, glad to find it in your code as opposed to the samples. Greatly appreciated!

mar-cry commented 3 years ago

Hello sir, what kind of QRcode should be used in your qrcode detection project, meaning what messages should qrcode contain? Thank u very much!

LocalJoost commented 3 years ago

For the sample to work, unchanged, it needs to contain "https://localjoost.github.io". You can find a ready-to-use QR contained at the bottom of the blog post preceding this one. You can also use any other QR by changing the value here in the project image

LahlouY commented 3 years ago

Hello @LocalJoost . We built the project with Master ARM64 and it works perfectly. We wanted to build it with Release mode so we can unplug the hololens from the computer, but in this case the hololens can't scan the QR code (the text block stays empty). any toughts on how to fix this? Thanks

LocalJoost commented 3 years ago

Hello @LahlouY ,

I am quite confused. Let me first give you a definitive answer about Release mode - no, it does not work in Release mode, I guess you have to file an issue with Microsoft for that. But I really don't understand why you want to compile in Release mode so you can unplug the HoloLens from the computer. Once you have deployed the app to the HoloLens, you can unplug the HoloLens and simply start the app from All Apps. So I really don't understand what your issue is.

LahlouY commented 3 years ago

Indeed, it does work. It just that we had problem to build with master so it didn't work at first . Thanks again

LocalJoost commented 3 years ago

Indeed, it does work. It just that we had problem to build with master so it didn't work at first . Thanks again

Awesome. Great to hear!

AMT12345 commented 3 years ago

Hello, Thank you so much for the tutorial. I keep running into the issue "QR tracking not supported". Any suggestions?

LocalJoost commented 3 years ago

Do you try to run it from the editor? It only runs on HoloLens2 and only of you follow my build instructions to the letter.

AMT12345 commented 3 years ago

Yes you are right. I was trying to run it with the Hololens through the Editor. It works now! Thank you so much!

xunil82 commented 3 years ago

Hi joost, Maybe you can help me, can I save the real space coordinates of the scanned qr code and just load them at a later time without scanning the qr code again. Ney

LocalJoost commented 3 years ago

Well coordinates are always relative to where HoloLens was when the app started so that would be useless to do. What you might want to do is have a look at spatial Anchors and/or the world locking tools. These allow you to store a spatial location for later reference or even transfer them to other HoloLenses to create a shared frame of reference

xunil82 commented 3 years ago

Thanks for the tip with the wlt.... sounds promising on the website. spatial anchor I tried, but the data should only be valid as long as the spatial map of the holo are current. Understand it nevertheless not completely and have still too little experience. Somehow I have to create a reference when starting from which I place the data. My approach would be to scan all qr codes if necessary move positions of the targets... save word anchor.... and on restart scan a reference qr and then load world anchor. But this is only theory :) ...must use a local solution, No azur

Bastien1612 commented 2 years ago

Hello sir, I have seen that to track and choose your QRCode, you have created the parameter Location Qr value. image

And in this picture we can see that the location is set to "https://localjoost.github.io" but there is no QRCode in this link, so how do we settle the QRCode in Unity, do we have to upload it to a link and replace "https://localjoost.github.io" by our new link.

Sorry, if this is redundant with your post on 29 April, but I want to be sure of how it work.

LocalJoost commented 2 years ago

I am not quite sure what you mean, but I hope I give you an answer to what I think your question is.

You can basically put ANY text in Location QR Code. Suppose your put "Bastien1612" in "Location QR Code" in Unity. Then you go to basically any OR code generator that can generate a QR code with Bastien1612 in it. For instance this generator

Print this code out, or display in on a screen (printing works better) and the jet will appear on that code.

Does this help?

Bastien1612 commented 2 years ago

Yes, thanks, that's what I wanted to know. But can I take again your time with another question which is : Does this work only on Hololens or also on Android and IOS ?

LocalJoost commented 2 years ago

Hi,

I have tried it on HoloLens only. It uses a specific Microsoft library (Microsoft.MixedReality.QR) and I don't think that is cross platform. Long story short, I can't answer this question because I don't know.

WojciechSwierczykPTC commented 2 years ago

Hi, I spent some time with qr codes tracking library from MS and tested it on hololens 2. At first I was happy that it works perfectly but then I realized that something is wrong. QR codes are automatically cached and after another run of my app, when no qr code is visible, QRCodeWatcher is giving me Added events with outdated location of them, from previous session. I haven't found a way to clear this cache, there is no method anywhere. Have you managed it somehow?

LocalJoost commented 2 years ago

Did you try the 'slightly improved version' ? https://github.com/LocalJoost/QRCodeService/tree/slightly_improved_version

WojciechSwierczykPTC commented 2 years ago

I have some issues running it but from a look on code I see that you added a check for last time of recognition. I will follow that pattern, thank you for your help :)

bwHoloLens2 commented 2 years ago

Hello Joost,

Thank you again for your detailled explanation of the concept, it's actually really helpful and stands out amongst all of Microsoft attempts to convey the idea of QR Tracking.

If i may ask a question, how should one go about changing the model diplayed depending on QR Code being read ?

Thank you in advance.

Using your Unity 2020 project meant for Open XR on Unity 2020.3.24f1

LocalJoost commented 2 years ago

@bwHoloLens2 thanks for you kind words. I really appreciate that. Changing the model is simple. Have a look in scene 2: image there's the model, and a little script 'jetcontroller' that actually listens to the trackercontroller. The whole idea is to act like Vuforia.

bwHoloLens2 commented 2 years ago

Hi Joost,

Thank you for your quick reply, i was able to make it work for different QR just as you described.

Last question; have you by any chance explored this possibility using your project ? Local anchor transfers in Unity

Thank you in advance

LocalJoost commented 2 years ago

Great to hear that, and no I haven't used that. Be aware the QR code only supplies a location and rotation, not an anchor

bwHoloLens2 commented 2 years ago

Would it be possible to hide the blue figure of the marker in the project without it hiding the airplane model ? Gave it a shot but my project wasn't displaying the hologram on top of the QR as it was supposed.

To describe my use case; say i stick the QR code on the surface of some machine, my aim would be to display multiple holograms on variant distances scattered around one QR code. Would this option be possible using your project ?

Thank you in advance for taking the time to answer me and all of the questions on this comment section.

LocalJoost commented 2 years ago

How about just disabling the marker? Or just the sprite render? image

bwHoloLens2 commented 2 years ago

Any insight on how i could go on about making this ?

" To describe my use case; say i stick the QR code on the surface of some machine, my aim would be to display multiple holograms on variant distances scattered around one QR code. Would this option be possible using your project ? "

Im thinking about associating multiple trackers with the same QR Code and modifying the function you used to move the hologram to the center of the QR code depending on where i wanna place each hologram around the machine. any advice on how to make it somewhat easier or at least possible ?

LocalJoost commented 2 years ago

Uhm, well, how about removing the jet from the JetHolder gameobject and putting your objects in it? image

ThibaultPotier commented 2 years ago

Hi First of, thanks for your work

I'm running into a weird issue. When the app launch, it is asking for some permissions (in my case, microphone use, because of other features) but it is not asking for the photo camera permission. Thus, when trying to use the service, I got a "NotDeclaredByApp" error message.

image

I tryed your packaged version (found here )and it asked me for camera picture permission, and worked.

So I tripled check the capabilities under player setting and everything is set as expected in the tutorial (the webcam capabilities is checked).

The problem clearly seems to be the result of this permission thing, and I Don't know where to signify to the app that it needs this permission. I completely uninstalled the app from hololens and built it again but result is always the same.

Any idea about what is happening here ?

LocalJoost commented 2 years ago

Okay, so have checked in "player settings". Does that mean you have checked in Unity? Have you also checked the capabilities of the generated VC++ solution? In the Package.appxmanifest?

ThibaultPotier commented 2 years ago

Thanks for your quick response ! I did checked it in Unity. So Now I opened visual studio to look at the manifest and it was unchecked ! I checked it, made a new appx and now it works :)

I don't know why I add to change the manifest myself (I did not needed it for other permissions in the past).

I'm glad it works, thanks again :)

LocalJoost commented 2 years ago

You are welcome. I have been in your position more than once. See, in most cases Unity updates the Package.appxmanifest. Unfortunately, it does not always do that. As to why and when, I never been able to find any logic to it. It also happens to other files or assets sometimes. Whenever something like that happens, I just delete the entire generated C++ solution and let Unity generate if from scratch.

Good luck and happy developing!

jeko00 commented 2 years ago

Hi Joost thx for your great work. I was reading your blog about your "poor man’s Vuforia" replacement and in particular the lessons learned section. You say "For continuous tracking of QR codes - like you can do with Vuforia - the internal QR code tracker is simply too slow (still). " what I can confirm. Is there any solution to that except licensing Vuforia e.g. better fine tuning of the tracking (I'm aware of the other points you mentioned in the conclusion section) or using other third party solutions you are aware of? Thx again.

LocalJoost commented 2 years ago

No, I am not aware of. I guess there are, but the QR codes fulfill my needs.

zhouyuwen123 commented 2 years ago

Hello, the work is really good. There are all kinds of problems with the pull down. Can you make a video to pull and pack into Hololens2

zhouyuwen123 commented 2 years ago

Because I downloaded the QR code scan panel and there is no way to scan the QR code

LocalJoost commented 2 years ago

@zhouyuwen123 I have no idea what you are actually asking. I guess English is not your first language (it isn't mine either, btw) but I really don't understand what your problems are. "Pull and pack into HoloLens2" does not ring a bell to me. And no, I am not making videos. That is a lot of work and I am not very fond of making videos. Please read my blogs. Specifically, read this https://localjoost.github.io/Positioning-QR-codes-in-space-with-HoloLens-2-building-a-'poor-man's-Vuforia'/#conclusion