open-ecosystem-development / OpenXR-SDK

Apache License 2.0
2 stars 3 forks source link

Incorrect aim pose with 6DoF controllers #32

Closed svillar closed 2 years ago

svillar commented 2 years ago

This issue was detected when using Wolvic with HVR glasses. There was a mismatch between controller's orientation in the VR world and in real world. Also in many WebXR experiences the beam coming out of the controller was pointing to the wrong place. After researching it a bit I found that the HVR SDK is incorrectly reporting the same values for both the aim and grip poses. See for example this trace I got from Wolvic. I'm printing the aim and grip poses returned by the OpenXR runtime for a 6DoF controller which is not moving at all.

2022-05-09 09:15:57.296 I/VRB: POSE AIM: 0.089178 -0.001973 0.447672 0.889738
2022-05-09 09:15:57.296 I/VRB: POSE GRIP: 0.089178 -0.001973 0.447672 0.889738

As you can see they're identical (when they should not). Check for example what the same code returns for the Oculus OpenXR SDK

2022-05-09 09:11:29.941 I/VRB: POSSE AIM: -0.234927 -0.338542 0.304690 0.858698
2022-05-09 09:11:29.941 I/VRB: POSSE GRIP: 0.225896 -0.140841 0.433141 0.861118

The actual values are not important, the key here is that the aim and grip poses should be different for 6DoF controllers.

fwei-io commented 2 years ago

HVR team:

We also encountered this experience problem, such as on Moonrider, when using dual swords mode, the angle of the sword is awkward; We are working to see if this issue can be avoided on the browser side (refer to Oculus Touch, by adding a delta value).

dingsing2021 commented 2 years ago

HVR team: can be workaround from browser side ? add a fixed delta value?

svillar commented 2 years ago

HVR team: can be workaround from browser side ? add a fixed delta value?

Yes we're using a workaround in the browser but this is not the right thing to do right? The SDK should provide the right values for aim and grip poses otherwise any application using the SDK would have to face the same issue.

dingsing2021 commented 2 years ago

feedback from HVR team: it will be fixed on the next verison 79 ,It is expected to be released in late August or early September.

matlu commented 2 years ago

Version 78 was released on Sept 1 but did not include this fix

svillar commented 2 years ago

I've just tested with .79 and this is definitely NOT fixed yet. I've just done a quick check. These are aim and grip values for position and orientation for Meta Quest running OpenXR backend:

com.igalia.wolvic.dev I/VRB: POSE aim (ori): -0.400316, 0.368165, 0.835727, 0.075910
com.igalia.wolvic.dev I/VRB: POSE aim (pos): 0.895922, -0.344315, -0.185591
com.igalia.wolvic.dev I/VRB: POSE grip (ori): -0.308729, 0.736703, 0.539678, 0.265898
com.igalia.wolvic.dev I/VRB: POSE grip (pos): 0.850316, -0.258560, -0.163430

As you can see both position and orientation are unique for grip and aim poses because they point to different places and are rooted in different parts of the controller.

However this is what I get with HVR 6DoF using the same OpenXR backend.

com.igalia.wolvic.dev I/VRB: POSE aim: -0.199970, 0.666267, 0.689350, 0.202231
com.igalia.wolvic.dev I/VRB: POSE aim: 0.096194, 1.048701, -0.121397
com.igalia.wolvic.dev I/VRB: POSE grip: -0.199970, 0.666267, 0.689350, 0.202231
com.igalia.wolvic.dev I/VRB: POSE grip: 0.096194, 1.048701, -0.121397
com.igalia.wolvic.dev I/VRB: POSE aim: 0.000000, 0.000000, 0.000000, 1.000000
com.igalia.wolvic.dev I/VRB: POSE aim: 0.000000, 0.000000, 0.000000
com.igalia.wolvic.dev I/VRB: POSE grip: 0.000000, 0.000000, 0.000000, 1.000000
com.igalia.wolvic.dev I/VRB: POSE grip: 0.000000, 0.000000, 0.000000

So as you can see poses for aim and grip are still identical. And what's worst now we get a lot of poses with 0 values something that was not happening before.

svillar commented 2 years ago

Looks like it's indeed fixed in the latest .79. Thanks!

lzhangcs commented 2 years ago

Close as confirmed resolved by: image