• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An OSVR plugin for SteamVR, providing SteamVR support for OSVR HMDs.

SteamVR Driver Using OSVR

Join the chat at https://gitter.im/OSVR/SteamVR-OSVR

Maintained at https://github.com/OSVR/SteamVR-OSVR

For details, see http://osvr.github.io

For support, see http://support.osvr.com

Windows alpha binaries: Download Windows Alpha

This is a SteamVR driver for allowing applications written against that API to work with hardware and software running with the OSVR software framework.

Note that despite similar goals, the internal models of the two systems are not the same (in most cases, OSVR has a more flexible, descriptive model), so if you're writing an application from scratch, be sure to evaluate that. This driver exists primarily for compatibility reasons (a bit like the Unity or Unreal integration, but more general), so existing software using the SteamVR system can run on OSVR. OSVR ClientKit itself (along with its wrappers/engine integrations) is and remains the first-class preferred API for working with OSVR.

Binary Usage Instructions

If you'd just like to try this out with pre-compiled binaries on Windows, the link above contains a compressed file with the 32- and 64-bit builds in it. (Other platforms will have to build from source at this time.) This is not the only way to use the binaries, but it's the simplest way to use them with commercially-released SteamVR games.

Installation

  1. Download and extract an OSVR Core snapshot build and whatever plugins you need for your hardware. (Support for the OSVR HDK, among others, is bundled with the main download, no additional plugins required.) This is for the OSVR Server, and is common to using any OSVR-enabled application.
  2. Install Steam and optionally, a SteamVR-enabled game (Team Fortress 2 was tested).
  3. Install SteamVR by hovering over the "Library" button in Steam, clicking on to "Tools" in the drop-down menu, then finding the "SteamVR" entry, right-clicking it, and clicking "Install Game". (You should not need any beta versions of Steam or SteamVR to use this.)
  4. Download the binary snapshot, and extract it using 7-Zip.
  5. Now, you'll need to put the driver where SteamVR can find it.

The default locations are as follows:

  • If you accepted defaults, Steam's nested SteamVR directory is installed in "%ProgramFiles(x86)%\Steam\steamapps\common\SteamVR" - you can paste that into the Windows Run dialog and it should open the right folder. You can also find SteamVR in the Library, Tools section of Steam, right-click it, choose Properties, then Local Files, then "Browse local files..."

    • "The right folder" will contain, among other things, a directory called drivers.
  • Upon extracting the OSVR driver, you'll get a SteamVR-OSVR directory. Drill down through SteamVR-OSVR/lib/openvr until you find an osvr folder.

You'll want to drag the osvr directory drivers directory you found previously. If you are upgrading from an earlier version of the driver, merge its contents with the existing contents of the osvr directory.

To know if you got it right, do the same Windows Run (or other way of opening a folder by its name) as above, with the path "%ProgramFiles(x86)%\Steam\steamapps\common\SteamVR\drivers\osvr\bin\win32" instead. (Make changes as appropriate to suit your Steam install location.) If you got it right, you should see a number of files, including one called driver_osvr.dll.

Usage

In all cases, hook up your hardware and launch OSVR Server first.

Simple: Paste "%ProgramFiles(x86)%\Steam\steamapps\common\SteamVR\demo\bin\win32\hellovr_sdl.exe" into the Windows Run dialog and click run to start the SteamVR simple demo app - you should get a command-prompt window with some text, the screen might flicker, then you should get a split-screen display that reacts to the movement of the HMD by changing your view of a world with infinite cubes of test patterns. (You might need to click to bring the demo window to the foreground.)

Real game: You may wish to open the "VRMonitor" - the SteamVR status window, that should be accessible through the Start Menu. At this time, it appears to also launch Steam in VR or "Big Picture" mode, which may or may not be what you want, but you can close that interface and keep the VR Monitor open. It might say "Not Ready", but if you hover over the HMD icon it should say "HMD Connected, but not ready" - that's normal.

