Hololens 2 emulator for hello_xr test

Hi,

I am working on Windows 10 with Windows Mixed Reality Runtime and Hololens 2 emulator to run the hello_xr test . I was able to build the project using Visual Studio 19 and run it from command prompt as follows

hello_xr.exe -g D3D12 -ff Hmd -vc Stereo -bm Opaque -s Local

This is unable to get system and throws the following error although Hololens 2 emulator has been launched prior to running the above command

[16:09:52.495][Info   ] Press any key to shutdown...
[16:09:52.586][Info   ] Available Layers: (0)
[16:09:52.616][Info   ] Instance RuntimeName=Windows Mixed Reality Runtime RuntimeVersion=112.2211.2002
[16:09:52.623][Error  ] XrResult failure [XR_ERROR_FORM_FACTOR_UNAVAILABLE]
    Origin: xrGetSystem(m_instance, &systemInfo, &m_systemId)
    Source: ..\..\..\src\tests\hello_xr\openxr_program.cpp:298

How do I go about debugging this? I am relatively new to XR development.

According to the spec, XR_ERROR_FORM_FACTOR_UNAVAILABLE means that the hardware is temporarily unavailable. It may mean something like a headset not connected or turned off. Since you are running an emulator, the thing to check would be that the emulator is being seen by the runtime.

1 Like

Thanks for the reply.

I will try to run the hello_xr project from within Visual studio with Hololens 2 emulator as the debug target. This may not be easy to do since hello_xr code must be converted / moved to Universal Windows Platform (UWP) project. [https://learn.microsoft.com/en-us/cpp/porting/porting-to-the-universal-windows-platform-cpp?view=msvc-170]

As a side note, I just want to run the hello_xr sample on windows but don’t have access to VR hardware, is Hololens 2 emulator my only option? I am interested in running it with head mounted display form factor and stereo view configuration type.

There is a WMR simulator that seems a lot more practical to use for testing than the Hololens emulator in case you don’t need to test specifically for the Hololens:
https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/using-the-windows-mixed-reality-simulator

It’s also possible to configure SteamVR to run without a headset, although I don’t think it has any way of simulating any movement or inputs unless someone has made a custom driver.

1 Like

Thanks! I was able to run it using SteamVR and an android phone.

Just in case someone stumbles upon this. Steps I followed are

  1. Install SteamVR. This link [https://sites.google.com/view/brown-vr-sw-review-2018/vr-hardware/hardware-emulators/ivry-tutorial?pli=1] goes into all the details.
  2. Change the active runtime from Windows Mixed Reality to SteamVR. This link [https://steamcommunity.com/app/250820/discussions/8/2448217320134491995/] provides the path to the manifest json file for SteamVR. Registry editor can be updated to change the active runtime, details for this can be found here [https://registry.khronos.org/OpenXR/specs/1.0/loader.html#runtime-discovery].
1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.