Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python wrapper for Oculus VR SDK.

Project Description

Cross-platform wrapper for the Oculus VR SDK C API

Works on Linux and Windows. Precompiled Oculus VR SDK shared library included, so just install it and go.

Installation

pip install python-ovrsdk

Use

import time
from ovrsdk import *

ovr_Initialize()
hmd = ovrHmd_Create(0)
hmdDesc = ovrHmdDesc()
ovrHmd_GetDesc(hmd, byref(hmdDesc))
print hmdDesc.ProductName
ovrHmd_StartSensor( \
  hmd,
  ovrSensorCap_Orientation |
  ovrSensorCap_YawCorrection,
  0
)

while True:
  ss = ovrHmd_GetSensorState(hmd, ovr_GetTimeInSeconds())
  pose = ss.Predicted.Pose
  print "%10f   %10f   %10f   %10f" % ( \
    pose.Orientation.w,
    pose.Orientation.x,
    pose.Orientation.y,
    pose.Orientation.z
  )
  time.sleep(0.016)

Output:

Oculus Rift DK1
  1.000000     0.000000     0.000000     0.000000
  0.992197     0.124599    -0.000122     0.004537
  0.992192     0.124621     0.000212     0.004909
  0.992168     0.124852     0.000430     0.003814
  0.992249     0.124183    -0.000085     0.004583
  0.992164     0.124768     0.000595     0.006597
  0.992263     0.124067    -0.000134     0.004630
  0.992276     0.123989     0.000412     0.003885
  0.992275     0.123943     0.000745     0.005242
  0.992168     0.124891     0.001882     0.001237
  0.992377     0.123240    -0.000291     0.000687
  0.992316     0.123698    -0.000632     0.002837
  0.991962     0.126352     0.000245     0.006768
...

Credits

Release History

This version
History Node

0.3.2.2

History Node

0.3.2.1

History Node

0.3.2.0

History Node

0.2.1

History Node

0.2.0

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
python-ovrsdk-0.3.2.2.tar.gz
(490.1 kB) Copy SHA256 Hash SHA256
Source None Jun 7, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting