Skip to content

Commit

Permalink
Release v0.5.1
Browse files Browse the repository at this point in the history
v0.5.1
  • Loading branch information
lucas-vrtech committed Mar 22, 2022
2 parents d98b808 + 2b9f97a commit 79481d9
Show file tree
Hide file tree
Showing 34 changed files with 613 additions and 547 deletions.
61 changes: 34 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
# OpenGloves Driver [![Steam Badge]][Steam] [![Discord Badge]][Discord]

A general purpose **SteamVR** driver with an **[Open Interface]** <br>
for anyone to connect their **DIY** **VR***( Glove )* hardware.
A **SteamVR (OpenVR)** driver for VR Gloves and DIY Hardware.<br>

---

**[Installation] ⸥ ⸢ [Limitations] ⸥ ⸢ [Compatibility]**
## Download
[![Steam Badge]][Steam]

---
OpenGloves is available on **[Steam]**,<br>
where it comes with additional tools for configuring driver related features.

## Features

- **Haptic Force Feedback**
### Driver Features

- **Force Feedback**

- **Full Finger Tracking** <br>
*‹ Beta › Splay Support* <br>
*‹ Beta › Individual Joint Support*
*Splay Support* <br>
*Individual Joint Support*

- **Tracker / Controller Positioning** <br>
*Automatic relative calibration* <br>
*Controller ⟷ Glove*
- **Tracker / Controller Positioning & Offsetting** <br>

- **Button / Joystick Inputs** <br>
*➜ Trigger | A | B* <br>
*➜ Joystick | X | Y | Click*

- **Multiple Communication Protocols** <br>
- **Multiple Communication Methods** <br>
*- Bluetooth Serial* <br>
*- Named Pipes* <br>
*- Serial USB*

<br>
### Additional Tools

### Steam UI

The **[Steam]** version of **OpenGloves** also comes <br>
with a **[UI]** for configuring driver related features.

##### UI Supported Features
#### OpenGloves UI
**[OpenGloves UI]** is an application that ships with the driver on Steam. <br>
It provides additional features for configuring driver related features, such as:<br>
- Managing driver settings
- Force Feedback Testing
- Editable Driver Settings
- Automatic Calibration <br>
*Controller ⟷ Glove*
- Automatically calibrating Controller ⟷ Glove offsets

---
## Custom Hardware

To make your own hardware compatible with **OpenGloves**, refer to the **[Driver Input]** page. <br>

## Contributing

Expand All @@ -59,9 +56,15 @@ with a **[UI]** for configuring driver related features.

| Author | Discord |
|:------:|:-------:|
| **[Danwillm]** | `danwillm#8254` |
| **[danwillm]** | `danwillm#8254` |
| **[Lucas VRTech]** | `LucidVR#0001` |

---

**[Manual Installation] ⸥ ⸢ [Building] ⸥ ⸢ [Limitations] ⸥ ⸢ [Compatibility]**

---


<!----------------------------------------------------------------------------->

Expand All @@ -70,13 +73,17 @@ with a **[UI]** for configuring driver related features.

[Discord]: https://discord.gg/lucidvr
[Steam]: https://store.steampowered.com/app/1574050/OpenGloves
[Steam Page]: https://store.steampowered.com/app/1574050/OpenGloves

[Installation]: docs/Installation.md
[Manual Installation]: docs/Installation.md
[Building]: docs/Building.md
[Limitations]: docs/Limitations.md
[Compatibility]: docs/Compatibility.md

[UI]: https://github.com/lucidVR/opengloves-ui
[Open Interface]: https://github.com/LucidVR/opengloves-driver/wiki/Driver-Input
[OpenGloves UI]: https://github.com/lucidVR/opengloves-ui

[Driver Input]: https://github.com/LucidVR/opengloves-driver/wiki/Driver-Input

[Issue]: https://github.com/LucidVR/opengloves-driver/issues

Expand Down
58 changes: 33 additions & 25 deletions docs/Building.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Binaries are (or will) be provided in the Releases in this Repository, but if you would prefer to build the driver yourself instructions are documented below.
# Building OpenGloves
If you'd like to make changes to OpenGloves, follow the instructions below to set up a local copy of the repository.

If you're looking to use OpenGloves to use your hardware in SteamVR applications, it is heavily recommended to install the driver on Steam.

## Setting Up
Pre-built binaries are be provided in the Releases in this Repository, but if you would prefer to build the driver yourself instructions are documented below.

# Setting Up
* Clone the repo **(including submodules)**
* `git clone --recursive https://github.com/LucidVR/opengloves-driver.git`
*If this doesn't clone the submodules correctly, try `git submodule update --init --recursive`
Expand All @@ -20,29 +25,29 @@ Binaries are (or will) be provided in the Releases in this Repository, but if yo

This should generate Visual Studio project files in the `build/` folder, which you can then compile.

