microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Boundary System does not work correctly #6243

Closed KrasnovPavel closed 4 years ago

KrasnovPavel commented 4 years ago

I tried to visualize Boundaries but instead I get warning "Failed to calculate boundary bounds." and just Spatial Mesh.

image

Failed to calculate boundary bounds.
UnityEngine.Debug:LogWarning(Object)
Microsoft.MixedReality.Toolkit.Boundary.MixedRealityBoundarySystem:CalculateBoundaryBounds() (at Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs:932)
Microsoft.MixedReality.Toolkit.Boundary.MixedRealityBoundarySystem:Initialize() (at Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs:45)
Microsoft.MixedReality.Toolkit.<>c:<InitializeAllServices>b__57_0(IMixedRealityService) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:865)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServices(IEnumerable`1, Action`1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:972)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action`1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:953)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeAllServices() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:865)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeServiceLocator() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:430)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeInstance() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:535)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:RegisterInstance(MixedRealityToolkit, Boolean) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:674)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:Awake() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:568)

It happens in both editor and Hololens 1st gen.

To reproduce

I encountered this in empty unity project with only MRTK.Foundation installed. My settings: image image image image

Expected behavior

Boundary Visualization

Setup

I tested it with Unity 2018.4.4f1(.NET) and Unity 2019.1.3f(IL2CPP). MRTK v2.0.0

Target Platform

david-c-kline commented 4 years ago

@KrasnovPavel ,

The message your are receiving "Failed to calculate boundary bounds" indicates that either a boundary is not configured (vr device) or that the device does not support the concept of boundaries (Microsoft HoloLens).

The boundary system utilizes Unity's support for virtual reality devices and their configured boundaries (ex: tracing your play space via a Windows Mixed Reality immersive headset or an HTC Vive).

Spatial awareness is designed for devices such as the Microsoft HoloLens that have environmental sensors that provide mesh data matching the observed environment.

Hope this helps.

KrasnovPavel commented 4 years ago

@davidkline-ms , thank you for quick response. It looks like I misunderstood the documentation. I thought Boundary System is replacement for Spatial Understanding form HoloToolkit.

Is there replacement for Spatial Understanding mechanism in MRTK like it was in HoloToolkit? I found Scene Understanding but looks like Hololens (1st gen) goes not support it.

david-c-kline commented 4 years ago

There currently is no replacement for Spatial Understanding from the HoloToolkit. We are investigating the work required to update the required components and do not yet have a timeline for release.

david-c-kline commented 4 years ago

Opened #6246 to track the request