Code Monkey home page Code Monkey logo

openvr-driver-for-diy's Introduction

EN RU

OpenVR driver for DIY

Driver for OpenVR / SteamVR allowing change HMD and controllers rotation and position with buttons.

Buttons HMD

NumPad 2 & 8 - turn up and down.
NumPad 4 & 6 - turn left and right.
NumPad 1 & 3 - rotation of the head left and right.
NumPad 9 - resetting of turns and rotation. Up & Down - move forward and back.
Left & Right - move left and right.
PageUp & PageDown - move up and down.
End - reset position.

Controller buttons 1

W, A, S, D - move left, right, forward and back.
Q, E - move up and down.
R - reset the move.
Z, X, C, V, 1 - сontroller buttons.
T, G, F, H - rotation of both controllers.
B - reset the rotation of both controllers.

Controller buttons 2

I, K, J, L - move left, right, forward and back.
U, O - move up and down.
P - reset the move.
N, M, <, >, 4 - сontroller buttons.

Setup

Windows

  1. copy the folder "driver" from the archive into the folder "\steamapps\common\SteamVR
  2. start steamVR

Linux

  1. Build Driver:
git clone [email protected]:r57zone/OpenVR-driver-for-DIY.git openvr-driver-for-diy
mkdir openvr-driver-for-diy-build
cd openvr-driver-for-diy-build
cmake ../openvr-driver-for-diy
make
  1. Install Driver:
make install
  1. Start SteamVR

Activate driver

The driver is activated by default and requires no further settings. If it was previously disabled, open the file "\steamapps\common\SteamVR\drivers\sample\recources\settings\default.vrsettings" in an editor and set the "enable" attribute to true, then save and restart SteamVR.

Disable driver

Open the file "\steamapps\common\SteamVR\drivers\sample\recources\settings\default.vrsettings" in an editor and set the attribute "enable" to false, then save and restart SteamVR.

Remove driver

To remove, delete the directory "\steamapps\common\SteamVR\drivers\sample".

Download

Windows Version for x86 & x64.
Download

Feedback

r57zone[at]gmail.com

openvr-driver-for-diy's People

Contributors

1maxnet1 avatar r57zone avatar rhabacker avatar yuripourre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvr-driver-for-diy's Issues

Still confused

I'm trying to make a driver with the ability to map keys kind of like your HalfLifeAlyx driver, but I want to map the keys to control every aspect of the controllers and have the mouse control the HMD (some keyboard buttons too) I just can't figure out where to even start programming my own driver. I'm on windows using visual studio.

disable for hmd and left controller

Is there any way to disable the driver for my hmd and left controller? I need to use my Quest 2 left controller along with my headset along with this driver for my other controller...

Linux - "Invalid input type click for controller"

Hi there and thanks for your software.
Just trying to write some custom driver and found this one gonna be a nice template.
I've built the project for Linux and it started up (I can see the driver is loaded in logs), but the controls are not working, so I'm stuck looking at the home screed. Idk if that was necessary but I did the room setup procedure, just in case.

When looking through logs I saw a ton of the following messages:

Mon Jun 13 2022 22:49:23.820949 - Invalid input type click for controller (/user/head/proximity)
Mon Jun 13 2022 22:49:23.821208 - Invalid input type touch for controller (/user/hand/left/input/trackpad)
Mon Jun 13 2022 22:49:23.821250 - Invalid input type touch for controller (/user/hand/right/input/trackpad)
Mon Jun 13 2022 22:49:23.821291 - Invalid input type position for controller (/user/hand/left/input/joystick)
Mon Jun 13 2022 22:49:23.821310 - Invalid input type position for controller (/user/hand/right/input/joystick)

I didn't find any relative information for that, but after looking through the code a bit, I tried to log some data out of your GetPose function. So it seems like the rotation and position variables were not changing at all for both controllers and hmd, at this moment I noticed the GetAsyncKeyState, which is not implemented in Linux, so ignoring key presses became clear. But the error messages seem to be wrong. Did you have such messages on windows?

How to port this code to input emulator

I compiled the input emulator fixed
project (https://github.com/Louka3000/OpenVR-InputEmulator-Fixed) that uses opervr 1.0.11. It should be perfect for my needs, it creates a virtual controller and allows to move it giving command line. My problem is that It works for the movement but not for the pressure of buttons (I guess it is due the old open vr version). Your driver works perfectly about the buttons emulation, but has two limitation that i need your help to remove:

  1. I can't move the camera in my application (I can use the real hmd if is possible to avoid the hmd emulation),
  2. I need to put the controller in a certain position in order to give the input, can i do it with your driver?

Summarizing, I need the real helmet and two virtual controller in specific location that press buttons.
Can you help me to realize it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.