Vive Trackers and OpenXR

hey guys,

i was just about to try the HTC vive trackers with the new OpenXR backend. unfortunately, unlike the OpenVR backend they are not being registered as additional “tracked items” and therefore not usable. with OpenVR it was also possible to give them a “purpose” in the SteamVR settings (e.g. handheld-right) and one could then use the touch controller output for the right hand to get the transform-pose (apart from accessing them as tracked item) (thanks to @julian for this hint here). however, this workaround apparently not possible any more with the openxr backend (they won’t show up as a controller). there is however an openxr extension for the vive trackers that would probably solve the issue:
https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_HTCX_vive_tracker_interaction

actually i’d need this functionality rather soon for a course i’m doing in the beginning of june and just found out about this right now. the easy solution would be to just not use the OpenXR backend and just use OpenVR. however, there is no way of choosing the backend explicitly and the StrideRuntime does not pick up OpenVR, even when no OpenXR compatible headset is connected (I’ve done this by setting the OpenXR backend to WindowsMixedReality and leaving SteamVR as an OpenVR host). this is something I consider a bug because other backends are impossible to use right now. if the fallback to OpenVR as backend would work, my issue would be solved :)

Of course the other clean solution would be to implement the OpenXR Extension. I probably could raise part of a funding, maybe there is somebody else who would take part in this?

with @joreg’s help we found a solution to this. it is possible to manually select a VR backend by manually editing the DefaultVRSettings patch to something like this (requires “editable packagaes” to be enabled for now but will probably the default in future versions)

grafik

after a restart (F9) it should then pick the chosen VR driver and chosing OpenVR it is working again, making the Trackers available as TrackedItems

the fix described above is now also included with latest 5.2 previews. ie. you can now choose the vr api.

regarding the original question: implementing that extension for OpenXR should actually not be too hard, starting from the source code for the handtracking extension. if someone needs this for a commercial project, please get in touch.

1 Like

If you want to use the trackers without a HMD attached check out VL.IO.OpenVR.