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

Controllers losing tracking on Windows Mixed Reality #254

Open
BioBazard opened this issue Jul 4, 2023 · 18 comments
Open

Controllers losing tracking on Windows Mixed Reality #254

BioBazard opened this issue Jul 4, 2023 · 18 comments

Comments

@BioBazard
Copy link

BioBazard commented Jul 4, 2023

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?

@BioBazard
Copy link
Author

BioBazard commented Jul 10, 2023

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?

@chengnay
Copy link
Collaborator

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.

@BioBazard
Copy link
Author

BioBazard commented Aug 14, 2023

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

@chengnay
Copy link
Collaborator

chengnay commented Aug 14, 2023

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.

@BioBazard
Copy link
Author

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 ...

@chengnay
Copy link
Collaborator

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.

@BioBazard
Copy link
Author

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!

@chengnay
Copy link
Collaborator

chengnay commented Sep 7, 2023

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

@BioBazard
Copy link
Author

BioBazard commented Sep 7, 2023

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

@chengnay
Copy link
Collaborator

chengnay commented Sep 7, 2023

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

@BioBazard
Copy link
Author

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?

@chengnay
Copy link
Collaborator

chengnay commented Sep 7, 2023

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?

@BioBazard
Copy link
Author

BioBazard commented Sep 7, 2023

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

@chengnay
Copy link
Collaborator

chengnay commented Sep 8, 2023

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.

@BioBazard
Copy link
Author

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.

@chengnay
Copy link
Collaborator

chengnay commented Sep 8, 2023

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?

@BioBazard
Copy link
Author

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.

@chengnay
Copy link
Collaborator

chengnay commented Sep 14, 2023

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.

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

No branches or pull requests

2 participants