HoloLens2开发使用模拟器的方法(中英文对照)
总体介绍
Controlling the emulator is similar to many common 3D video games. Input options are available for using the keyboard, mouse, or Xbox controller. You control the emulator by directing the actions of a simulated user by wearing a HoloLens. Your actions move the simulated user around the environment. Applications running in the emulator respond like they would on a real device.
控制模拟器类似于许多常见的3D视频游戏。输入选项可用于使用键盘、鼠标或Xbox控制器。通过佩戴全息镜引导模拟用户的操作来控制模拟器。您的操作将在环境中移动模拟用户。在模拟器中运行的应用程序的响应就像在真实的设备上一样。
动作手势
The cursor on HoloLens (first gen) follows head movement and rotation. In the HoloLens 2 Emulator, the cursor follows hand movement and orientation.
HoloLens(第一代)上的光标会跟随头部的运动和旋转。在HoloLens2模拟器中,光标跟随手的运动和方向。
Walk forward, back, left, and right - Use the W,A,S, and D keys on your keyboard, or the left stick on an Xbox controller.
向前、后退、左、右走——使用键盘上的W、A、S和D键,或Xbox控制器上的左键。
Look up, down, left, and right - Select and drag the mouse, use the arrow keys on your keyboard or the right stick on an Xbox controller.
向上、向下、向左、向右查找-选择并拖动鼠标,使用键盘的箭头键或Xbox控制器上的右键。
Air tap gesture - Right-click the mouse, press the Enter key on your keyboard or use the A button on an Xbox controller.
空中点击手势-右键单击鼠标,按键盘上的Enter键或使用Xbox控制器上的A按钮。
Bloom/System gesture - Press the Windows key or F2 key on your keyboard or press the B button on an Xbox controller.
模糊/系统手势-按键盘上的Windows键或F2键,或按Xbox控制器上的B按钮。
Hand movement for scrolling - Simultaneously hold the Alt key and the right mouse button, and drag the mouse up or down. In an Xbox controller, hold down the right trigger and A button and move the right stick up and down.
手动移动以进行滚动-同时按住Alt键和鼠标右键,并上下拖动鼠标。在Xbox控制器中,按住右触发器和A按钮,上下移动右键。
Hand movement and orientation (HoloLens 2 Emulator only) - Hold the Alt key and drag the mouse up or down, left or right to move the hand. You can also use the arrow keys and Q or E to rotate and tilt the hand. For an Xbox controller, hold the left or right bumper and use the left thumbstick to move the hand left, right, forward, and back, the right thumbstick to rotate it. Use up or down on the Dpad to raise or lower the hand.
手动移动以进行滚动-同时按住Alt键和鼠标右键,并上下拖动鼠标。在Xbox控制器中,按住右触发器和A按钮,上下移动右键。
Have a Windows Mixed Reality immersive headset? Starting with the HoloLens 2 Emulator (Windows Holographic, version 2004), you can use your Windows Mixed Reality immersive headset and motion controllers to control the HoloLens 2 Emulator and view it in stereo. See Using a Windows Mixed Reality immersive headset and motion controllers with the HoloLens 2 Emulator
手的移动和方向(仅限HoloLens2模拟器)-按住Alt键,上下拖动鼠标,向左或向右移动手。您也可以使用箭头键和Q或E来旋转和倾斜的手。对于Xbox控制器,按住左或右保险杠,使用左拇指棒向左、右、前和后移动,右拇指棒旋转。在Dpad上向上或向下使用,以抬高或降低手。
Have a Windows Mixed Reality immersive headset? Starting with the HoloLens 2 Emulator (Windows Holographic, version 2004), you can use your Windows Mixed Reality immersive headset and motion controllers to control the HoloLens 2 Emulator and view it in stereo. See Using a Windows Mixed Reality immersive headset and motion controllers with the HoloLens 2 Emulator
有一个窗户混合现实沉浸式耳机吗?从HoloLens2模拟器(窗户全息,2004版)开始,你可以使用Windows混合现实沉浸式耳机和运动控制器来控制HoloLens2模拟器并在立体声观看。参见使用Windows混合现实沉浸式耳机和运动控制器与HoloLens2模拟器
Toolbar工具栏
To the right of the main window, find the emulator toolbar. The toolbar contains the following buttons:
在主窗口的右侧,找到emulator工具栏。工具栏包含以下按钮:
Close: Closes the emulator.关闭模拟器
Minimize: Minimizes the emulator window.最小化模拟器窗口
Simulation control panel: Show or hide the Simulation control panel for configuring and controlling input to the emulator.模拟控制面板:显示或隐藏用于配置和控制模拟器输入的模拟控制面板。
Fit to screen: Fits the emulator to screen.模拟器适合屏幕大小
Zoom: Make the emulator larger and smaller.让模拟器放大缩小
Help: Open emulators help.打开帮助
Open Device Portal: Open the Windows Device Portal for the HoloLens OS in the emulator.
打开设备门户:在emulator中打开HoloLens操作系统的Windows设备门户。
Tools: Open the Additional tools pane.打开其他面板
Simulation control panel
The Simulation control panel lets you view the current position and orientation of the simulated human and input devices. It also allows you to configure both simulated input, such as showing or hiding one or both hands, and devices used for controlling simulated input, such as your PC’s keyboard, mouse and gamepad.
通过模拟控制面板,可以查看模拟人员和输入设备的当前位置和方向。它还允许您配置模拟输入,如显示或隐藏一只手或两只手,以及用于控制模拟输入的设备,如PC的键盘、鼠标和游戏板。
To hide or show the simulation panel, select the toolbar button or press F7 on your keyboard.
要隐藏或显示“模拟”面板,请选择工具栏按钮或按键盘上的F7键。
Hover the mouse over a control or field to display a tooltip that contains keyboard, mouse, and gamepad controls for it.To show or hide a hand, toggle the appropriate switch under Left hand or Right hand.
将鼠标悬停在控件或字段上,以显示包含键盘、鼠标和游戏板控件的工具提示。要显示或隐藏手,请切换左手或右手下的相应开关。
To control the hand, use either the left or right Alt keys on your keyboard or the left or right bumper on the gamepad.To direct all input to one or both hands, select the pushpin button under the toggle switch, which is the same as holding the Alt key for the hand.
要控制手,请使用键盘上的左或右Alt键或gamepad上的左或右保险杠。要将所有输入指向一只手或两只手,请选择切换开关下的图钉按钮,这与按住手的Alt键相同。
To control eye gaze direction, select the pushpin in the Eyes section, which is the same as holding down the Y key on the keyboard.
要控制眼睛注视方向,请在“眼睛”区域中选择图钉,这与按住键盘上的Y键相同。
To load a room recording, select the Load button in the Recording section. See simulated rooms for more information.
要加载房间录音,请选择“录音”部分中的“加载”按钮。有关详细信息,请参见模拟房间。
To adjust the speed that the simulated human or input devices will move or rotate in response to keyboard, mouse or gamepad input, select the gear icon next to Input settings, and adjust the sliders.
要调整模拟人或输入设备响应键盘、鼠标或gamepad输入移动或旋转的速度,请选择“输入设置”旁边的齿轮图标,然后调整滑块。
By default, keyboard input controls the simulated human and simulated input. To have your PC’s keyboard input sent through to the HoloLens, uncheck Use keyboard for simulation. F4 is the shortcut key for this setting.
默认情况下,键盘输入控制模拟人和模拟输入。要将电脑的键盘输入发送到全息镜头,请取消选中“使用键盘进行模拟”。F4是此设置的快捷键。
If the simulation panel is already visible, pressing F8 moves keyboard focus into it.
To undock the simulation panel from the emulator window, select the button at the bottom of the panel or press F9 on your keyboard. Closing the window or pressing F9 again returns the window to the emulator.
如果模拟面板已可见,按F8键将键盘焦点移到其中。
要从emulator窗口中解除模拟面板的锁定,请选择面板底部的按钮或按键盘上的F9键。关闭窗口或再次按F9键将窗口返回到仿真器。
The simulation control panel can be launched as a separate application, allowing you to connect to and control the HoloLens 2 Emulator, a HoloLens 2 device, or Windows Mixed Reality simulation by running PerceptionSimulationInput.exe from %ProgramFiles(x86)%\Windows Kits\10\Microsoft XDE\10.0.18362.0.
模拟控制面板可以作为单独的应用程序启动,通过从%ProgramFiles(x86)%\Windows Kits\10\Microsoft XDE\10.0.18362.0运行PerceptionSimulationInput.exe,您可以连接并控制HoloLens 2 Emulator、HoloLens 2设备或Windows混合现实模拟。
Account tab账户选项卡
The Account tab lets you configure the emulator to sign in with a Microsoft Account. This is useful for testing APIs that require the user to be signed in with an account. Toggling this option requires that you completely close and restart the HoloLens Emulator for the setting to take effect. If this option is enabled, later launches of the emulator will ask you to sign in, just like a user would the first-time HoloLens is started. To enter your credentials using your PC’s keyboard, first turn off Use keyboard for simulation in the Simulation Control Panel or press F4 on your keyboard to toggle the keyboard setting on or off.
帐户选项卡允许您配置emulator以使用Microsoft帐户登录。这对于测试需要用户使用帐户登录的API非常有用。切换此选项需要完全关闭并重新启动 HoloLens模拟器,设置才能生效。如果启用此选项,以后启动emulator时将要求您登录,就像用户第一次启动HoloLens时一样。要使用电脑键盘输入凭据,请先在“模拟控制面板”中关闭“使用键盘进行模拟”,或按键盘上的F4键以打开或关闭键盘设置。
Optional settings tab可选设置选项卡
The Optional settings tab displays a control to enable or disable hardware accelerated graphics. Hardware accelerated graphics are used by default, if supported by your PC’s graphics adapter drive. If your graphics adapter’s driver doesn’t support GPU-PV, this option won’t be visible.
可选设置选项卡显示用于启用或禁用硬件加速图形的控件。如果电脑的图形适配器驱动器支持,则默认情况下使用硬件加速图形。如果图形适配器的驱动程序不支持GPU-PV,则此选项将不可见。
Diagnostics tab诊断选项卡
The Diagnostics tab shows the emulator’s IP address in the form of a link to Windows Device Portal along with the status of the virtual GPU.
“诊断”选项卡以指向Windows设备门户的链接形式显示模拟器的IP地址以及虚拟GPU的状态。
Network tab网络选项卡
The Network tab shows the network adapter details for the emulator, as well as network adapter details for the host machine. For the HoloLens 2 Emulator, this tab will only appear when running the emulator on the Windows 10 May 2019 Update or newer.
“网络”选项卡显示仿真程序的网络适配器详细信息,以及主机的网络适配器详细信息。对于HoloLens 2 Emulator,此选项卡仅在Windows 10 May 2019 Update或更新版本上运行Emulator时出现。
NAT Configuration tab
This tab will only appear when running the emulator on the Windows 10 May 2019 Update or newer.
The emulator uses your PC’s network connection and sits behind a NAT. This tab allows you to map ports from your host PC to the emulator, which enables remote devices to connect to applications and services running in the emulator.
仅当在Windows 10 May 2019 Update或更新版本上运行emulator时,此选项卡才会出现。
仿真器使用PC的网络连接,并位于NAT后面。此选项卡允许您将端口从主机PC映射到仿真器,从而使远程设备能够连接到在仿真器中运行的应用程序和服务。
For example, if you want to access Device Portal on the emulator from a remote PC:
1.Add an entry for internal port 80 (the port on which Device Portal is listening) by double-clicking on a free row in the table. For other applications, enter the port number on which that application is listening.
2.Choose any available external port. In this example, we’ll use port 8080 as the external port.
3.Select the protocol. The default is TCP. Since Device Portal uses TCP, we’ll leave the default.
4.Click “Apply Changes” to enable the mapping. The ‘Status’ will change from ‘Pending’ to ‘Active’.
5.On the remote PC, open a browser and navigate to (IP-of-the-PC-running-the-emulator):8080. The Device Portal interface will appear. The IP address you use on a remote PC must be the IP address of the PC running the emulator, not of the emulator itself. You can retrieve the IP through various means such as the Settings app on the PC in the ‘Network & Internet’ category, ‘ipconfig’ from a Command Prompt and from the Network tab in the emulator Tools dialog by looking for the Desktop Adapter entry.
Also note that if you add a port mapping for Device Portal, you can control the emulator remotely using the Perception Simulation Control tool included in the emulator installation or with the Perception Simulation APIs by connecting to the host PC’s IP address and Device Portal external port, such as 8080 in the example above. When using Perception Simulation Control to connect to and control the emulator remotely, only specify the PC’s IP address and the configured port. Don’t include ‘https://’.
例如,如果要从远程PC访问emulator上的设备门户:
1.双击表中的空闲行,为内部端口80(设备门户正在侦听的端口)添加一个条目。对于其他应用程序,请输入该应用程序正在侦听的端口号。
2.选择任何可用的外部端口。在本例中,我们将使用端口8080作为外部端口。
3.选择协议。默认值是TCP。由于设备门户使用TCP,我们将保留默认设置。
4.单击“应用更改”以启用映射。“状态”将从“挂起”更改为“活动”。
5.在远程PC上,打开浏览器并导航到(运行仿真器的PC的IP):8080。将出现设备入口界面。在远程PC上使用的IP地址必须是运行仿真器的PC的IP地址,而不是仿真器本身的IP地址。通过查找桌面适配器条目,您可以通过各种方式检索IP,例如从命令提示符和emulator Tools(仿真器工具)对话框中的Network(网络)选项卡上的“网络和互联网”类别中的PC上的Settings(设置)应用程序“ipconfig”。
还请注意,如果为设备门户添加端口映射,则可以使用emulator安装中包含的Perception Simulation control tool或Perception Simulation API,通过连接到主机PC的IP地址和设备门户外部端口(如上例中的8080),远程控制仿真器。使用Perception Simulation Control远程连接和控制仿真器时,仅指定电脑的IP地址和配置的端口。不包括“https://”。
There are no port mappings by default. Any mappings you configure are persistent across launches of the HoloLens 2 Emulator and will be enabled automatically when the emulator has booted fully.
Use the ‘Export’ button to save your mappings to a file. You can then share this file with other team members who can use the ‘Import’ button to automatically configure the same mappings.
默认情况下没有端口映射。您配置的任何映射在HoloLens 2 Emulator启动期间都是持久的,并且在Emulator完全启动时将自动启用。
使用“导出”按钮将映射保存到文件。然后,您可以与其他团队成员共享此文件,他们可以使用“导入”按钮自动配置相同的映射。
Using a Windows Mixed Reality immersive headset and motion controllers with the HoloLens 2 Emulator
使用Windows混合现实沉浸式耳机和带有HoloLens 2模拟器的运动控制器
Starting with the HoloLens 2 Emulator (Windows Holographic, version 2004), you can use a Windows Mixed Reality headset and motion controllers to view and interact with the HoloLens 2 Emulator in stereo. This allows you to make faster, more natural movements with your head and hands without a HoloLens 2 device. It isn’t a complete replacement for a HoloLens 2 device, but is intended to give an improved experience beyond interacting with the emulator using keyboard, mouse and gamepad in a 2D desktop window. To enable this feature:
1.Ensure that Windows Mixed Reality is configured on your PC and your Windows Mixed Reality immersive headset is connected.
2.Launch the HoloLens 2 Emulator
3.Open the Simulation panel by clicking the toolbar button or pressing F7.
4.Scroll the panel to the bottom.
5.Check the box labeled “Use HMD for simulation”
6.Windows Mixed Reality will start and the emulator display will change slightly. Without a headset, the emulator places both eyes in the center of the head and displays only one eye. With a headset, the emulator generates true stereo output but only renders one eye to its desktop window, while both eyes are rendered to your headset.
7.Optionally turn on one or both motion controllers. Controller input is mapped to hand input in the emulator. For example, to tap, pull the trigger on the motion controller. To move around, use the thumbstick. For a complete list of controls, see Advanced HoloLens Emulator and Mixed Reality Simulator input
Having trouble seeing content in your headset?
If the display is blank in both the headset and Mixed Reality Portal, but you see content in the HoloLens 2 Emulator window on your desktop, verify that hardware graphics acceleration is enabled in the emulator. Windows Mixed Reality immersive headset support requires hardware graphics acceleration to be enabled in the emulator.
If you see content in the headset but holograms are blurry or you see a double image, use the following steps to adjust the stereo view for your eyes:
1.Temporarily turn off “Use HMD for simulation”.
2.Launch Registry Editor (regedit.exe)
3.Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PerceptionSimulation
4.Create a new DWORD value named “EnableEyePoseControl” and set its value to 1.
5.Enable “Use HMD for simulation” in the emulator.
6.When content appears in the headset, use the arrow keys to adjust eye rotation. Hold Left Alt to adjust the left eye and Right Alt to adjust the right eye. Use ‘Q’ and ‘E’ to adjust the roll for each eye, again holding the appropriate Alt key for the eye. Use the ‘+’ and ‘-’ keys to adjust the distance between the eyes. (Note that +/- on a number pad will not work. Use the buttons on the main keyboard.)
7.When the stereo view appears correct, press ‘S’ to save your changes. The new configuration will be saved for future launches of the emulator.
8.If you want to abandon your changes and revert to the previous configuration, press ‘L’ to load the default or previous configuration.
9.Change the “EnableEyePoseControl” value in the registry to 0 and cycle the “Use HMD for simulation” option.
If you have saved a configuration and want to remove it, you can delete the value named “DisplayConfiguration” at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PerceptionSimulation. If you are currently using the headset with the emulator, you will need to turn off “Use HMD for simulation” and turn it back on to see this change take effect.
HoloLens2开发:模拟器使用方法
本文详细介绍了如何使用HoloLens2模拟器进行开发,包括使用键盘、鼠标、Xbox控制器进行控制,模拟用户的手势操作如前进、后退、空中点击等。此外,还提供了模拟器工具栏的使用说明,如模拟控制面板、账户设置和网络选项等,以及如何使用Windows Mixed Reality设备进行沉浸式体验。
2724

被折叠的 条评论
为什么被折叠?



