/psychxr

Python extension library for interacting with eXtended Reality displays, intended for research in neuroscience and psychology.

Primary LanguageCythonOtherNOASSERTION

PsychXR

GitHub release (latest by date including pre-releases) PyPI PyPI - Python Version PyPI - Wheel Generic badge

PsychXR is a collection of Python extension libraries for interacting with eXtended Reality displays (HMDs), intended for neuroscience and psychology research applications.

While academic researchers are the intended audience for PsychXR, it now sees use in industry for prototyping and development of VR related solutions.

PsychXR is used by PsychoPy v3 (http://www.psychopy.org/) to provide HMD support.

Note that this README refers to the development version of PsychXR.

Why PsychXR?

PsychXR is intended to provide near direct access to HMD driver APIs using a thin and very fast interface. This can be useful in situations where other tools fail to expose or limit device capabilities. Furthermore, PsychXR does not require large runtimes and has minimal dependencies, allowing users to more easily share their applications over low-bandwidth connections for easier remote testing.

PsychXR is free and open source, unlike many of the tools widely used by researchers for creating VR experiments. If you'd like to keep the future of VR research as open as possible, consider using or supporting projects like PsychXR, PsychoPy, psychtoolbox, OpenHMD and the Godot Engine.

Supported Devices

Device support varies depending on the extension used. PsychXR provides access to the following HMD driver interfaces through extension modules.

LibOVR - psychxr.drivers.libovr

Interface using the official (proprietary) Oculus PC SDK and runtime. Provides excellent, near complete support for PC based Oculus HMDs. Most feature rich and mature interface that is included with PsychXR and the recommended one for users of the following devices:

  • Oculus Rift (DK2, CV1, and S)
  • Oculus Quest (1 and 2 with link cable)

OpenHMD - psychxr.drivers.openhmd

This extension uses the free and open source OpenHMD library which supports a wide range of commercial HMDs. The level of support varies depending on the headset being used (see supported OpenHMD devices for more info). PsychXR ships with a version of OpenHMD that supports the following devices:

  • Oculus Rift (DK1, DK2, CV1, and S)
  • HTC Vive and Vive Pro
  • Windows Mixed Reality
  • Deepoon E2

NoloVR CV1 controllers are fully supported as peripherals by OpenHMD (not tested by the developers of PsychXR).

The openhmd extension is experimental, presently providing only a simple wrapper around the OpenHMD library. OpenHMD does not provide a compositor, or positional tracking (yet) for a majority of devices listed, requiring users to come up with their own solutions.

OpenHMD is cross platform and will eventually allow PsychXR to be used on operating systems other than Windows.

Installation

See Getting PsychXR for installation instructions. Pre-built packages are available for Python 3.6, however PsychXR will build on later versions of Python.

Limitations

There are several limitations to the current version of PsychXR which may make it unsuitable for certain applications.

  • Only Oculus VR HMDs which use the PC SDK (Rift S, CV1, DK2 and Quest 1+2) are supported, the CV1 and S are recommended. There are currently no plans to support the mobile SDK or distribution over app stores.
  • OpenGL is required for rendering, no support for other graphics APIs (i.e. Vulkan and DirectX) is available at this time. You must use some OpenGL framework such as Pyglet, GLFW ( example) or PyOpenGL with PsychXR to create visual stimuli.

Support

If you encounter problems with PsychXR, please submit an issue to PsychXR's issue tracker. This software is not officially supported by any device vendor or manufacturer! Please do not direct PsychXR support requests to them.

News

For updates on PsychXR's development, see NEWS.

Contributing

If you would like to expand on PsychXR, feel free to submit pull requests. Help for doing the following would be greatly appreciated:

  • OpenXR or OpenVR support
  • Driver access for other VR related tools such as OptiTrack(tm) and Leap Motion devices.

Authors

  • Matthew D. Cutone - Open Science Tools Ltd. - (https://github.com/mdcutone)
  • Dr. Laurie M. Wilcox - The Centre for Vision Research, York University

License

This project is licensed under the MIT License - see the LICENSE file for details.

How To Cite PsychXR

If you use PsychXR for your research, please use the following citation:

Cutone, M. D. & Wilcox, L. M. (2021). PsychXR (Version 0.2.4) [Software]. Available from https://github.com/mdcutone/psychxr.