Skip to content

Commit 94353bf

Browse files
authored
Merge pull request #15 from Dschadu/beta-0.2.0
0.2.0
2 parents 07043de + b0d71ec commit 94353bf

File tree

19 files changed

+627
-783
lines changed

19 files changed

+627
-783
lines changed

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,12 @@ ASALocalRun/
353353
# Local History for Visual Studio
354354
.localhistory/
355355
*.rc
356-
/client_cli_zscaler/client_cli_zscaler.vcxproj.filters
357356
/.tmp.drivedownload
358357
/client_overlay/bin/VC_redist.x64.exe
359358
/zzCopyFiles.bat
360359
/startdesktopmode.bat.lnk
361-
/Old MotionCompensationManager cpp.txt
362-
/Notizen.txt
363-
/DeviceIDs.txt
364-
/DebugLog Coordinates.txt
365360
/Mainwindow.png
366361
/Hotfix
367-
/installer/OVRMC_v0_3.exe
368362
/zzHotfixCopy.bat
369363
/installer/old Installer
370-
/installer/OpenVR-MotionCompensation010.exe
364+
/installer/binary

Readme.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
![language](https://img.shields.io/badge/Language-C%2B%2B11-green.svg) ![dependencies](https://img.shields.io/badge/Dependencies-Boost%201.63-green.svg) ![license_gpl3](https://img.shields.io/badge/License-GPL%203.0-green.svg)
22

3-
# DO NOT USE THIS OR EXPECT ANYTHING AS A USER
3+
# Beta Version, may cause crashes or contain bugs!
44

5-
No releases have been created, and we are very much in development mode. If you are interested in testing (and know how to compile code) or are interested in being a maintainer, please connect with us on the [discord `development` channel](https://discord.gg/r7krmSd)
5+
We are very much in development mode. If you are interested in testing or are interested in being a maintainer, please connect with us on the [discord `development` channel](https://discord.gg/r7krmSd)
66

7-
# [Former docs] OpenVR-InputEmulator
7+
# OpenVR-MotionCompensation
88

9-
An OpenVR driver that allows to enable motion compensatio.
10-
Includes a dashboard to configure some settings directly in VR.
9+
An OpenVR driver that allows to enable motion compensation.
10+
Includes a dashboard to configure the settings directly in VR.
1111

12-
The OpenVR driver hooks into the lighthouse driver and allows to modify any pose updates or button/axis events coming from the Vive controllers before they reach the OpenVR runtime.
12+
This driver hooks into the device driver and allows to modify any pose updates coming from the HMD before they reach the OpenVR runtime.
1313
Due to the nature of this hack the driver may break when Valve decides to update the driver-side OpenVR API.
1414

15-
The motivation of this driver is to allow the base of motion simulators (driving or flying) to be the reference point for the world, cancelling out simulator movement and differencing
16-
head movement from the simulator movement to update the pose.
15+
The motivation of this driver is to allow the base of motion simulators (driving or flying) to be the reference point for the world, cancelling out simulator movement and differencing head movement from the simulator movement to update the pose.
1716

1817

1918
# Notes:
2019

2120
This is a work-in-progress and may contain bugs.
2221

2322

23+
## How to open
24+
25+
There are two ways to open the settings page:
26+
1. On VR, open the Steam Dashboard (Menu button on the controller). In the bottom left is a new icon, a small cogwheel. Click on this icon to bring up the OVRMC overlay
27+
2. Go to the install folder and click on "startdesktopmode.bat". This will open OVRMC on your regular desktop.
28+
29+
2430
## Top Page:
2531

2632
![Root Page](docs/screenshots/DeviceManipulationPage.png)
2733

28-
- **Identify**: Sends a haptic pulse to the selected device (Devices without haptic feedback like the Vive trackers can be identified by a flashing white light).
29-
- **Status**: Shows the current status of the selected device.
30-
- **Device Mode**: Allows to select a device mode.
31-
- **Default**: Default mode.
32-
- **Disable**: Let OpenVR think that the device has been disconnected.
33-
- **Redirect to**: Impersonate another device.
34-
- **Swap with**: Swap two devices.
35-
- **Motion Compensation**: Enable motion compensation with the selected device as reference device.
36-
- **Device Offsets**: Allows to add translation or rotation offsets to the selected device.
37-
- **Motion Compensation Settings**: Allows to configure motion compensation mode.
38-
- **Render Model**: Shows a render model at the device position (experimental).
39-
- **Input Remapping**: Allows to re-map input coming from controller buttons, joysticks or touchpads.
40-
- **Profile**: Allows to apply/define/delete device offsets/motion compensation profiles.
41-
42-
43-
## Motion Compensation Settings Page:
44-
45-
![Motion Compensation Settings Page](docs/screenshots/MotionCompensationPage.png)
46-
47-
**Vel/Acc Compensation Mode**: How should reported velocities and acceleration values be adjusted. The problem with only adjusting the headset position is that pose prediction also takes velocity and acceleration into accound. As long as the reported values to not differ too much from the real values, pose prediction errors are hardly noticeable. But with fast movements of the motion platform the pose prediction error can be noticeable. Available modes are:
48-
- **Disabled**: Do not adjust velocity/acceration values.
49-
- **Set Zero**: Set all velocity/acceleration values to zero. Most simple form of velocity/acceleration compensation.
50-
- **Use Reference Tracker**: Substract the velocity/acceleration values of the motion compensation reference tracker/controller from the values reported from the headset. Most accurate form of velocity/acceleration compensation. However, it requires that the reference tracker/controller is as closely mounted to the head position as possible. The further away it is from the head position the larger the error.
51-
- **Linear Approximation w/ Moving Average (Experimental)**: Uses linear approximation to estimate the velocity/acceleration values. The used formula is: (current_position - last_position) / time_difference. To reduce jitter the average over the last few values is used.
52-
- **Moving Average Window**: How many values are used for calculating the average.
53-
- **Kalman Filter (Experimental)**: The position values are fed into a kalman filter which then outputs a velocity value. The kalman filter implementation is based on the filter described [here](https://en.wikipedia.org/wiki/Kalman_filter#Example_application.2C_technical).
54-
- **Process/Observation Noise**: Parameters used to fine-tune the kalman filter.
55-
34+
- **HMD**: Choose the HMD you use (usaly only one should appear)
35+
- **Status**: Shows the current status of the selected HMD.
36+
- **Reference Tracker**: Choose the tracker / controller you want to use as reference.
37+
- **Status**: Shows the current status of the selected tracker / controller.
38+
- **Identify**: Sends a haptic pulse to the selected device (not yet implemented)
39+
- **Enable Motion Compensation**: Enable motion compensation with the selected devices.
40+
- **LPF Beta value**: Filter setting. Need to be between 0 and 1. Use the +- Buttons to incread / decrease in 0.05 Steps.
41+
- **Apply**: Apply the choosen settings.
42+
43+
44+
## LPF Beta value:
45+
46+
Values must be between 0 and 1. A value closer to 0 means a stronger filter. A value clsoer to 1 means a weaker filter.
47+
If the value is to low, you may expirience a slow drifting. Raise the value for a faster response.
48+
Default value is set to 0.2
49+
50+
51+
## Mounting advice:
52+
53+
Mount the reference tracker/controller as closely to the head position as possible. The further away it is from the head position the larger the error.
54+
Continuous and heavy vibration will affect the IMU performance, causing noticable IMU drift. This will be noticable in the HMD in form of your camera moving violently arround the car. To adress this, it is suggested to use a damping system.
55+
5656

5757
## Initial Setup
5858
See the wiki
5959

6060
## Building
61-
1. Open *'VRInputEmulator.sln'* in Visual Studio 2019.
61+
1. Open *'VRMotionCompensation.sln'* in Visual Studio 2019.
6262
2. Build Solution
6363

6464
# License
6565

66-
This software is released under GPL 3.0.
66+
This software is released under GPL 3.0.

client_overlay/bin/win64/res/qml/DeviceManipulationPage.qml

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ MyStackViewPage
235235
{
236236
id: deviceModeApplyButton
237237
Layout.preferredWidth: 200
238+
Layout.bottomMargin: 35
238239
enabled: false
239240
text: "Apply"
240241
onClicked:
@@ -247,6 +248,42 @@ MyStackViewPage
247248
{
248249
deviceManipulationMessageDialog.showMessage("Set Device Mode", "Could not send LPF Beta:\n" + DeviceManipulationTabController.getDeviceModeErrorString())
249250
}
251+
if (!DeviceManipulationTabController.setDebugMode(true))
252+
{
253+
deviceManipulationMessageDialog.showMessage("Debug logger", "Could not start or stop logging:\n" + DeviceManipulationTabController.getDeviceModeErrorString())
254+
}
255+
}
256+
}
257+
}
258+
259+
//Debug Mode
260+
RowLayout
261+
{
262+
spacing: 18
263+
264+
MyText
265+
{
266+
text: "Debug Logger"
267+
}
268+
}
269+
270+
//Enable debug logger:
271+
RowLayout
272+
{
273+
spacing: 16
274+
275+
MyPushButton
276+
{
277+
id: debugLoggerButton
278+
Layout.preferredWidth: 250
279+
text: "Start logging"
280+
enabled: false // Set to "true" (without the " " ) to enable debug logger
281+
onClicked:
282+
{
283+
if (!DeviceManipulationTabController.setDebugMode(false))
284+
{
285+
deviceManipulationMessageDialog.showMessage("Debug logger", "Could not start or stop logging:\n" + DeviceManipulationTabController.getDeviceModeErrorString())
286+
}
250287
}
251288
}
252289
}
@@ -294,14 +331,14 @@ MyStackViewPage
294331
fetchHMDInfo()
295332
}
296333
}
297-
onDeviceManipulationProfilesChanged:
298-
{
299-
reloadDeviceManipulationProfiles()
300-
}
301334
onSettingChanged:
302335
{
303336
lpfBetaInputField.text = DeviceManipulationTabController.getLPFBeta().toFixed(4)
304337
}
338+
onDebugModeChanged:
339+
{
340+
debugLoggerButton.text = DeviceManipulationTabController.getDebugModeButtonText()
341+
}
305342
}
306343

307344
}

0 commit comments

Comments
 (0)