Commit graph

41 commits

Author SHA1 Message Date
danwillm 72ff5cab80 st/steamvr_drv: add skeletal input from openxr hand tracking
Co-authored-by: Moses Turner <moses@collabora.com>
2022-07-28 12:19:20 +01:00
danwillm 9c9f4bb5c5 st/steamvr_drv: comment out "action binding reloaded" log message 2022-07-28 12:19:20 +01:00
danwillm 75995fede0 external, st/steamvr_drv: update OpenVR to 1.16.8 2022-07-28 12:19:20 +01:00
Ryan Pavlik 593a277dd7 st/steamvr_drv: Resolve warnings 2022-07-14 14:17:35 +00:00
Jakob Bornecrantz 38eac9dddc xrt: Do not depend on util 2022-05-23 09:12:54 -05:00
Ryan Pavlik 894b5c955a st/steamvr_drv: Word choice/clarity 2022-05-17 17:40:58 -05:00
Jakob Bornecrantz 61323c32d2 xrt: Use error messages in various instance and prober functions 2022-05-17 20:10:40 +01:00
Jakob Bornecrantz 65aa7581d2 st/ovrd: Use xrt_instance_create_system 2022-05-11 10:49:15 +01:00
Moses Turner c7cb763b38 inc/xrt, steamvr_drv: add DepthAI device type 2022-05-10 23:47:30 +01:00
Ryan Pavlik 3f9e5c2a30 st/steamvr_drv: Guard GNU pragmas 2022-05-03 22:45:05 +01:00
Jakob Bornecrantz 175ff58f10 build: Remove meson files 2022-04-28 21:36:25 +00:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Campbell Suter e18ca850ba steamvr_drv: Use the correct grip name for XRT_DEVICE_SIMPLE_CONTROLLER
Previously, xrt_device_get_tracked_pose was called with
XRT_INPUT_GENERIC_HEAD_POSE when getting the pose of a SIMPLE_CONTROLLER device.

When using the 'remote' driver, this lead to two warnings per frame [1] and more
importantly the device pose wasn't being read. I haven't tested this with any
other drivers, but it appears that at least the QUERTY driver likely has an
issue with this too, as it uses the input name to determine whether to return
the HMD or controller pose.

[1] ERROR [r_device_get_tracked_pose] Unknown input name
2022-04-06 00:50:40 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Christoph Haag b81ab3f09a st/steamvr_drv: Use xrt_device_get_view_poses 2022-02-16 23:15:21 +00:00
Ryan Pavlik c9889f776f xrt: Rename xrt_space_graph to xrt_relation_chain.
Rename all functions and instances accordingly as well,
and add documentation for all methods.
2022-01-21 19:54:30 +00:00
Ryan Pavlik 469b9d907d st/oxr: Rename all num_ in the state tracker, too. 2021-11-13 12:04:38 +00:00
Ryan Pavlik 33c0287f8b xrt: Rename all "num" parameters and fields to "count" (or "capacity" as appropriate)
This matches the OpenXR usage: the array is the plural of the element type,
and the count is the singular element type plus "count" (usually CountOutput
because of the two-call idiom)

