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

Diff between OpenXR QR sample vs. WinRT QR sample in Unity #18

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yl-msft
Copy link
Member

@yl-msft yl-msft commented Sep 13, 2022

Please don't merge this PR into main branch.

This PR is to highlight an OpenXR unity project vs. the WinRT unity project for QR tracking. Other than adding the OpenXR plugin package to the unity package manifest and auto generated openxr settings, the key difference is in the SpatialGraphNodeTracker.cs file, where the SpatialGraphNode class is built in the OpenXR plugin to provide tracking of a static node represented by GUID from the platform.

Note: you can checkout the OpenXR QR code sample from the "openxr" branch:

https://github.com/microsoft/MixedReality-QRCode-Sample/tree/OpenXR

Copy link
Member Author

@yl-msft yl-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't merge this PR. It's here to highlight differences between openxr and main branch.

@yl-msft yl-msft changed the title [Do not merge] Diff between OpenXR QR sample vs. WinRT QR sample in Unity Diff between OpenXR QR sample vs. WinRT QR sample in Unity Sep 13, 2022
@maaron
Copy link

maaron commented Sep 28, 2022

This approach works for me, but there is a problem that occurs if the HoloLens loses tracking and starts mapping a new space that is unrelated to the space the app started with. By "unrelated", I mean that the new space is not connected to the old one. In this case, the TryLocate method returns false. This can be easily reproduced by deleting the spatial maps using the device portal:

  1. Start the app
  2. Note that QR tracking works as expected
  3. In Device Portal / System / Map Manager, press "Reset system map, anchors and spatial mapping database"
  4. Wait for the HL to regain tracking
  5. Try scanning the QR code again, and notice that the QR code can be detected, but the pose of the marker cannot be obtained.

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

Successfully merging this pull request may close these issues.

2 participants