SteamVR Tracking has enhanced the VR experience substantially but its use is not at all limited to VR only applications.  The purpose of this tutorial is to provide step by step guidance on how to get started with the highest performance 6DOF positional tracking for as little as $234.98. In this tutorial, the latest version of SteamVR Beta, is coupled with python 3.6, the pyopenvr library and the triad_openvr Python wrapper.

Minimum Hardware Needed:

  1. One HTC Vive Basestation (Two Basestations also have advantages)
  2. One of the following SteamVR compatible Tracked Objects:HTC Vive Controller (Steam Dongle or USB connection required)HTC Vive Tracker (Use HTC provided Dongle or USB connection)Custom object designed with the SteamVR HDK (Steam Dongle or USB)
  3. x86 based PC

Software Required:

  1. Currently this is only tested on Windows but should also apply to Linux
  2. SteamVR with opt in for the Beta
  3. Python 3.6 (Anaconda Package recommended)
  4. pyopenvr, install with the following command: 

5. triad_openvr, Download from github and unzip

Steps:

  1. Download and install the above software components
  2. Locate the following configuration file and open it with a text editor:
  3. <Steam Directory>/steamappscommonSteamVRresourcessettingsdefault.vrsettings
  4. Search for the “requireHmd” key under “steamvr”, set the value of this key to “false”.  The following is a .vrsettings file that has been tested as functional.

5. If SteamVR are running, close and restart it

6. When SteamVR restarts, you will see that it is now possible to connect a tracker or controller without the HMD. 

Note: “Not Ready” text is normal and does not impact this tutorial

7. Open a command prompt and navigate to the folder where triad_openvr was unzipped

8. If you are testing with Tracker, run the following script

     python tracker_test.py

9. If you are testing with a Controller, run the following script

     python controller_text.py

10. As the script executes, you will see numbers updating at 250Hz.  These are the realtime 6DOF pose coordinates!

The purpose of this tutorial was strictly to provide a quick proof of concept that demonstrates that an HMD is in fact not a requirement for use of SteamVR.

Python is an extremely extensible language and this example code may provide a basis for many derivative projects.  These same concepts also easily apply to other programming languages such as C, C++ C#, etc.

If you have any questions or would like to share your project based on this tutorial, please contact us at info@triadsemi.com, or click on the blue chat icon in the lower right corner of the screen to start a conversation now.

Did this answer your question?