Different games have different ways of turning on VR mode - some you right-click on them in Steam and specify in the options to pass /vr to launch in VR mode. You might find info about this on the Internet - many of these sources are outdated: for example, no command line switch is required for TF2 to run in VR.

In this example, we'll use TF2, which has it accessible in its menu: go to "Options", then "Video" and change "Virtual Reality Mode" to "Enabled". You'll have to save that setting and restart the game before you'll see a new entry on the game's main menu called "Activate Virtual Reality". Selecting "Activate Virtual Reality" should flip the game into VR mode and you're ready to play. (Might be best to use a gamepad, as WASD and mouselook don't go well with VR, the mouselook portion in particular.)

Build Instructions

Prerequisites

  • CMake v3.1 or newer, latest version always recommended
  • A compiler supporting C++11
    • On Windows, Visual Studio 2013 recommended.
    • Recent compilers on Linux are fine too.
    • XCode and clang on OS X will build this project.
  • Somehow create or acquire a build of the following (make sure the bits match for everything that's not header-only):
  • An installation of the Valve Software OpenVR SDK
    • This is currently provided as a git submodule.
    • Run git submodule update --init --recursive to download the OpenVR SDK.

Building

Configure

Use CMake to configure/generate your build. You'll essentially use CMake just as any other project - that is, something like:

mkdir build
cd build
cmake ..

is a start for the command-line-oriented. Or, if you prefer a GUI, this screencast demonstrates configurating and building with CMake's GUI.

The one detail is that you'll want to add the variable CMAKE_PREFIX_PATH and set it to the root directories/"prefixes" (semicolon-separated) where the dependency binaries are (the directory that immediately contains bin, include, and so on.)

Another configuration setting you'll want to consider is CMAKE_INSTALL_PREFIX - you'll probably want to set this to a local directory (like a directory on your desktop), or to the root of a SteamVR/OpenVR tree, since when building the INSTALL project (VS) or the install target (all other build systems), the driver will get installed into the drivers/[platform]/ subdirectory of the install prefix. The system-wide SteamVR install directory on Windows is usually something like C:/Program Files (x86)/Steam/steamapps/common/SteamVR though install there at your own risk!

Build

Use your native build tool - open the generated Visual Studio solution, run make, etc.

Install

As mentioned above, the install target will place the driver binary in a specific directory. If that's not a standard directory, or if you don't re-configure SteamVR/OpenVR to look there, you'll need to copy the driver to such a directory manually.

License and Vendored Projects

  • This project: Licensed under the Apache License, Version 2.0.

  • Vendored projects included in the source tree:

    • /vendor/eigen-3.2.4 - Unpacked release from http://eigen.tuxfamily.org/ - header-only library under the MPL2 (a file-level copyleft, compatible with proprietary software), used with the preprocessor definition EIGEN_MPL2_ONLY to exclude modules with other license from the build.

    • /vendor/libcxx - Extracted files from libc++ - dual-licensed under the MIT and the University of Illinois "BSD-Like" licenses. See that directory for full copyright, license, and credits.

    • /vendor/util-headers - Select header files from util-headers - licensed under the Boost Software License v1.0.

    • /vendor/OSVR-Display - Used for detecting display parameters. Licensed under Apache 2.0.

    • /vendor/googletest - A unit-test framework. Licensed under the New BSD License.

More Repositories

1

OSVR-Core

The core libraries, applications, and plugins of the OSVR software platform.
C++
329
star
2

OSVR-HDK

OSVR HDK production files
Groff
106
star
3

OSVR-Unity

Package for authoring OSVR experiences with Unity.
C#
99
star
4

OSVR-Unreal

OSVR plugin for Unreal Engine
C++
89
star
5

OSVR-Docs

Unified documentation for the OSVR projects.
89
star
6

Unity-VR-Samples

C#
66
star
7

OSVR-Vive

OSVR driver for use with the HTC Vive (including Vive PRE)
C++
62
star
8

OSVR-Oculus-Rift

Oculus Rift tracking plugin for OSVR.
CMake
41
star
9

distortionizer

Tool for determining distortion parameters of arbitrary HMDs, and a corresponding set of shaders to correct that distortion.
CMake
36
star
10

OSVR-Unity-Rendering

Rendering plugin for Unity
C++
33
star
11

OSVR-Android-Build

Repo with submodules for building OSVR for Android
CMake
24
star
12

OSVR-Unity-Palace-Demo

A simple example OSVR Unity 5.6 project.
C#
19
star
13

OSVR-HDK-Windows-Drivers

Drivers and related code/data for improving the hardware experience for the HDK on Windows
NSIS
18
star
14

OSVR-Leap-Motion

OSVR Leap Motion plugin
C++
18
star
15

OSVR-Tracker-Viewer

Utility for viewing OSVR tracking data, using OpenSceneGraph.
C++
15
star
16

Homebrew-OSVR

Mac OS X Homebrew tap for OSVR
Ruby
14
star
17

OSVR-HDK-MCU-Firmware

Firmware source for the main Atmel microcontroller in HMDs related to the OSVR HDK
C
13
star
18

Managed-OSVR

OSVR .NET/CLR bindings
C#
12
star
19

OSVR-Android-Plugins

Source for Android-specific plugins
C++
10
star
20

OSVR-Config

Configuration utility for the OSVR Server.
JavaScript
10
star
21

OSVR-Specs-and-Proposals

Plugin schemas in development
HTML
10
star
22

OSVR-General

Catch-all project for issues and information not specific to a single repo
10
star
23

OSVR-AndroidServerLauncher

Java
9
star
24

OSVR-SMI

SMI eye-tracker plugin
C++
8
star
25

OSVR-CPI

OSVR Control Panel Interface
C++
8
star
26

OSVR-Android-Samples

Samples of using OSVR on Android.
C++
7
star
27

libfunctionality

A minimal library for dynamically-loaded or statically-linked functionality modules.
CMake
7
star
28

OSVR-Display

Cross-platform detection and configuration of displays
C++
6
star
29

OSVR-win-installer

Basic windows installer
NSIS
5
star
30

OSVR-Android-SDK

Android SDK for OSVR - link goes to latest build download
Shell
5
star
31

OSVR-Nod

OSVR plugin for Nod devices including Ring and Backspin
C++
5
star
32

OSVR-JSON-Editor

Browser-based tool for editing OSVR JSON files, based on JSON Schema.
JavaScript
4
star
33

OSVR-ARToolKit

ARToolKit Analysis Plugin for OSVR
C++
4
star
34

UIforETWbins

Repo of binaries from the google/UIforETW project - link goes to source
Python
3
star
35

osvr.github.io

HTML
3
star
36

OSVR-Boxstarter

Boxstarter self-installer scripts to prepare user, developer, or CI environments using Chocolatey.
PowerShell
2
star
37

HDK-Tray-Application

http://wiki.osvr.org/display/DD/HDK+Tray+Application
C#
2
star
38

OSVR-JSON-Schemas

JSON Schemas related to OSVR interfaces.
2
star
39

OSVR-Hardware-Accessories

A repository that holds hardware accessories for OSVR-supported headsets
2
star
40

OSVR-FSM9

OSVR plugin for Hillcrest Labs' FSM-9 tracker.
CMake
1
star
41

OSVR-Compatibility-Aggregator

Ruby gem for retrieving and using JSON metadata related to OSVR.
Ruby
1
star
42

OSVR-System-Information

A cross-platform tool for creating a system report to aid in troubleshooting
C++
1
star
43

OSVR-ART

OSVR plugin for ART trackers
C
1
star
44

OSVR-TrackerUtilities

Tools for recording and viewing tracker data
1
star
45

OSVR-Vuzix

OSVR plugin to support Vuzix HMDs
C++
1
star