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

ARSessionOrigin disagrees that TPD(InputSystem) is a valid pose driver

Open dudziakl opened this issue 3 years ago • 3 comments

Describe the bug

TrackedPoseDriver script is missing on Main Camera object on vanilla MRTK XR Rig prefab and when running Play mode there is a warning in the console log:

Camera "Main Camera" does not use a AR Pose Driver or a Tracked Pose Driver, so its transform will not be updated by an XR device. In order for this to be updated, please add either an AR Pose Driver or a Tracked Pose Driver. UnityEngine.XR.ARFoundation.ARSessionOrigin:Awake () (at Library/PackageCache/[email protected]/Runtime/AR/ARSessionOrigin.cs:209)

Workaround:

  1. Open MRTK XR Rig prefab then Camera Offset then select Main Camera in the Hierarchy view
  2. Click on Add Component and manually add Tracked Pose Driver script

To reproduce

Steps to reproduce the behavior:

  1. Create a new Unity project
  2. Import MRTK3
  3. Create an empty scene and remove all content
  4. Add MRTK XR Rig prefab and MRTKInputSimulator to the scene
  5. Hit the Play button and see the warning (Camera "Main Camera" does not use a AR Pose Driver or a Tracked Pose Driver...) in Console log

Expected behavior

Warning should not appear in Play mode

Your setup (please complete the following information)

  • Unity Version 2021.3.12f1 & 2020.3.40f1
  • MRTK Version 3.0.0-pre.12

Target platform (please complete the following information)

  • HoloLens 2 (OpenXR)
  • PC/Desktop (OpenXR)

dudziakl avatar Oct 28 '22 15:10 dudziakl

This is something I'm actively tracking with Unity and the ARFoundation team. Currently there are three "pose drivers" that are usable on the camera:

image

ARFoundation 4.x only checks for the existence of the first two, while all three are valid for camera pose driving.

ARFoundation 5.x deprecated AR Pose Driver and recommends the Input System's TrackedPoseDriver:

image

Unfortunately, because Unity 2020 is currently our min version for MRTK3, we can't adopt ARFoundation 5.x (it declares itself to only be valid for Unity 2021+)

image

Ideally, ARFoundation 4.x will be updated to support any of the three. I'll keep this thread updated as that conversation continues.

All that to say: although the warning is currently unavoidable, the current state of the MRTK XR Rig prefab is a valid state and should work for camera tracking. If you're seeing otherwise, please let us know!

keveleigh avatar Oct 28 '22 16:10 keveleigh

Renaming to track the ongoing external bug.

Zee2 avatar Oct 31 '22 21:10 Zee2

Will be resolved by #11345 and bump to ARF 5.0 and 2021.

Zee2 avatar Jan 06 '23 06:01 Zee2