ope

openvr

Unofficial python bindings for Valve's OpenVR virtual reality SDK

Showing:

Popularity

Downloads/wk

0

GitHub Stars

181

Maintenance

Last Commit

15d ago

Contributors

14

Package

Dependencies

19

License

BSD

Categories

Readme

pyopenvr

Unofficial python bindings for Valve's OpenVR virtual reality SDK, located at https://github.com/ValveSoftware/openvr

DEPRECATION NOTICE

Our upstream SDK OpenVR is no longer being updated. Everyone is switching to OpenXR instead. We are working on similar bindings for OpenXR at https://github.com/cmbruns/pyopenxr

Installation

Use

import sys
import time
import openvr

openvr.init(openvr.VRApplication_Scene)
poses = []  # will be populated with proper type after first call
for i in range(100):
    poses, _ = openvr.VRCompositor().waitGetPoses(poses, None)
    hmd_pose = poses[openvr.k_unTrackedDeviceIndex_Hmd]
    print(hmd_pose.mDeviceToAbsoluteTracking)
    sys.stdout.flush()
    time.sleep(0.2)
openvr.shutdown()

For more advanced usage, consult the example at https://github.com/cmbruns/pyopenvr/blob/master/src/samples/glfw/hellovr_glfw.py, which is a complete faithful translation into python from the original C++ sample at https://github.com/ValveSoftware/openvr/tree/master/samples/hellovr_opengl

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100