# Building with Visual Studio Build Tools
## Building with Visual Studio Build Tools
* run a cmake build in the `build/` folder
* `cmake --build . --config Release`
* The artifacts of the build will be outputted to `build/Debug/`, or `build/Release/` depending on build configuration

# Building with Visual Studio IDE
## Building with Visual Studio IDE
* Open the Visual Studio project (.sln file) in the `build/` folder
* You should already have the ability to build the driver by pressing `Ctrl + Shift + B`
* The artifacts of the build will be outputted to `build/Debug/`, or `build/Release/` depending on build configuration

# Adding driver to Steam
## Adding driver to Steam
**Note:** For a more streamlined debugging environment, refer to [Debugging with Visual Studio](https://github.com/LucidVR/opengloves-driver/blob/develop/BUILDING.md#debugging-with-visual-studio).
This step is for people who may not necessarily want to setup a debugging environment, or are testing release builds.
* Copy the `openglove` folder into the steamvr drivers folder
* Usually located `C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers`
* Running SteamVR you should see the driver activate two new controllers
* Run SteamVR

# Debugging with Visual Studio
If you want to make changes to the code and would like to use a debugger/not have to copy builds by hand, you are able to do so with the following steps:

* Navigate to `C:\Users\<user>\AppData\Local\openvr`
* Open `openvrpaths.vrpath`.
* Append the build output path of the project to `external_drivers`. For example:
* Append the `build/<build_type>/openglove` path of the project repository to `external_drivers`. For example:

```
{
Expand All @@ -67,28 +72,31 @@ If you want to make changes to the code and would like to use a debugger/not hav
}
```

## Setup the Debugger
## Debugger Setup
SteamVR launches vrserver.exe under a child process of vrstartup.exe, which means that you must have the ability to be able to debug child processes in order to debug your driver. Microsoft provides the Child Process Debugging Power Tool for this.
* Install the Microsoft Process Debugging Tool
* https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool
* Navigate to `Debug>Other Debug Targets>Child Process Debug Settings`
* Check `Enable child process debugging`
* On the first row (with the process name `<All other processes>`, make sure that the `Action` is set to `Do not debug`.
* Add a new row (double click on the empty `Process name` underneath `<All other processes>`.
* Add `vrserver.exe` as the process name
* Ensure that `Action` is set to `Attach Debugger`.

## Launch SteamVR/Overlay when building through Visual Studio
It's usually quite useful to build then automatically launch SteamVR/Overlay for debugging purposes.
The project includes both a SteamVR Driver & Overlay (found in `overlay/`). Running the overlay exe automatically launches SteamVR.
The overlay is used for utilising methods that are not found in the OpenVR Driver API, such as discovering controllers. If you do not need this functionality, you can simply launch SteamVR.
* VS 2015, 2017, 2019: https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool
* VS 2022: https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool2022

* Navigate to `Debug>Other Debug Targets>Child Process Debug Settings` in the top bar of Visual Studio<br>
<img src="https://user-images.githubusercontent.com/39023874/154146932-2a8b08e8-b2a8-43e6-b043-55202c1e2fbe.png" width="500" height="200" >
<br>

1. Tick `Enable child process debugging`
2. On the first row (with the process name `<All other processes>`, make sure that the `Action` is set to `Do not debug`.
3. Add a new row (double click on the empty `Process name` underneath `<All other processes>`
4. Add `vrserver.exe` as the process name
5. Ensure that `Action` is set to `Attach Debugger` <br>
![image](https://user-images.githubusercontent.com/39023874/154147019-390ee21d-cce4-406c-987a-0b824ec32146.png)

## Launch SteamVR when building through Visual Studio
It's usually quite useful to build then automatically launch SteamVR/ for debugging purposes.

To launch SteamVR for debugging:
* Click on the arrow next to `Local Windows Debugger`
* Select `ALL_BUILD Debug Properties`
* Navigate to the `Debugger` Property (under Configuration Properties)
* Set `Command` to the location of `vrstartup.exe` (to start just SteamVR) or the Overlay exe (to start the Ovlerlay and SteamVR).
* SteamVR's entry point (`vrstartup.exe`) is usually located `C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\win64\vrstartup.exe`
* OpenGlove's Overlay is usually found in the build folder, `overlay\Debug\openglove_overlay.exe`
* Provide the full or relative path to the executable, such as `E:\opengloves-driver\build\overlay\Debug\openglove_overlay.exe`, or `$(solutionDir)overlay\Debug\openglove_overlay.exe`
* SteamVR's entry point (`vrstartup.exe`) is usually located<br> `C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\win64\vrstartup.exe`

![Debug Properties](https://cdn.discordapp.com/attachments/790676300552994826/840985376679002172/unknown.png)
![Debugging Configuration Properties](https://cdn.discordapp.com/attachments/790676300552994826/840985404202549318/unknown.png)
![image](https://user-images.githubusercontent.com/39023874/154147592-4e55fc13-73cb-4814-ad43-4abecb4fc3f6.png)
23 changes: 2 additions & 21 deletions docs/Compatibility.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@

# Compatibility

<br>

## Officially Hardware

The following projects are known to be compatible with **OpenGloves**.

- **[LucidGloves]** <br>
*by [Lucas VRTech]*

- **[Fngrs]** <br>
*by [danwillm]*

<br>

**Made your own hardware? Let us know!**

---

## Your Hardware

While **OpenGloves** is capable of handling <br>
Expand Down Expand Up @@ -50,20 +32,19 @@ This is our own **[Firmware]** that is compatible with <br>

##### Finger Curling

Is supported in games that work with the **Index** controllers.
Is supported in games which have finger tracking support for the **Index** controllers, or other controllers.

<br>

##### Force Feedback

Unfortunately, game compatibility <br>
with this feature is **[More Limited][Game Compatibility]**.
with Force Feedback is **[More Limited][Game Compatibility]**.

If you'd like to make your **Game** / **Mod** compatible <br>
with `Force Feedback`, please refer to the **[Wiki][Integration]**.



<!----------------------------------------------------------------------------->

[LucidGloves]: https://github.com/LucidVR/lucidgloves
Expand Down
3 changes: 1 addition & 2 deletions docs/Installation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

# Installation & Usage

It is strongly recommended to use the **[Steam]** version <br>
to receive `Automatic Updates` as well as a `Builtin UI`.
It is strongly recommended to use the **[Steam]** version to receive sutomatic updates as well as additional tools.

[![Steam Preview]][Steam]

Expand Down
4 changes: 3 additions & 1 deletion include/Communication/CommunicationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommunicationManager {

virtual void BeginListener(const std::function<void(VRInputData)>& callback);
virtual void Disconnect();
virtual void QueueSend(const VRFFBData& data);
virtual void QueueSend(const VROutput& data);

virtual bool IsConnected() = 0;

Expand All @@ -26,6 +26,8 @@ class CommunicationManager {
virtual void WaitAttemptConnection();

virtual bool Connect() = 0;

virtual void PrepareDisconnection(){};
virtual bool DisconnectFromDevice() = 0;
virtual void LogError(const char* message) = 0;
virtual void LogMessage(const char* message) = 0;
Expand Down
10 changes: 7 additions & 3 deletions include/Communication/NamedPipeCommunicationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <atomic>
#include <memory>
#include <array>

#include "Communication/CommunicationManager.h"
#include "DeviceConfiguration.h"
Expand All @@ -11,7 +12,10 @@ class NamedPipeCommunicationManager : public CommunicationManager {
public:
NamedPipeCommunicationManager(VRNamedPipeInputConfiguration configuration, const VRDeviceConfiguration& deviceConfiguration);
bool IsConnected() override;
void QueueSend(const VRFFBData& data) override{};

// no sending for named pipes
void QueueSend(const VROutput& data) override{};
void BeginListener(const std::function<void(VRInputData)>& callback) override;

protected:
bool Connect() override;
Expand All @@ -27,13 +31,13 @@ class NamedPipeCommunicationManager : public CommunicationManager {
return true;
};

void BeginListener(const std::function<void(VRInputData)>& callback) override;

private:
std::unique_ptr<NamedPipeListener<VRInputData>> namedPipeListener_;
std::atomic<bool> isConnected_;

std::function<void(VRInputData)> callback_;

VRNamedPipeInputConfiguration configuration_;

std::vector<std::unique_ptr<IListener>> namedPipeListeners_;
};
2 changes: 2 additions & 0 deletions include/Communication/SerialCommunicationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class SerialCommunicationManager : public CommunicationManager {

protected:
bool Connect() override;

void PrepareDisconnection() override;
bool DisconnectFromDevice() override;
void LogError(const char* message) override;
void LogMessage(const char* message) override;
Expand Down
3 changes: 3 additions & 0 deletions include/DeviceConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct VRDeviceConfiguration {
vr::ETrackedControllerRole role;
bool enabled;
bool feedbackEnabled;
bool indexCurlTrigger;
VRPoseConfiguration poseConfiguration;
VREncodingProtocol encodingProtocol;
VRCommunicationProtocol communicationProtocol;
Expand All @@ -86,13 +87,15 @@ struct VRDeviceConfiguration {
const vr::ETrackedControllerRole role,
const bool enabled,
const bool feedbackEnabled,
const bool indexCurlTrigger,
const VRPoseConfiguration poseConfiguration,
const VREncodingProtocol encodingProtocol,
const VRCommunicationProtocol communicationProtocol,
const VRDeviceDriver deviceDriver)
: role(role),
enabled(enabled),
feedbackEnabled(feedbackEnabled),
indexCurlTrigger(indexCurlTrigger),
poseConfiguration(poseConfiguration),
encodingProtocol(encodingProtocol),
communicationProtocol(communicationProtocol),
Expand Down
Loading

0 comments on commit 79481d9

Please sign in to comment.