Giter VIP home page Giter VIP logo

openvr-arduinohmd's Introduction

EN RU

OpenVR Arduino HMD

Driver for OpenVR / SteamVR, which allows to track the head, using any Arduino rotation tracker, for a DIY VR HMD from HDMI display and headset.

Setup

  1. Connect the second VR display and set the extended mode in the monitor settings.
  2. Install SteamVR.
  3. Unpack the driver to a folder "...\Steam\steamapps\common\SteamVR\drivers". Configure the necessary parameters (windowX, windowY, windowWidth, windowHeight and others), in the configuration file "...\Steam\steamapps\common\SteamVR\drivers\arduinohmd\resources\settings\default.vrsettings".
  4. Launch SteamVR and in the SteamVR status window click -> Room Settings -> Small Room -> Calibration -> 170 cm. The SteamVR demo can be closed, and the launch of SteamVR Home can be disabled in the SteamVR settings.
  5. Put on the HMD, if necessary, centering them with key (by default, "Numpad 5" or "CTRL + ALT + R", can change the key in the configuration file by typing the desired key code).

If you are using an Android smartphone, then it will probably be easier to use OpenTrack driver, there you can also read instructions about streaming images to your smartphone.

You can quick turn on and turn off the extended VR monitor of the HMD using the HMD Assistant utility or MultiMonitorTool.

Arduino & rotation trackers

To track the turns of the head, you will need to buy Arduino Nano and connect a board with rotation sensors to it, for example, MPU 6050 GY-521, MPU 9250, MPU 3200 GY-85 or any other if there is a firmware with the output of Yaw, Pitch, Roll values and calibration. The data output is binary (3 float values), an example can be viewed here.

There is a ready-made Arduino firmware for the MPU 3200 GY-85, it is called Razor AHRS. Along with it comes a program for calibration and demonstration. After calibration, replace the file "Output.ino", in the firmware folder, with this. It is important to note here that there are new revisions of GY-85 that are incompatible with this firmware. The following sensors are supported by the firmware: the ADXL345 accelerometer, the ITG-3200 gyroscope and the HMC5843, HMC5883L magnetometers. The calibration instructions can be found on youtube.

There is a ready-made Arduino firmware for MPU 6050 GY-521. It is necessary to solder according to the scheme, download libraries, unpack them into the "libraries" folder of the Arduino IDE. Put the tracker on a flat surface, flash the sketch "MPU6050_calibration.ino" and get the data for calibration. Next, you need to flash the sketch "HMD_MPU6050_DMP6.ino", by entering the calibration data already received into it.

The speed should be changed to 115200 if a different one is set by default.

Configuration file options

Name Description
COMPort The number of the Arduino COM port can be found in the Devices Manager. Use ports from 1 to 9, change it in the device properties if necessary.
CenteringKey The code of the picture centering key, you can change the key in the configuration file by typing the desired key code).
CrouchPressKey The code of the crouch key, you can change the key in the configuration file by typing the desired key code). It is necessary for communication with other drivers, for example, using Razer Hydra controllers and using this driver you can crouch.
CrouchOffset The height of the crouch at the touch of a button.
DistanceBetweenEyes The distance between stereo images, the larger the closer.
DistortionK1, DistortionK2 Lens distortion factors.
ScreenOffsetX Horizontal image shift.
ZoomHeight, ZoomWidth Scaling factors of stereo images.
FOV Degree of field of view. You can zoom in, depending on the VR headset lenses.
displayFrequency Screen refresh rate.
renderWidth, renderHeight Image rendering resolution for one eye.
windowWidth, windowHeight Height and width of the displayed window.
windowX, windowY Window offset is required for display on other monitors. For example, to display on the second display, which is displayed on the right, you need to specify the value 1920 (provided that the first display has a resolution of 1920 by 1080). The exact data can be viewed using the MultiMonitorTool utility, and also with it you can turn off and turn on the second monitor via a bat file.
DebugMode Debug mode, locked at 30 FPS. After checking, it is recommended to set it to false (disable).

Hotkeys

Name Description
Numpad 5, CTRL + ALT + R Centering the picture.
Page Up, Page Down Rise or decline.
Numpad 8, 2, 4, 6 Move forward, backward, left, right.
Numpad 1, 3 Change Yaw.
Numpad 7, 9 Change Roll.
Numpad - Resetting movements and lifting.

Known Issues

  1. Red screen. You can fix this by selecting the "Headset Window" window.

Download

Version for x86 и x64.
Download

Feedback

r57zone[at]gmail.com

openvr-arduinohmd's People

Contributors

r57zone avatar

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.