Hey i have an issue with ARSession tracking status.
session = XRGeneralSettings.Instance?.Manager?.activeLoader ?.GetLoadedSubsystem<XRSessionSubsystem>();
if(session == null)
{
return;
}
Debug.Log(session.trackingState);
Which on device seems to be incorrect when I cover the cameras I got
"Tracking" and when camera are fine I got "Limited".
Which seems like a implementation issue on MagicLeap side?
Can anyone else elaborate on this? will this be fixed or is it somthing on my side only
MySpec:
Unity Editor version : 2023.2.20
ML2 OS version : 1.7.0
Unity SDK version :1.5.0?
Host OS : Windows
1 Like
Hi @msurySoft ,
Welcome to the Magic Leap 2 Developer Forums. We are so grateful to have you here engaging with us.
I'm sorry that you're experiencing this issue. We are looking into this and I will report back as soon as we learn more.
Best,
El
Can you please describe the environment in which you are using the headset? Is it well lit, are there black surfaces?
Environment is well lit with a lot of feature points
I guess it has nothing to do with environment since we tested this behavior on two devices in two separate places. It seems like those values are swapped
Any further informations?
You are correct I was able to reproduce this. We have shared this information with our Unity SDK team.
For now you can obtain the tracking state using the Unity Input System and query the Headset's tracking state.
<OpenXRHmd>/trackingState
You can also obtain Head Pose Confidence using the legacy MLSDK APIs.
Note: If you are using OpenXR you will need to enable Perception Snapshots setting inside the Magic Leap 2 Support OpenXR Feature
See information about head pose confidence here:
If the Magic Leap can't locate its position in an environment, it experiences "tracking loss". The Magic Leap 2 lets developers manage their own tracking loss behavior -- some developers may want to pause the update loop and display a splash image,...
Head Pose Example Script:
using UnityEngine;
using UnityEngine.XR;
using UnityEngine.XR.MagicLeap;
public class HeadPoseConfidence : MonoBehaviour
{
InputDevice headDevice;
void Update()
{
headDevice = InputSubsystem.Utils.FindMagicLeapDevice(
InputDeviceCharacteristics.HeadMounted | InputDeviceCharacteristics.TrackedDevice);
if (headDevice.isValid && InputSubsystem.Extensions.MLHeadTracking.TryGetStateEx(
headDevice, out InputSubsystem.Extensions.MLHeadTracking.StateEx state))
{
Debug.Log($"Headpose Confidence: {state.Confidence:0.00}");
}
}
}
system
Closed
August 23, 2024, 4:38pm
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.