Just another attempt to make a OpenVR bridge driver, built upon Simple OpenVR Driver Bridge. This one focuses on emulating controllers instead of just trackers.
This is by no means any viable alternative to real VR controllers.
Driver itself is under ./driver
where building and installation instructions are in readme.
Currently there are three C# client examples in ./examples/csharp
- HmdRotation - (windows only) simple gui to track positional data of hmd/other device
- IpcCmd - even simpler cli allowing to send commands and receive responses
- ControllerEmulator - GUI app to change position and rotation of virtual controller
getdevicepose 'id'
: useful to get position of HMD, which is id 0. You should be able to get positions of controllers, but is very unreliable so other methods are prefered. returns device id, position in x y z, rotation in quaternion and euler``synctime
: returns avarage frametime and time since last frame, useful if you need to sync something to the HMD refresh ratesettings 'numOfValues' 'smoothingWindow' 'additionalSmoothing'
: update the drivers smoothing and interpolation settings.
addtracker 'name' 'role'
: add another tracker with the name and role. Only needs to be done on first connect to prevent duplicates.numtrackers
: the driver will return the number of trackers currently connected. Used to check how many trackers you need to connect and how many are already connectedgettrackerpose 'id'
: same as getdeviceposeupdatepose 'id' 'type' 'x' 'y' 'z' 'qw' 'qx' 'qy' 'qz' 'delay'
: update pose of tracker with id to position x y z and rotation quaternion qw qx qy qz. You can also send how old the pose is, but you can also just send 0 types: tracker(t)
addcontroller 'serial' 'hand'
: spawn controller, serial must be unique, hand must be either LEFT or RIGHTcaxis 'id' 'joystickX' 'joystickY' 'trackpadX' 'trackpadY'
: set controller axis statecbutton 'id' 'button_code' 'pressed'
: set state of button with button_codecfixedpose 'id'
: enable fixed position mode for controllercdefpose 'id'
: call MakeDefaultPose() upon controllersetpose 'id' 'type' 'x' 'y' 'z' 'qw' 'qx' 'qy' 'qz'
: directly sets the pose of device types: controller (c); tracker(t)
To see how the smoothing and delay values affect tracking, you can check the graphs here.
and other useful things i discovered trying to learn how to handle openvr