MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Splash image is not set when tracking is lost in hololens

Open hemasree99s opened this issue 3 years ago • 5 comments

Describe the bug

Splash image is not set when tracking is lost in Hololens

To reproduce

Steps to reproduce the behavior: Followed this link - https://learn.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/mrtk2/features/extensions/lost-tracking-service?view=mrtkunity-2022-05

Your setup (please complete the following information)

  • Unity Version [e.g. 2020.3.20f1]
  • MRTK Version [e.g. v2.7.3]

Target platform (please complete the following information)

  • HoloLens 2
  • OpenXR

hemasree99s avatar Jan 03 '23 16:01 hemasree99s

@CDiaz-MS @vtieto @qianw211

hemasree99s avatar Jan 04 '23 03:01 hemasree99s

Ah hmm. Are you using the Mixed Reality OpenXR Plugin? Also, do you have an AR Session in the scene?

keveleigh avatar Jan 04 '23 18:01 keveleigh

image We are using OpenXR plugin. AR session is present as specified in above image.

Also tried the same in unity 2021.3.16f1 and MRTK 2.8.3.

Hope, we should disable On Tracking loss and pause and show image in setting ?

hemasree99s avatar Jan 05 '23 11:01 hemasree99s

Ahh hmm. In your screenshot I see an AR Session Origin, but AR Session is a different component:

image

Can you try adding that to your scene and seeing what happens?

keveleigh avatar Jan 11 '23 20:01 keveleigh

Issue exists with the above approach too

hemasree99s avatar Jan 13 '23 16:01 hemasree99s

@hemasree99s @keveleigh I had the same problem. After some debugging, I found that the sessionSubsystem.trackingState in the Update() function of LostTrackingService.cs was only returning Tracking and Limited.

So I changed the following if statement from: if (sessionSubsystem.trackingState == UnityEngine.XR.ARSubsystems.TrackingState.None && sessionSubsystem.notTrackingReason == NotTrackingReason.Relocalizing)

to the following: if (sessionSubsystem.trackingState != UnityEngine.XR.ARSubsystems.TrackingState.Tracking && sessionSubsystem.notTrackingReason == NotTrackingReason.Relocalizing)

I'm not sure if this is may affect other parts of the code, but from my experience, while using HoloLens 2, I couldn't get the trackingState equal to TrackingState.None.

I could create a pull request for you guys to check if this helps.

Have a nice one, Stavros

siamonas avatar Feb 28 '23 16:02 siamonas

@siamonas Thanks for looking into this! I double checked the implementation between the two and it looks like the OpenXR implementation is less likely to drop all the way to TrackingState.None compared to Windows XR Plugin. I think your proposed change would be good and reasonable!

keveleigh avatar Mar 02 '23 00:03 keveleigh

@srinjoym, can you look into pulling #11407 into MRTK3.

We should also look into the possibility of completing PR #11407 for MRTK2

AMollis avatar Mar 07 '23 05:03 AMollis