open-ecosystem-development / OpenXR-SDK

Apache License 2.0
2 stars 3 forks source link

xrGetSystemProperties() always report that there is no positional tracking #35

Closed svillar closed 2 years ago

svillar commented 2 years ago

Applications call xrGetSystemProperties to access the device's properties. It returns a XrSystemProperties struct which contains the trackingProperties.positionTracking attribute. That should return XR_TRUE for the 6DoF controllers and XR_FALSE for the 3DoF ones.

The problem is that it always return XR_FALSE (i.e. no positional tracking)

dingsing2021 commented 2 years ago

feedback from HVR team: This is a warning type issue. The SDK can reduce the error probability.

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 Sep 1 but did not include this fixed according to release notes.

svillar commented 2 years ago

I've just checked with .79 and the issue is definitely NOT fixed. As a reference I'm using this code (forget about VRB_LOG, it's just a macro to show logging info in logcat, the code is pure OpenXR).

xrGetSystemProperties(instance, system, &systemProperties);
VRB_LOG("OpenXR system name: %s", systemProperties.systemName);
VRB_LOG("OpenXR system has position tracking: %s", systemProperties.trackingProperties.positionTracking == XR_TRUE ? "YES" : "NO");
VRB_LOG("OpenXR system has orientation tracking: %s", systemProperties.trackingProperties.orientationTracking == XR_TRUE ? "YES" : "NO");

And this is what I get with the 6DoF hardware on and a 6DoF build of wolvic

com.igalia.wolvic.dev I/VRB: OpenXR system name: Haliday: G3HMD by Huawei
com.igalia.wolvic.dev I/VRB: OpenXR system has position tracking: NO
com.igalia.wolvic.dev I/VRB: OpenXR system has orientation tracking: YES

and this is what we get with the 3DoF hardware and a 3DoF build:

com.igalia.wolvic.tdof.dev I/VRB: OpenXR system name: Haliday: G3HMD by Huawei
com.igalia.wolvic.tdof.dev I/VRB: OpenXR system has position tracking: NO
com.igalia.wolvic.tdof.dev I/VRB: OpenXR system has orientation tracking: YES

Same result, no difference, the system claims that it only has orientation tracking but no position tracking. This means that the SDK always reports that we're using a 3DoF device.

As a reference, this is what we get with the same code in the Meta Quest device

com.igalia.wolvic.dev I/VRB: OpenXR system name: Oculus Quest2
com.igalia.wolvic.dev I/VRB: OpenXR system has position tracking: YES
com.igalia.wolvic.dev I/VRB: OpenXR system has orientation tracking: YES
dingsing2021 commented 2 years ago

do you try to set the xml like this? Android manifest.xlm : • <meta-data android:name="com.huawei.vr.application.freeDegree" android:value=“3dof|6dof"/>

svillar commented 2 years ago

do you try to set the xml like this? Android manifest.xlm : • <meta-data android:name="com.huawei.vr.application.freeDegree" android:value=“3dof|6dof"/>

I had it set to 6dof(for 6DoF app) and '3dof' (for 3DoF app) and it was not reporting positional tracking so I assumed it won't do it also when mixing both. But I can try again.

svillar commented 2 years ago

do you try to set the xml like this? Android manifest.xlm : • <meta-data android:name="com.huawei.vr.application.freeDegree" android:value=“3dof|6dof"/>

I had it set to 6dof(for 6DoF app) and '3dof' (for 3DoF app) and it was not reporting positional tracking so I assumed it won't do it also when mixing both. But I can try again.

So my intuition was correct, the system always reports "positional tracking NO" no matter I have the 3DoF or 6DoF hardware and no matter whether I have 3dof, 6dof or both in the manifest.

svillar commented 2 years ago

do you try to set the xml like this? Android manifest.xlm : • <meta-data android:name="com.huawei.vr.application.freeDegree" android:value=“3dof|6dof"/>

I had it set to 6dof(for 6DoF app) and '3dof' (for 3DoF app) and it was not reporting positional tracking so I assumed it won't do it also when mixing both. But I can try again.

So my intuition was correct, the system always reports "positional tracking NO" no matter I have the 3DoF or 6DoF hardware and no matter whether I have 3dof, 6dof or both in the manifest.

Also note that changing the behaviour of the SDK based on what is written in the manifest is a pretty bad idea. I'll explain why. If you return positional tracking TRUE if 3dof|6dof is specified in the manifest, this means that if I use the application with only the 3DoF hardware, OpenXR will tell me that I have 6DoF controllers which is clearly incorrect. The SDK should check the hardware to identify whether or not positional tracking is available. Any other approach will fail.

dingsing2021 commented 2 years ago

agree , we will double checked what happened in version 79.

svillar commented 2 years ago

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

lzhangcs commented 2 years ago

Close as confirmed by developer: this is resolved by the below apk image