This tutorial will guide you through the setup of the HTC Vive Tracker in Python 3.6 on Ubuntu 14.04.
Up to date graphics drivers
x86 architecture
SteamVR requires >4GB disk space
- Install Steam, as well as Python and OpenVR dependencies
sudo apt-get install steam libsdl2-dev libvulkan-dev libudev-dev libssl-dev zlib1g-dev python-pip
-
Make Steam account & Log in.
-
Install SteamVR
-
Click Library
-
Click VR
-
Click under Tools there should be SteamVR. Click the blue Install button.
-
-
Make a Symbolic Link from libudev.so.0 to libudev.so.1 for SteamVR to use
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
- Install pyopenvr
sudo pip install -U pip openvr
- Clone triad_openvr in a working directory
git clone https://github.com/TriadSemi/triad_openvr.git
- (Optional) Disable the headset requirement with your preferred text editor
gedit ~/.steam/steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
-
Change the third line from
"requireHmd" : true,
to"requireHmd" : false,
-
Save and exit the settings document.
-
Start SteamVR from the Steam Library
-
Turn on the tracker with its button, and make sure that its wireless USB dongle is plugged in to your computer. If the tracker shows up in the SteamVR overlay skip to step 4.
-
Sync the tracker. Hold the button on the tracker until the light blinks. On the SteamVR overlay click the "SteamVR" dropdown menu. Click Devices->Pair Controller. The Tracker should then pair with the computer, and a green outline of the tracker should appear on the SteamVR overlay. If this doesn't work try unplugging the wireless USB dongle, plugging it back in, and restarting SteamVR.
-
Ensure the Lighthouse base stations are turned on, facing each other, and have green lights showing on them. Place the tracker in view of the Base Stations. The SteamVR overlay should now show two green square Base Stations and a solid green Tracker hexagon. The tracker is now working.
-
Start the tracker_test.py python script to view the x y z roll pitch yaw output from the tracker.
cd triad_openvr/
`python3.6 ./tracker_test.py
- If everything went well you should now see the data coming from the Tracker. Use tracker_test.py as a sample program to work from to integrate into your project.
To start SteamVR from the commandline you can run (as one command):
LD_LIBRARY_PATH=~/.steam/bin32/ ~/.steam/bin32/steam-runtime/run.sh ~/.steam/steam/steamapps/common/SteamVR/bin/vrstartup.sh
This will start the server in another process, so you're free to keyboard interrupt (Ctrl+C) the terminal once the server starts.
To kill the SteamVR process:
sudo killall -9 vrmonitor
This is based off of Triad Semiconductor's awesome tutorial found here:
http://help.triadsemi.com/steamvr-tracking/steamvr-tracking-without-an-hmd/
Also thanks to Christopher Bruns for his work on pyopenvr.
Hello ,
I tried to install your project ( Ubuntu 18.04 )
Nevertheless , I have an error :
python3.6 ./tracker_test.py
VR Path Registry node config is not an array
VR Path Registry node log is not an array
VR Path Registry node config is not an array
VR Path Registry node log is not an array
Traceback (most recent call last):
File "./tracker_test.py", line 5, in
v = triad_openvr.triad_openvr()
File "/home/jpannnetier/Documents/DevelopmentPython/Triad Open VR/triad_openvr-master/triad_openvr.py", line 107, in init
self.vr = openvr.init(openvr.VRApplication_Other)
File "/usr/local/lib/python3.6/dist-packages/openvr/init.py", line 6039, in init
initInternal2(applicationType, pStartupInfo)
File "/usr/local/lib/python3.6/dist-packages/openvr/init.py", line 6143, in initInternal2
_checkInitError(error.value)
File "/usr/local/lib/python3.6/dist-packages/openvr/init.py", line 6025, in _checkInitError
raise OpenVRError("%s (error number %d)" %(getVRInitErrorAsSymbol(error), error))
openvr.OpenVRError: b'VRInitError_Init_NoConfigPath' (error number 111)