VRidge API is a way to interact with VRidge in any language of your choice. We use ZeroMQ sockets as a low latency transport. It can work both locally and remotely through network.
VRidge API allows you to write full or partial head tracking data, read mobile tracking data and set offsets to correct drift or sync it to your coordinate system. You can also send controller states (buttons, triggers, touchpads), and transforms (motion controller orientation and position in 3D space).
Everything is loaded as single VRidge OpenVR driver. Some of the above things can be done through writing separate OpenVR drivers but VRidge API has benefits of two-way communications with an ability to mix coordinate systems in a more elastic way. It is also more stable than separate OpenVR drivers potentially providing conflicting data.
VRidge API is accessible over TCP, abstracted by ZeroMQ sockets. This allows you to use API any language that you choose. See ZeroMQ language bindings page and get library for language of your choice.
This repository contains example implementation of API client in .NET. You can use it in your .NET projects by simply building and referencing the APIClient project.
C# projects require:
Both are referenced as NuGet packages in .csproj and will be restored on pre-build.
If you don't want to manage connection state, you can use fire-and-forget access layer which manages the connection state for you. See VridgeRemote for more details.
This endpoint provides two functions:
You can find out what API endpoints are available and wether they are currently in use or not.
You can connect to specific API endpoint by sending a packet with requested endpoint name and your version number. This will open a listener on the server side compatible with your requested version. Response message will contain ip:port endpoint that can be connected.
See control channel wiki page for details.
Data channels are used to interact with VRidge and send/receive actual data. Currently we have two endpoints. See pages below for details.
Controller API allows you to send VR motion controller state without writing a full OpenVR driver. This allows a more stable experience since only one driver is loaded in SteamVR.
See Controller API for protocol and details.
Head tracking endpoint allows you to control head tracking in a variety of modes. You can use it to provide positional, rotational or combined data. You can also read mobile sensor data and provide an offset. You can also modify phone tracking data in real time before it's used for rendering in VR.
See Head Tracking API for protocol and available modes
Broadcast endpoint carries one-way notifications. Currently only haptic pulses are propagated through broadcast channel. It is implemented as ZMQ PUB-SUB sockets.