Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make hand devices function properly on official examples #783

Open
tejgop opened this issue Jun 9, 2024 · 13 comments
Open

How to make hand devices function properly on official examples #783

tejgop opened this issue Jun 9, 2024 · 13 comments
Labels
bug uh oh

Comments

@tejgop
Copy link

tejgop commented Jun 9, 2024

I've been experimenting with using the lovr.headset button pressed methods, hand device inputs, as well as the pointer examples, such as this. In all cases, I get some input for the first, say 0.5-1 seconds, and then all readings stall at (0,0,0) and the device inputs are no longer reported through the relevant functions anymore. Is this behavior known/is there some workaround to this?

Relevant info:
Tested on Quest 2 and 3
Nightly and release build both tried

@bjornbytes
Copy link
Owner

That's interesting, I haven't heard of this happening before and I'm not sure what the cause would be. Does head tracking still work (i.e. lovr.headset.getPosition('head')) after the input is lost? Does lovr.headset.vibrate vibrate the controllers? Finally, are there any relevant log messages if you do adb logcat -s LOVR?

@bjornbytes
Copy link
Owner

bjornbytes commented Jun 11, 2024

For posterity, here is a relevant logcat message posted on Matrix:

--------- beginning of main
06-10 03:35:21.469 13584 13584 D LOVR    : Using Generic OpenXR Loader
06-10 03:35:21.799 13584 13664 D LOVR    : REFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedREFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedREFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedREFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedREFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedREFLECT [RUNTIMEIPC] WARN@ arvr/first-party/sdks/internal/RuntimeIPCApi/Include/RuntimeReflectIPC.h(4130): InitClientInternal: Already initializedFailed to suggest input bindings for /interaction_profiles/khr/simple_controller
06-10 03:35:21.799 13584 13664 D LOVR    : Failed to suggest input bindings for /interaction_profiles/oculus/touch_controller

I'm not sure what these logs mean or what part of lovr is even printing them... I also can't reproduce this on v65 and am using controllers and hand tracking successfully. So for now this is still a mystery!

@bjornbytes bjornbytes added the bug uh oh label Jun 22, 2024
@bjornbytes
Copy link
Owner

I got the v66 Quest OS update and also upgraded OpenXR to 1.0.38 for good measure, but I still haven't been able to reproduce this on multiple Quest 2 or Quest 3 devices. I don't think I have enough information to fix this, sorry 😞

@bjornbytes bjornbytes closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
@micouy
Copy link

micouy commented Oct 1, 2024

It's happening repeatedly to me on Quest 3 and it's quite annoying. After I disable controllers by bumping them into each other I can see the hands for ~1s and then they disappear.

There are no logs, the head is being tracked and I believe the controllers do not vibrate but I wasn't sure if my code was correct.

After the hands disappear, lovr.headset.isTracked(device) returns false for hands.

I think the hand tracking may be disrupted when the controllers are moved even slightly. Sounds stupid but when I put them in the cas, shake it to turn them off and place it somewhere stable, like a desk, the hands appear for good.

@bjornbytes please reconsider reopening the issue. Let me know if I can help you debug it.

@bjornbytes
Copy link
Owner

Recently I noticed something that might be related -- on Quest, sometimes hands won't be tracked in my project and I have to turn off the headset display and turn it back on again (tap the power button twice). After that, hand tracking works. Does this also fix the issue for you?

@micouy
Copy link

micouy commented Oct 1, 2024

I've just tried it - first moved my controllers to make the hands disappear, then turned the display off and on - and it did help.

@bjornbytes
Copy link
Owner

Just tried to reproduce this for a while and wasn't able to trigger it. This was on a Quest 2 though, I can try a Quest 3 in a couple of days. I have a few ideas I want to try that might fix it, but I'd like to have the problem happening locally so I can see if the fixes actually work!

@micouy
Copy link

micouy commented Oct 2, 2024

Thanks! Again - if I can be of any help just let me know. If you'd like to hop on a call with me, I could cast my headset for you.

@bjornbytes
Copy link
Owner

I noticed that while controller/hand input isn't working, lovr.headset.isFocused returns false. Turning the display off/on brings back input focus. So it likely isn't something to do with actions, hand trackers, etc. and is instead something related to the OpenXR session state.

After printing out all the OpenXR session state events, it seems that LÖVR's OpenXR session never transitions to FOCUSED, only VISIBLE.

@bjornbytes
Copy link
Owner

I think in my case, when I start the app using adb shell am start org.lovr.app/org.lovr.app.Activity when the headset is idle, the session never gets input focus, even after putting on the headset. If I start the app with adb while wearing the headset, or start the app from the Quest UI, I get input focus. And in all cases, turning the display off/on restores input focus. So this maybe seems like a separate issue from the one reported here.

@dev2-just2devs
Copy link

Hi, I am not sure whether or not I am experiencing the same issue but none of the inputs work. I have tried several examples which showcase the input system and whether I use hand tracking or not no inputs get registered.

In the examples in which the hands are used as soon as I grab the controllers the visuals snap at 0,0,0 or simply stop updating. I have tried turning the screen on and off to see if it could have been the app not being focused as mentioned above but that did not work.

It's also worth mentioning that I don't see anything displayed in all the examples which use controllers such as this.

I am using a quest 3 for testing.

@bjornbytes
Copy link
Owner

Could you try a nightly APK, e.g. https://github.com/bjornbytes/lovr/actions/runs/12699813977 ?

When trying Intro/Tracked_Hands example on v0.17.1, I get spheres when using hand tracking, and nothing when using controllers. On a nightly build, I get spheres with both hand tracking and controllers. I think this was a bug in the v17 version that's since been fixed.

@dev2-just2devs
Copy link

dev2-just2devs commented Jan 10, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug uh oh
Projects
None yet
Development

No branches or pull requests

4 participants