Skip to content

ox-runtime/ox-sim-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

156 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ox-sim-driver

ox-sim-driver is a virtual XR device simulator, built for ox.

It simulates several popular XR headsets and controllers (like Meta Quest, Valve Index, Vive Trackers etc).

It exposes a GUI, a REST API, and a C API (plus wrappers for other languages) to allow programmatic, interactive or agentic control of the virtual XR device.

Design

ox-sim-driver has been implemented as a driver for ox, since it's just another XR device that ox can use (albeit a virtual/simulated one).

It has the following components:

  • GUI: (src, docs) - Preview the headset's output and control the devices visually in a GUI window. Useful for development and live testing.
  • REST API: (src, docs) - Control the virtual XR device over HTTP. Useful for agentic development, or when you can't use the in-process API.
  • C API: (src, docs) - Use virtual XR devices inside your application and test framework. Useful for automated testing (including CI runners).
  • Language wrappers: (src) - Wrappers for the C API (e.g. in Python) to allow testing in your preferred language.

The GUI, REST API and language wrappers use the C API internally.

Build

  1. (Linux-only) Install platform dependencies:
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libxcb-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libpng-dev pkg-config
  1. Configure and build:
cmake -B build
cmake --build build --config Release

Your driver will be built inside build/simulator.

A driver only requires ox_driver.h (for the driver API) and openxr.h (for the data types). These headers are fetched automatically by CMake.

Advanced Build

If you want to build against a local ox-runtime checkout instead of the remote repository (that's fetched automatically), pass -DOX_RUNTIME_REPO=/path/to/ox-runtime when configuring cmake.

Installation

Copy the driver (i.e. the build/simulator folder) to the ox runtime's drivers folder:

For example:

ox-runtime/
├── bin/
│   ├── ox.exe (or ox on Linux/Mac)
│   └── drivers/
│       └── simulator/
│           └── ox_driver.dll (or libox_driver.so / libox_driver.dylib)

About

A simulator driver for the 'ox' OpenXR runtime. This can help test and emulate different VR devices (Quest, Vive, Vive trackers, etc.) programmatically.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages