Hololens Perception Simulation样本测试使设备崩溃

时间:2018-11-20 21:29:38

标签: hololens

用于感知模拟的示例代码使我的设备崩溃。该设备确实响应语音命令,但不响应手势,也没有视觉效果。我必须每次都使用WDR重置它

链接到文档 https://docs.microsoft.com/en-us/windows/mixed-reality/perception-simulation

这是源代码。

class Program
{
    static void Main(string[] args)
    {
        Task.Run(async () =>
        {
            try
            {
                RestSimulationStreamSink sink = await RestSimulationStreamSink.Create(
                    // use the IP address for your device/emulator
                    new Uri("http://127.0.0.1:10080"),
                    // no credentials are needed for the emulator
                    new System.Net.NetworkCredential("snarain", "snarain"),
                    // normal priorty
                    true,
                    // cancel token
                    new System.Threading.CancellationToken());

                IPerceptionSimulationManager manager = PerceptionSimulationManager.CreatePerceptionSimulationManager(sink);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        });

        // If main exits, the process exits.  
        Console.WriteLine("Press any key to exit...");
        Console.ReadLine();
    }
}

1 个答案:

答案 0 :(得分:0)

经过一周的故障排除后,我注意到控制模式已切换为仿真,该仿真使所有传感器挂起以检测人的手势,从而使设备无响应。 将其切换回默认即可解决此问题。

解决了!!