Includes fixes to other code to match API changes.
2021-11-13 12:04:38 +00:00
Ryan Pavlik cc4007a69e cmake: Substantial cleanups and simplifications
We now have a cmake-format config file.
We no longer use list variables for sources, instead using
target_sources when we need to add, in accordance with current
best practice. (This makes it a lot easier to edit too.) There's no more
include_directories(), add_definitions(), or other gently-deprecated
directory-scoped commands, nor any CMake scripts that include
a parent directory reference (named targets instead)
2021-11-12 09:48:37 -06:00
Christoph Haag f6e831d8fb steamvr: Don't crash if we don't have bindings for device 2021-05-13 14:08:24 +02:00
Christoph Haag 91a3d8b9cb st/steamvr: Add rift controllers 2021-04-02 15:48:10 +00:00
Ryan Pavlik 8ebd97330d st/steamvr: Fix warnings 2021-03-26 17:06:17 -05:00
Christoph Haag 13db11901c d/rs: Add prober and create xrt_device for rs 2021-03-02 19:43:19 +01:00
Christoph Haag def0bef533 build/meson: Explicitly depend on generated binding header
fixes header not being generated on alpine
2021-02-15 22:04:38 +01:00
Christoph Haag a4bde60e08 st/steamvr: Use serial number for controller id 2021-02-12 00:38:52 +01:00
Christoph Haag 46ec938f8a build: Move bindings build to bindings/subdir
The generated files should be in auxiliary/bindings/*.{c,h}. For this to work
meson.build has to be in the bindings/ subdir:
https://github.com/mesonbuild/meson/issues/2320

Move CMakeLists.txt there too for some consistency.
Also fixes the previous include hack.
2021-01-20 18:23:09 +01:00
Christoph Haag 07218c9878 aux: generate b_generated_bindings.{c,h} instead of xrt_generated_bindings.{c,h}
Follow up to 543804e53cafa83c52b61f70894696bc4d95fa7c
2021-01-20 18:23:09 +01:00
Christoph Haag 06e7e7e832 steamvr: Implement support for and default to generated input profile 2021-01-20 18:23:09 +01:00
Christoph Haag edd6a4cf70 xrt: Move oxr_binding_data.h to json profile generator
Move json profile generator to auxiliary/bindings and make generated_bindings static library.

aux/bindings: Add hardware type

aux/bindings: Add various steamvr specific things to bindings
Paths like "/input/menu/click" are used in SteamVR input profiles.
2021-01-20 18:23:09 +01:00
Christoph Haag 5764365427 steamvr: Use simple vibration as fallback 2021-01-20 18:23:09 +01:00
Christoph Haag 609b834670 steamvr: Add comment about pose time offset 2021-01-20 18:23:09 +01:00
Jakob Bornecrantz 2b996f30c4 xrt: Reflow after column change 2021-01-15 13:50:32 +00:00
Christoph Haag 729f726135 steamvr: Request hmd pose at current time instead of 1 2021-01-11 23:50:01 +00:00
Christoph Haag 3848d2be3f st/oxr: Add env vars for global tracking origin offset
This commit is a band aid until a more proper room setup is implemented.
It allows moving the tracking offset for the device roles head, left and right by a fixed value.

A y tracking offset OXR_TRACKING_ORIGIN_OFFSET_Y=1.0 would tell monado that the current tracking
origin is 1 meter above the desired tracking origin, e.g. when the headset was calibrated to a
(0,0,0) position while sitting on table 1 meter above the floor.

This environment variable affects STAGE space, but not LOCAL space.
2021-01-06 13:03:47 +00:00
Lubosz Sarnecki 12a3a24315 st/gui+steamvr_drv: Port to u_logging. 2020-12-28 13:04:11 +00:00
Christoph Haag 31c4c14042 steamvr: Make serial unique by appending xrt_hand
Monado gives both Playstation Move controllers the same xrt device name.

fixes #109
2020-12-25 22:56:54 +01:00
Lubosz Sarnecki 9351673e55 st/steamvr_drv: Silence unfixable OpenVR cpp warnings. 2020-12-16 15:10:10 +01:00
Christoph Haag 2efba6451e steamvr: support rotated displays and direct mode
Monado now calculates OpenHMD viewport dimensions and offsets correctly, we can pass those through.

The rotation of the rendered texture is performed with the distortion function.

v2: Use rotation matrix multiplication for distortion rotation
2020-11-12 16:04:00 +01:00
Christoph Haag 2082eddb65 steamvr: Fix running without controllers 2020-11-10 15:43:07 +01:00
Ryan Pavlik 9da004abb4 st/steamvr: Fix build on Windows. 2020-11-10 03:09:07 +00:00
Christoph Haag cb62514fd0 steamvr: Implement basic SteamVR driver
v3:
  targets: Add Monado-SteamVR driver target
  st/ovrd: Add OpenVR driver header
  build: Factor out sdl hack into lib_sdl2_hack and update steamvr build
  build: Revert lib_sdl2_refactor
  steamvr: Emulate Index Controller by default
  steamvr: Use oxr_handle_destroy instead of exposing oxr_instance_destroy
  steamvr: don't use oxr internals
  steamvr: communicate 3dof tracking to steamvr
  steamvr: use util functions for device assignment and tracking origin setup
  steamvr: Install plugin to <prefix>/share/steamvr-monado
  steamvr: Use thread for updating poses every 1ms

Makes a big difference for the Index @144Hz on the vive driver.
Still somewhat choppy on survive driver - prediction should solve it.

Main-author: Christoph Haag <christoph.haag@collabora.com>
Co-author: Jakob Bornecrantz <jakob@collabora.com>
2020-11-09 19:21:27 +00:00