ViveSoftware/ViveInputUtility-Unity

Controllers losing tracking on Windows Mixed Reality

BioBazard opened this issue · 18 comments

Hello,
In order to have the ability to use certain keys of the Windows Mixed Reality controllers, I decided to upgrade my Unity project from version 2019.4.8f to version 2021.3.5f1, as well as upgrading the VIU version from 1.12.3 to 1.17.0.

However, I've encountered a strange issue: when I look upwards, the position of my controllers is no longer being updated. I've searched everywhere to see if there's an option to fix this problem, but I can't find any... Do you have a solution?

As I haven't received any responses, I made a video to illustrate my points.
https://www.youtube.com/watch?v=jh0Q1XXtwUc

As you will see, when I'm "In Game" and I look upwards, I lose tracking of the controllers (it can be seen as the rays disappear). However, when I switch to the WMR menu, it can be observed that the tracking of the controllers has not been lost.

It seems that when the controller exits the field of view, the "Is Pose Valid" value becomes false, but the position and rotation are still updated correctly (as seen in this screenshot).

image_2023-07-10_154719485

Do you have any suggestions on how to fix this bug?

Hi @BioBazard,
Sorry for the late response.
Could you list all the versions of the plugins that you have installed/imported?
We can try to reproduce the issue on our side to check for the root cause.

One workaround is you can write a script that get the position and rotation of your controller,
Then attach the script to a controller model.

For VIU, we do check if pose validity then show/hide controller model.

Hi @BioBazard, Sorry for the late response. Could you list all the versions of the plugins that you have installed/imported? We can try to reproduce the issue on our side to check for the root cause.

One workaround is you can write a script that get the position and rotation of your controller, Then attach the script to a controller model.

For VIU, we do check if pose validity then show/hide controller model.

To confirm that the issue wasn't arising from elsewhere, I specifically created a new project with only VIU 1.17.0.0 installed on Unity 2021.3.5f1.

Here's a screenshot with the list of packages installed in this test project :

image

To temporarily fix the issue, I modified the OnNewPoses() function in VivePoseTracker.cs to always force controller validity :

image

Hi @BioBazard,

Could you update VIU to latest version(v1.18.1) and try again? Thanks!
I suspect the error you mentioned is an known issue for v.1.17.0.

Hi @BioBazard,

Could you update VIU to latest version(v1.18.1) and try again? Thanks! I suspect the error you mentioned is an known issue for v.1.17.0.

I had already tested it with version 1.18.1, but I retested just in case by creating again a new Unity 2021.3.5f1 project, but unfortunately, I'm still facing the same issue ...

Hi @BioBazard,

I will double check WMR case, which we haven't been tested for quite some time.
Get back to you when I have the test result and solution.
Sorry for the inconvenience.

Hi @BioBazard,

I will double check WMR case, which we haven't been tested for quite some time. Get back to you when I have the test result and solution. Sorry for the inconvenience.

Ok thank you.
Good luck, and have a great day!

Hi @BioBazard,
I just tested VIU with HP Windows MR, and I can get pose valid.
Could you check below screenshots?
Is there any difference from yours?
image
image

NOTE: I tested with VIU's UGUI example scene, and I can see controller model

Hi @chengnay,
It's strange...
Here's what I have on my project. I forgot to mention that I'm testing on the HP Reverb G2 headset, and to have the key mapping correctly, I need to add its profile.
Could that be the issue?

Capture
Capture2

Hi @BioBazard,
If you remove Reverb G2 profile, will it work normally?

Hi @BioBazard, If you remove Reverb G2 profile, will it work normally?

I just tested it on Unity 2021.3.5f1 with the VIU 1.18.1, and it doesn't solve my issue...

And so, during your tests, when you took the controllers out of your field of view (for example, by looking upwards), were the controller rays still visible?

Hi @BioBazard,
My controller rays are still visible.
I am using HP Reverb not G2.
Could you test the controller rays inside the Mixed Reality Portal?
Are you able to see the rays when controllers are out of your field of view?

I saw this post online,
image
Not sure if this is the root cause?

My dirty fix appears to have resolved the tracking issue, so I don't believe it's a problem associated with the headset.
In the video that I had posted, it's clear that when I open the Windows menu, I don't have any tracking issues, but when I return to the Unity app, I lose tracking. Afterward, tracking works perfectly with this headset in Unity 2019.4.8f with VIU 1.12.3 ...

https://www.youtube.com/watch?v=jh0Q1XXtwUc

Hi @BioBazard,
Are you able to test Unity 2019.4.8f with VIU 1.18.1?
After you upgrade from Unity 2019.4.8f to 2021.3.5f1,
This is quite a big gap and I believe some of the plugins(For example, XR Management) are upgraded too.
If you only upgrade VIU and use the same Unity version, and if issue still exists, then there might be some mistakes that we made while upgrading VIU.

Hi @chengnay ,
I just tested it with Unity 2019.4.8f & VIU 1.18.1, and indeed, the issue has disappeared !!
However, we chose to update the Unity version to 2021.3.5f1 because we needed to have the possibility to choose the HP Reverb G2 interaction profile for key mapping otherwise, some buttons were not recognized correctly with this headset.

Hi @BioBazard,
Thanks for your verification.
Back to 2021.3.5f1, will the issue occur without choosing HP Reverb G2 interaction profile?
Like I mentioned before, there are many plugins upgraded after you upgrade Unity version to 2021.3.5f1.
And, you just clarified that the issue does not come from VIU, and in fact, VIU gets pose valid from Unity, I assume the root cause should come from Unity.
Another test to check is by upgrading/switching plugins one by one, maybe start from XR Plugin Management, could you change to other version to see if it will fix your issue?

Hi @chengnay,
Thank you for these responses. With the modification I made to a script in the VIU plugin (as shown earlier), it fixed the issue, so I don't plan to spend more time testing it.

Hi @BioBazard,
No problem, just curious what's the root cause.
Be careful the modification might cause side effect.
For example, it is pose invalid, but you still see it from far distance.
Or your controllers are in idle state, and it will not disappear from scene.