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

Hand tracking on the Pico 4 seems to be broken #162

Open
talpadk opened this issue Jun 9, 2024 · 9 comments
Open

Hand tracking on the Pico 4 seems to be broken #162

talpadk opened this issue Jun 9, 2024 · 9 comments
Labels
bug Something isn't working
Milestone

Comments

@talpadk
Copy link

talpadk commented Jun 9, 2024

I believe that the hand tracking on pico 4 has a bug or two, or possibly I'm using OpenXR the wrong way
I'm using:

  • Godot 4.3 beta 1
  • Godot XR tools for Godot 4 (4.3.1) (for the hands and there skeletons)
  • Godot OpenXR Vendors plugin v3.0.0 beta 1

I have tied both the depreciated OpenXRHand and XRNode3D + XRHandModifier3D

20240609_18h51m17s_grim

  1. With both when I hold my hands horizontal the hands point up inside VR
  2. Only the OpenXRHand modifies the bones, the XRHandModifier3D does nothing
  3. The OpenXRHand with bone update = "rotation only" bends my fingers in the direction of my pinky finger
  4. The Pico 4 insists that the program doesn't support running with hand tracking

In the export settings I have tired bot optional and required for hand tracking
20240609_19h05m56s_grim

In the project settings i have enabled hand tracking and tried both with and without "Hand Interaction Profile" enabled
20240609_19h08m09s_grim

Some of the rotation and bending issues might be solvable by applying a rotation matrix to the data from the Pico 4 or perhaps even just swapping an axis or two.
It may of cause simply be a bug in the Pico firmware, but it would be nice if it could be worked around until they fix it (if ever).

As to why the XRHandModifier3D doesn't modify the bones I wouldn't rule out a misconfiguration on my part

Oh and last but not least: Thanks for the plugin quite amazing how relatively easy it is to code VR applications using it

@talpadk
Copy link
Author

talpadk commented Jun 9, 2024

If I apply the following Euler rotations to the Armature nodes:
Left hand: [0, 90, -90]
Right hand: [90,90,0]

The hands are oriented correctly inside VR.
(The fingers still bends the wrong way)

Which gives the rotation matrices
Left:
[ 0.0000000, 0.0000000, 1.0000000;
-1.0000000, 0.0000000, 0.0000000;
-0.0000000, -1.0000000, 0.0000000 ]

Right:
[ 0.0000000, 0.0000000, 1.0000000;
1.0000000, 0.0000000, -0.0000000;
-0.0000000, 1.0000000, 0.0000000 ]

So it seems like the coordinates from the Pico 4 should be rearranged slightly

And for the left hand two of them used as negative values

@talpadk
Copy link
Author

talpadk commented Jun 9, 2024

If I use bone update full on the left hand that uses the depreciated OpenXRHand it renders in the correct orientation without any rotation of the armature.

But then it distorts the hand mesh

@dsnopek
Copy link
Collaborator

dsnopek commented Jun 10, 2024

Thanks for the report!

Is this a regression (meaning, it works in Godot 4.2, but is broken in 4.3-beta1)?

If there is a bug here, it's likely in Godot itself, rather than this extension. The extension is really only responsible for the loader and Android manifest changes - basic OpenXR hand tracking support is in Godot.

@talpadk
Copy link
Author

talpadk commented Jun 10, 2024

I will move the bug report to the Godot tracker instead.

Should the part about the Pico not picking up on the application supporting hand tracking remain here or is that also a Godot issue?

OpenXRHand behaves the same in Godot 4.2.2 (I can't select to only use rotational transform but other than that)
XRNode3D + XRHandModifier3D isn't available as far as I can tell in 4.2.2

And thanks for your help this far

@dsnopek
Copy link
Collaborator

dsnopek commented Jun 11, 2024

I will move the bug report to the Godot tracker instead.

I think it's OK to keep it here until we figure out what's going on. If this is a matter of adding something to the Android manifest or requesting a Pico-specific permission, then the fix will be here. But if it's anything else, then the fix will need to be in Godot.

@BastiaanOlij
Copy link
Member

Try and see if you can reproduce the issue in this demo: https://github.com/godotengine/godot-demo-projects/tree/master/xr/openxr_hand_tracking_demo

For me when I tried that on my PICO 4 it was working correctly.

Do note that the PICO 4 only provides hand tracking data if you are not using a controller, it does not support controller inferred hand tracking.

@BastiaanOlij
Copy link
Member

Also seeing the mention of 3.0.0 beta 1 being used, I am not sure if we added the PICO changes in that yet. We added additional manifest entries in beta 2 and moved to the Khronos loader in beta 3 adding additional required manifest entries.

@talpadk
Copy link
Author

talpadk commented Jul 17, 2024

Got stuck way too long on vendors beta 3 requires godot beta 3, drained all the fun out of it, will have to try reporting back later.

@ckschim
Copy link

ckschim commented Oct 8, 2024

I was trying to get hand tracking working on my PICO 4 as well and was facing the issues descibed by @talpadk.

Versions

  • Godot 4.3 stable
  • Godot OpenXR Vendors plugin v3.0.1

Issues

PICO says controllers are needed

I had to manually add <meta-data android:name="handtracking" android:value="1" /> to the Android Manifest.xml to let the PICO now that no controllers are needed for the application and go with the hand tracking.

Orientation of hands wrong

In my own small test app I was facing the described issues 1-3 so far as well, but in the hand tracking demo it is working fine.

@m4gr3d m4gr3d added this to the 3.1.0 milestone Oct 21, 2024
@m4gr3d m4gr3d added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants