更新样例配置文件和说明文档
parent
3a2985b357
commit
9fe5b98e78
|
@ -0,0 +1,5 @@
|
||||||
|
# 说明
|
||||||
|
|
||||||
|
1. steamvr_config : 存放SteamVR的配置文件样例,将其内部的SteamVR文件夹替换SteamVR默认文件夹`C:\Program Files (x86)\Steam\steamapps\common`下面的SteamVR文件夹。如果SteamVR并没有安在默认位置,那么需要根据实际安装情况进行调整。
|
||||||
|
2. triad_openvr : 一个openvr的封装库,用于获取设备的信息和位姿
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"alwaysActivate": false,
|
||||||
|
"name" : "null",
|
||||||
|
"directory" : "",
|
||||||
|
"resourceOnly" : false,
|
||||||
|
|
||||||
|
"hmd_presence" :
|
||||||
|
[
|
||||||
|
"*.*"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"driver_null": {
|
||||||
|
"enable": true,
|
||||||
|
"loadPriority": -999,
|
||||||
|
"serialNumber": "Null Serial Number",
|
||||||
|
"modelNumber": "Null Model Number",
|
||||||
|
"windowX": 0,
|
||||||
|
"windowY": 0,
|
||||||
|
"windowWidth": 2160,
|
||||||
|
"windowHeight": 1200,
|
||||||
|
"renderWidth": 1512,
|
||||||
|
"renderHeight": 1680,
|
||||||
|
"secondsFromVsyncToPhotons": 0.01111111,
|
||||||
|
"displayFrequency": 90.0
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,261 @@
|
||||||
|
{
|
||||||
|
"!!__WARNING__": {
|
||||||
|
"000": "DO NOT EDIT THIS FILE TO CHANGE YOUR PERSONAL SETTINGS.",
|
||||||
|
"001": "THIS FILE WILL BE REPLACED WHEN STEAMVR UPDATES.",
|
||||||
|
"002": "These are the default values for settings which are not mentioned",
|
||||||
|
"003": "in the user's personal steamvr.vrsettings file (use vrpathreg.exe",
|
||||||
|
"004": "to find the location of this file). User settings which match the",
|
||||||
|
"005": "default in this file are not written to the user settings file, but",
|
||||||
|
"006": "any setting below may be placed in steamvr.vrsettings to override",
|
||||||
|
"007": "these defaults."
|
||||||
|
},
|
||||||
|
"steamvr": {
|
||||||
|
"requireHmd": false,
|
||||||
|
"forcedDriver": "null",
|
||||||
|
"forcedHmd": "",
|
||||||
|
"displayDebug": false,
|
||||||
|
"debugProcessPipe": "",
|
||||||
|
"enableDistortion": true,
|
||||||
|
"displayDebugX": 0,
|
||||||
|
"displayDebugY": 0,
|
||||||
|
"allowDisplayLockedMode": false,
|
||||||
|
"sendSystemButtonToAllApps": false,
|
||||||
|
"loglevel": 3,
|
||||||
|
"ipd": 0.063,
|
||||||
|
"ipdOffset": 0.0,
|
||||||
|
"background": "",
|
||||||
|
"backgroundUseDomeProjection": false,
|
||||||
|
"backgroundCameraHeight": 1.6,
|
||||||
|
"backgroundDomeRadius": 0.0,
|
||||||
|
"environment": "",
|
||||||
|
"hdcp14legacyCompatibility": false,
|
||||||
|
"gridColor": "",
|
||||||
|
"playAreaColor": "",
|
||||||
|
"showStage": false,
|
||||||
|
"showSkydome": true,
|
||||||
|
"drawTrackingReferences": true,
|
||||||
|
"showGridCircles": true,
|
||||||
|
"saveRecenterStandingZeroPose": true,
|
||||||
|
"saveRecenterSeatedZeroPose": true,
|
||||||
|
"activateMultipleDrivers": true,
|
||||||
|
"usingSpeakers": false,
|
||||||
|
"speakersForwardYawOffsetDegrees": 0.0,
|
||||||
|
"basestationPowerManagement": 0,
|
||||||
|
"ShowBaseStationPowerManagementTip": 1,
|
||||||
|
"neverKillProcesses": false,
|
||||||
|
"renderTargetMultiplier": 1.0,
|
||||||
|
"maxRecommendedResolution": 8192,
|
||||||
|
"supersampleScale": 1.0,
|
||||||
|
"allowSupersampleFiltering": true,
|
||||||
|
"supersampleManualOverride": false,
|
||||||
|
"motionSmoothing": true,
|
||||||
|
"forceFadeOnBadTracking": true,
|
||||||
|
"mirrorView": 0,
|
||||||
|
"showLegacyMirrorView": false,
|
||||||
|
"mirrorViewDisplayMode": 1,
|
||||||
|
"mirrorViewEye": 1,
|
||||||
|
"mirrorViewGeometryMaximized": false,
|
||||||
|
"showPerfGraph": false,
|
||||||
|
"startMonitorFromAppLaunch": true,
|
||||||
|
"startCompositorFromAppLaunch": true,
|
||||||
|
"startDashboardFromAppLaunch": true,
|
||||||
|
"startOverlayAppsFromDashboard": true,
|
||||||
|
"enableHomeApp": true,
|
||||||
|
"setInitialDefaultHomeApp": false,
|
||||||
|
"CycleBackgroundImageTimeSec": -1,
|
||||||
|
"retailDemo": false,
|
||||||
|
"panelMask": true,
|
||||||
|
"panelMaskVignette": true,
|
||||||
|
"panelMaskVignetteWidth": 2.0,
|
||||||
|
"inputBindingUI": true,
|
||||||
|
"legacyInputRebinding": true,
|
||||||
|
"debugInputBinding": false,
|
||||||
|
"doNotFadeToGrid": false,
|
||||||
|
"useNewChaperone": true,
|
||||||
|
"enableLinuxVulkanAsync": false,
|
||||||
|
"enableSafeMode": false,
|
||||||
|
"preferredRefreshRate": 90.0,
|
||||||
|
"hmdDisplayColorGainR": 1.0,
|
||||||
|
"hmdDisplayColorGainG": 1.0,
|
||||||
|
"hmdDisplayColorGainB": 1.0,
|
||||||
|
"customIconStyle": "gradientCorners:#5CBD76,#07AB9C,#6053F6,#0973FA",
|
||||||
|
"customOffIconStyle": "gradient:#514f54-#424449",
|
||||||
|
"trackingLossColor": "#4D6680",
|
||||||
|
"analogGain": 1.3,
|
||||||
|
"globalActionSetPriority": false,
|
||||||
|
"noEdgeExitHaptics": true,
|
||||||
|
"showAdvancedSettings": false,
|
||||||
|
"blockOculusSDKOnOpenVRLaunchOption": false,
|
||||||
|
"blockOculusSDKOnAllLaunches": false,
|
||||||
|
"overlayRenderQuality_2": 0,
|
||||||
|
"displayPortTrainingMode": 0
|
||||||
|
},
|
||||||
|
"direct_mode": {
|
||||||
|
"count": 3,
|
||||||
|
"edidPid0": 43521,
|
||||||
|
"edidPid1": 43522,
|
||||||
|
"edidPid2": 37288,
|
||||||
|
"edidVid0": 53794,
|
||||||
|
"edidVid1": 53794,
|
||||||
|
"edidVid2": 38489,
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
|
"userinterface": {
|
||||||
|
"StatusAlwaysOnTop": true,
|
||||||
|
"HidePopupsWhenStatusMinimized": false,
|
||||||
|
"screenshots": true,
|
||||||
|
"screenshotType": 2,
|
||||||
|
"laserMouseDebugging": false
|
||||||
|
},
|
||||||
|
"notifications": {
|
||||||
|
"DoNotDisturb": false
|
||||||
|
},
|
||||||
|
"keyboard": {
|
||||||
|
"TutorialCompletions": 0,
|
||||||
|
"ScaleX": 1.1,
|
||||||
|
"ScaleY": 1.1,
|
||||||
|
"OffsetLeftX": 0.0,
|
||||||
|
"OffsetRightX": 0.0,
|
||||||
|
"OffsetY": 0.0,
|
||||||
|
"Smoothing": false
|
||||||
|
},
|
||||||
|
"perfcheck": {
|
||||||
|
"perfGraphInHMD": false,
|
||||||
|
"allowTimingStore": false,
|
||||||
|
"saveTimingsOnExit": false,
|
||||||
|
"perfTestData": 0.0
|
||||||
|
},
|
||||||
|
"GpuSpeed": {
|
||||||
|
"gpuSpeed0": 0,
|
||||||
|
"gpuSpeed1": 0,
|
||||||
|
"gpuSpeed2": 0,
|
||||||
|
"gpuSpeed3": 0,
|
||||||
|
"gpuSpeed4": 0,
|
||||||
|
"gpuSpeed5": 0,
|
||||||
|
"gpuSpeed6": 0,
|
||||||
|
"gpuSpeed7": 0,
|
||||||
|
"gpuSpeed8": 0,
|
||||||
|
"gpuSpeed9": 0,
|
||||||
|
"gpuSpeedCount": 0,
|
||||||
|
"gpuSpeedDriver": "",
|
||||||
|
"gpuSpeedHorsepower": 0,
|
||||||
|
"gpuSpeedRenderTargetScale": 0.9999,
|
||||||
|
"gpuSpeedVendor": "",
|
||||||
|
"gpuSpeedVersion": 0
|
||||||
|
},
|
||||||
|
"collisionBounds": {
|
||||||
|
"CollisionBoundsStyle": 0,
|
||||||
|
"CollisionBoundsGroundPerimeterOn": false,
|
||||||
|
"CollisionBoundsCenterMarkerOn": false,
|
||||||
|
"CollisionBoundsPlaySpaceOn": false,
|
||||||
|
"CollisionBoundsFadeDistance": 0.7,
|
||||||
|
"CollisionBoundsWallHeight": 2.4,
|
||||||
|
"CollisionBoundsColorGammaR": 0,
|
||||||
|
"CollisionBoundsColorGammaG": 255,
|
||||||
|
"CollisionBoundsColorGammaB": 255,
|
||||||
|
"CollisionBoundsColorGammaA": 153,
|
||||||
|
"enableDriverBoundsImport" : true
|
||||||
|
},
|
||||||
|
"camera": {
|
||||||
|
"enableCamera": false,
|
||||||
|
"showOnController": false,
|
||||||
|
"enableCameraForCollisionBounds": false,
|
||||||
|
"roomView": 0,
|
||||||
|
"roomViewStyle": 0,
|
||||||
|
"cameraBoundsColorGammaR": 0,
|
||||||
|
"cameraBoundsColorGammaG": 255,
|
||||||
|
"cameraBoundsColorGammaB": 255,
|
||||||
|
"cameraBoundsColorGammaA": 153,
|
||||||
|
"cameraBoundsStrength": 78
|
||||||
|
},
|
||||||
|
"audio": {
|
||||||
|
"enablePlaybackMirror": false,
|
||||||
|
"playbackMirrorDevice": "",
|
||||||
|
"playbackMirrorDeviceName" : "",
|
||||||
|
"enablePlaybackMirrorIndependentVolume" : false,
|
||||||
|
"viveHDMIGain": true,
|
||||||
|
"dualSpeakerAndJackOutput": false,
|
||||||
|
"muteMicMonitor": false
|
||||||
|
},
|
||||||
|
"power": {
|
||||||
|
"powerOffOnExit": true,
|
||||||
|
"turnOffScreensTimeout": 5.0,
|
||||||
|
"turnOffControllersTimeout": 300.0,
|
||||||
|
"returnToWatchdogTimeout": 0.0,
|
||||||
|
"pauseCompositorOnStandby": true,
|
||||||
|
"autoLaunchSteamVROnButtonPress": true
|
||||||
|
},
|
||||||
|
"modelskins": {
|
||||||
|
},
|
||||||
|
"dashboard": {
|
||||||
|
"enableDashboard": true,
|
||||||
|
"allowCurvature": true,
|
||||||
|
"allowPlacementDuringRecenter": false,
|
||||||
|
"arcadeMode": false,
|
||||||
|
"cefMaxFrameRate": 120.0,
|
||||||
|
"dashboardScale": 1.0,
|
||||||
|
"desktopScale": 1.1,
|
||||||
|
"position_2": 1,
|
||||||
|
"webUI": true,
|
||||||
|
"useNewDesktop": true,
|
||||||
|
"enableWindowView": true,
|
||||||
|
"scaleSliderMin": 0.75,
|
||||||
|
"scaleSliderMax": 1.5,
|
||||||
|
"showPowerOptions": true,
|
||||||
|
"allowAppQuitting": true,
|
||||||
|
"showDesktop": true,
|
||||||
|
"lastAccessedExternalOverlayKey": "",
|
||||||
|
"verticalOffsetCm_2": 0,
|
||||||
|
"disableAnimations": false,
|
||||||
|
"standaloneSystemLayer": false,
|
||||||
|
"stickyDashboard": false,
|
||||||
|
"desktopIndex": 1,
|
||||||
|
"theaterScreen": "1",
|
||||||
|
"theaterScreenHeightMeters": 2.0,
|
||||||
|
"theaterModeBrightness": 0.5,
|
||||||
|
"theaterModeReflection": 0.5,
|
||||||
|
"enableLTCReflections": true,
|
||||||
|
"allowSteamOverlays": true,
|
||||||
|
"allowVRGamepadUI": true,
|
||||||
|
"allowDesktopBPMWithVRGamepadUI": false,
|
||||||
|
"steamMatchesHMDFramerate": true
|
||||||
|
},
|
||||||
|
"driver_imu": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"driver_knuckles": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"driver_utah": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"driver_gamepad": {
|
||||||
|
"loadPriority": -50
|
||||||
|
},
|
||||||
|
"driver_ivry": {
|
||||||
|
"loadPriority": -100
|
||||||
|
},
|
||||||
|
"driver_kinoni": {
|
||||||
|
"loadPriority": -800
|
||||||
|
},
|
||||||
|
"driver_amdwvr": {
|
||||||
|
"loadPriority": -900
|
||||||
|
},
|
||||||
|
"input": {
|
||||||
|
"leftThumbstickRotation": 0,
|
||||||
|
"rightThumbstickRotation": 0,
|
||||||
|
"thumbstickDeadzone": 0,
|
||||||
|
"overlayMagnetismEnabled": true,
|
||||||
|
"overlayMagnetismLockDistance": 0.05,
|
||||||
|
"overlayMagnetismDeadZone": 0.6,
|
||||||
|
"overlayFilteringEnabled": true,
|
||||||
|
"overlayFilteringMinCutoff": 1,
|
||||||
|
"overlayFilteringBeta": 5,
|
||||||
|
"overlayFilteringDerivCutoff": 5
|
||||||
|
},
|
||||||
|
"TrackingOverrides" : {
|
||||||
|
"/devices/htc/vive_trackerLHR-FFA35F47" : "/user/head"
|
||||||
|
},
|
||||||
|
"version": "1",
|
||||||
|
"jsonid": "vrsettings"
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"enable": true,
|
||||||
|
"blocked_by_safe_mode": false,
|
||||||
|
"loadPriority": 0
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
94
README.md
94
README.md
|
@ -37,4 +37,96 @@ python tracker_test.py
|
||||||
|
|
||||||
## 2.2 SteamVR的配置
|
## 2.2 SteamVR的配置
|
||||||
|
|
||||||
正常来说,SteamVR的启动必须需要头显才能启动,所以需要对SteamVR的部分配置文件进行修改,以得到无头显启动的目的。
|
正常来说,SteamVR的启动必须需要头显才能启动。所以,采取的方式有两种,第一种是绕过头盔启动。第二种方式是把控制器的虚拟为头盔。
|
||||||
|
|
||||||
|
#### 2.2.1 查看SteamVR的log
|
||||||
|
|
||||||
|
既然是设备是通过steamVR来驱动链接的,那么在steamVR启动的时候,肯定就要做设备初始化等等的工作,那么设备加载初始化的时候,到底是加载了那些文件了,导致非要加载头显HMD。我们可以通过查看log来查看SteamVR到底加载了那些驱动和设置。查看log的方式如下图所示:
|
||||||
|
|
||||||
|
<center>
|
||||||
|
<img src="./Image/SteamVR Log Setting.png" alt="image-20231130113103087" style="zoom:100%;" >
|
||||||
|
</center>
|
||||||
|
|
||||||
|
#### 2.2.2 配置文件的修改——绕过头盔启动
|
||||||
|
|
||||||
|
在找到SteamVR的log后(log文件:`vrserver.txt`),我们可以对log进行分析:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
... [Settings] Load Default Json Settings from ...\common\SteamVR\drivers\htc\resources\settings\default.vrsettings
|
||||||
|
... [Settings] Load Default Json Settings from ...\common\SteamVR\drivers\lighthouse\resources\settings\default.vrsettings
|
||||||
|
... [Settings] Load Default Json Settings from ...\common\SteamVR\drivers\null\resources\settings\default.vrsettings
|
||||||
|
... [Settings] Load Default Json Settings from ...\common\SteamVR\resources\settings\default.vrsettings
|
||||||
|
... [Settings] Load Json Settings from C:\Program Files (x86)\Steam\config\steamvr.vrsettings
|
||||||
|
```
|
||||||
|
|
||||||
|
实际经过发现,**只需要修改2个文件就可以实现绕过头显启动,分别为上面的第3和第4个文件**。
|
||||||
|
|
||||||
|
一般来说,SteamVR的驱动路径为`C:\Program Files (x86)\Steam\steamapps\common\SteamVR`,如果找不到也可以在Steam平台上找到SteamVR,然后选择`右键->管理->浏览本地文件`。
|
||||||
|
|
||||||
|
找到并修改`Resource\Settings\default.vrsettings`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
// requireHmd == false可以使得SteamVR面板的头盔图标亮起, 但是一会儿就处于休眠状态
|
||||||
|
"requireHmd" : false
|
||||||
|
// 强制驱动为null driver, null driver是steamvr的一个空驱动
|
||||||
|
"forcedDriver" : "null"
|
||||||
|
// 强制多个驱动,估计是增加可以激活lighthouse的控制器
|
||||||
|
"activateMultipleDrivers" : true
|
||||||
|
```
|
||||||
|
|
||||||
|
找到`drivers\null\resources\settings\default.vrsettings`进行修改:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"driver_null" : {
|
||||||
|
// 由false修改为ture
|
||||||
|
"enable" : true,
|
||||||
|
"serialNumber" : "Null Serial Number",
|
||||||
|
"modelNumber" : "Null Model Number",
|
||||||
|
"windowX" : 0,
|
||||||
|
"windowY" : 0,
|
||||||
|
"windowWidth" : 2160,
|
||||||
|
"windowHeight" : 1200,
|
||||||
|
"renderWidth" : 1512,
|
||||||
|
"renderHeight" : 1680,
|
||||||
|
"secondsFromVsyncToPhotons" : 0.01111111,
|
||||||
|
"displayFrequency" : 90.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.2.3 配置文件的修改——控制器的虚拟为头盔
|
||||||
|
|
||||||
|
配置文件完整样例在:`Code\steamvr_config`下,下面是修改的原理介绍以及实际修改方法。
|
||||||
|
|
||||||
|
**要将控制器虚拟为头盔,操作和2.2.2的配置一致,但是需要额外添加配置**。通过SteamVR的选项`菜单->设备->管理追踪器->管理定位器`,即可看到控制器的ID信息。如下图所示,本机的定位ID为:LHR-FFA35F47
|
||||||
|
<center>
|
||||||
|
<img src="./Image/控制器ID查看.png" style="zoom: 100%;" >
|
||||||
|
</center>
|
||||||
|
|
||||||
|
对应的修改配置文件,我们在配置文件接近结尾处,添加Json的键值对`TrackingOverrides`, 将控制器的路径映射到头显。值得注意的是,控制器的路径和设备有关,需要根据实际设备的信息调整,不能盲目修改。
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
// 上方省略
|
||||||
|
// 这个地方添加了追踪映射
|
||||||
|
"TrackingOverrides" : {
|
||||||
|
// 注意LHR-FFA35F47一般是控制器设备的信息,根据实际设备进行填写
|
||||||
|
"/devices/htc/vive_trackerLHR-FFA35F47" : "/user/head"
|
||||||
|
},
|
||||||
|
// 以下不用修改
|
||||||
|
"version": "1",
|
||||||
|
"jsonid": "vrsettings"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 三、问题和解决方案
|
||||||
|
|
||||||
|
### 3.1 此设备目前不在定位,请确认其在一个定位器的定位范围内。
|
||||||
|
|
||||||
|
上述问题在SteamVR的面板显示如下图所示。这种问题产生的原因是因为基站的位置放置错误。两个基站放置的太近了,一般两个基站需要相距1米以上。
|
||||||
|
|
||||||
|
<center>
|
||||||
|
<img src="./Image/Tracker Cannot locate.png" style="zoom:100%;" />
|
||||||
|
</center>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue