Commit graph

5512 commits

Author SHA1 Message Date
Ryan Pavlik ae16cb4f13 st/oxr: Obvious warning fixes 2023-06-17 11:46:01 +01:00
Ryan Pavlik c7fcf59866 d/steamvr_lh: Fix warnings 2023-06-17 11:46:01 +01:00
Ryan Pavlik bc9624617a d/opengloves: Fix warnings 2023-06-17 11:46:01 +01:00
Ryan Pavlik 3609f9149e comp/{main,util}: Fix warnings 2023-06-17 11:46:01 +01:00
Ryan Pavlik 1f3eba0428 a/util: Add missing includes
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-06-17 11:46:01 +01:00
Jakob Bornecrantz 6176db87e1 st/oxr: Add EXT_eye_gaze_interaction to generation script [NFC]
Missed this in 9f1cf952c6 / !1836, closes #269.
2023-06-15 17:32:52 +01:00
Jakob Bornecrantz 2c080454e2 d/vive: Use correct enum for Tundra tracker 2023-06-14 21:34:20 +01:00
Shawn Wallace a3c2b89067 t/common: Integrate SteamVR Lighthouse driver into builder
Replaced VIVE_OVER_SURVIVE env var with LH_DRIVER, which takes a string and
allows choosing one of the three lighthouse tracking implementations.
2023-06-14 15:43:00 +01:00
Shawn Wallace 4a9f92e151 d/steamvr_lh: Add SteamVR Lighthouse driver wrapper
Implement support for SteamVR's Lighthouse driver (on Linux).
Only tested/works with the OG Vive and Vive wands, but adding new
device support should be simple.
2023-06-14 15:43:00 +01:00
Jakob Bornecrantz 5f6714172b ext/vfd: Rename childs to children 2023-06-14 15:43:00 +01:00
Shawn Wallace 065a6d6863 ext/vfd: Add valve file VFD library
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-06-14 15:43:00 +01:00
Sarah dc5b398405 [a|d]/[sur]vive: Implement 3.0/Tundra tracker support
Co-authored-by: BabbleBones <BabbleBones@protonmail.com>
2023-06-14 01:02:07 +00:00
Christoph Haag 2b2a944507 a/bindings: Generate bindings for vive tracker interaction profile 2023-06-14 01:02:07 +00:00
Christoph Haag d89deb2d95 xrt: Add vive tracker interaction profile enum values
Introduces a generic device name only used for bindings.
2023-06-14 01:02:07 +00:00
BabbleBones 5787fd260f xrt: Add XRT_DEVICE_VIVE_TRACKER_{GEN3,TUNDRA} defines
Tundra enumeration changes
2023-06-14 01:02:07 +00:00
Christoph Haag 6a01170b23 ipc: Transfer xdev serial over ipc 2023-06-14 01:02:07 +00:00
Robbie Bridgewater 28dc5747e2 ipc: Add more diagnostic info for first instance service failure 2023-06-14 01:01:49 +00:00
Jakob Bornecrantz 315861501c a/vive: Move VIDs and PIDs to helper library [NFC] 2023-06-14 00:23:26 +01:00
Jakob Bornecrantz 205d82ce9c a/vive: Add common header with documentation [NFC] 2023-06-14 00:23:26 +01:00
utzcoz 287102d256 t/android: Declare INTERNET permission for remote driver
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-13 21:08:01 +00:00
utzcoz 58193ad1c4 d/remote: Support r_hub for Windows
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-13 21:08:01 +00:00
Linus Lüssing d7468d22da d/wmr: fix squeeze trigger in SteamVR
While in the Monado debug GUI the squeeze trigger is detected fine and
it is also listed in the SteamVR "Test Controller" page, pushing the
squeeze trigger would not be detected in SteamVR.

Fixing this by not just populating the xrt_inputs squeeze click but also
the squeeze value.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-13 20:28:05 +00:00
Linus Lüssing fca4ac41e5 d/wmr: avoid using non-self-explanatory numbers for input allocations
By using an extra, final entry in the according inputs enum instead
of using a hard coded number it should be slightly safer and easier
to verify that the to be allocated inputs array is of correct size.

No functional change.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-13 20:28:05 +00:00
Drew Chien (Te-Ju) 9f1cf952c6 st/oxr: Add eye gaze support 2023-06-13 01:37:50 +01:00
Drew Chien (Te-Ju) aefeeb1403 a/bindings: Add eye gaze support 2023-06-13 01:37:45 +01:00
Drew Chien (Te-Ju) 96c88f488e xrt: Add eye gaze defines and role 2023-06-13 01:31:11 +01:00
Jan Schmidt 9966c16cdd d/wmr: Publish Reverb G2 tunnelled controllers
If there are HMD-tunnelled controllers present,
publish them in the prober and builder so they
can be used.
2023-06-08 16:12:18 +00:00
Jan Schmidt e356d57a6a d/wmr: Initial tunnelled controller handling.
Create controller devices when a presence
message indicates one is paired and online.

Pass controller IMU/button reports to the
controller device.
2023-06-08 16:12:18 +00:00
Jan Schmidt 89407f8de8 d/wmr: Infrastructure for tunnelled controller connections
Add a connection object for controllers that are tunnnelled
through the HMD, and calls to allow send/receive of packets
as needed.
2023-06-08 16:12:18 +00:00
Christoph Haag 351dd9b9de c/util: Implement wait_image in comp_swapchain 2023-06-08 17:01:12 +01:00
Christoph Haag cd37974c04 xrt: Add swapchain_[dec|inc]_image_count functions 2023-06-08 17:01:12 +01:00
Andrei Aristarkhov eace6e310d c/util: prevent sporadic xrAcquireSwapchainImage failure under high GPU load 2023-06-08 17:01:12 +01:00
Christoph Haag 1451bd9993 os/time: Add windows impl of os_realtime_get_ns 2023-06-08 17:01:12 +01:00
Robbie Bridgewater c91928f39e st/oxr: Use CMake-derived version constants for OpenXR runtime version 2023-06-07 15:22:32 -05:00
Robbie Bridgewater 44d7b8489c a/util: Set version constants from CMake 2023-06-07 15:22:22 -05:00
Robbie Bridgewater 03780e9ced a/util: Set colors for various zones when supported by TRACY 2023-06-07 15:20:52 -05:00
Linus Lüssing 7e14d7eb76 d/wmr: fix controller activation in SteamVR
SteamVR requires the serial number to be set. Otherwise after creating
the controller it will fail to activate it.

Before:

  ...
  monado: Creating Controller WMR Left Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number:
  Driver 'monado' attempted to add tracked device with no serial number
  monado: Added left Controller: WMR Left Controller
  monado: Creating Controller WMR Right Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number:
  Driver 'monado' attempted to add tracked device with no serial number
  monado: Added right Controller: WMR Right Controller
  ...

After:

  monado: Creating Controller WMR Left Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number: Left Controller
  Driver 'monado' started activation of tracked device with serial number 'Left Controller'
  monado: Added left Controller: WMR Left Controller
  monado: Creating Controller WMR Right Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number: Right Controller
  Driver 'monado' started activation of tracked device with serial number 'Right Controller'
  monado: Added right Controller: WMR Right Controller

With this change the HP Reverb G2 controller is recognized and activated
fine in SteamVR for me. "Active Controller" nows says:
"monado_hp_mixed_reality_controller". The SteamVR controller test page
now works and recognizes button presses. The controllers can also
(kind of) be used in the home environment.

Several issues still exist to be fully useable:

* middle finger button not recognized in the SteamVR test page
  (all other buttons seem to work)
* high gyro drift
* no positional tracking

The serial is set to "Left Controller" and "Right Controller" for now,
just like for the Rift S controller. This should probably be updated to
a proper serial number once read_controller_config() can parse it from
the firmware.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-07 20:20:12 +00:00
Jan Schmidt 948d78fb61 d/wmr: Change public name for G2 controllers
Change the published device name for G2 controllers from the
generic 'WMR Controller'
2023-06-07 02:10:49 +00:00
Jan Schmidt 4b4fc2b73d d/wmr: Update comments in controller_base
Expand some comments about what different packets do and fix
the description of controller connection lifetimes
2023-06-07 02:10:49 +00:00
Jan Schmidt 7009c64326 d/wmr: Cache controller configs
Store controller calibration block into a cache file and
use that if available, to save time on subsequent startups

Re-disable reading of extra firmware blocks, accidentally
left enabled during recent controller/connection splitup
2023-06-07 02:10:49 +00:00
Jan Schmidt ac84cd4d52 util/u_file: Add u_file_open_file_in_config_dir_subpath()
Add a utility function for accessing files in subdirectories
of the main config dir, creating the subpath as needed.
2023-06-07 02:10:49 +00:00
sdegrande 2f3f9e0cb9 build,a/{os,util},xrt,ipc: Fix compilation with Mingw64 on MSYS2
Main changes:
- use the pthread lib provided by Mingw64
- include windows.h where needed
- define XRT_ENV_MINGW
2023-06-05 12:03:47 -05:00
Jakob Bornecrantz 8a002db4f4 d/rift_s: Make sure to depend on sinks 2023-06-02 16:41:37 +00:00
Robbie Bridgewater 111f269040 xrt: Add XRT_INPUT_GENERIC_[STAGE|LOCAL]_SPACE_POSE
Add XRT_INPUT_GENERIC_STAGE_SPACE_POSE and XRT_INPUT_GENERIC_LOCAL_SPACE_POSE to allow dynamically adjusting these poses.
2023-06-02 15:23:04 +00:00
Linus Lüssing b49ff83a3e Fix segfault with WMR controllers and SteamVR-Monado plugin
With the Reverb G2 controllers connected to the Linux host system via
Bluetooth the following segmentation fault occurs for me when starting
SteamVR with the SteamVR-Monado plugin installed:

```
  $ gdb ...
  ...
  (gdb) bt
  #0  0x0000000000000000 in ?? ()
  #1  0x00007f82de21bac7 in CDeviceDriver_Monado_Controller::RunFrame (this=0x7f82bc610e40)
      at /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:966
  #2  0x00007f82de218b5d in CServerDriver_Monado::RunFrame (this=0x7f82de7c6ca0 <g_serverDriverMonado>)
      at /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:1574
  #3  0x00000000004b7a77 in ?? ()
  #4  0x0000000000000000 in ?? ()
  (gdb) l /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:966
  959			if (m_xdev->hand_tracking_supported && m_skeletal_input_control.control_handle) {
  960				vr::VRBoneTransform_t bone_transforms[OPENVR_BONE_COUNT];
  961
  962				timepoint_ns now_ns = os_monotonic_get_ns();
  963				struct xrt_hand_joint_set out_joint_set_value;
  964				uint64_t out_timestamp_ns;
  965
  966				m_xdev->get_hand_tracking(m_xdev,
  967				                          m_hand == XRT_HAND_LEFT ? XRT_INPUT_GENERIC_HAND_TRACKING_LEFT
  968				                                                  : XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT,
  969				                          now_ns, &out_joint_set_value, &out_timestamp_ns);
```

This happens because the "m_xdev->hand_tracking_supported" flag is set
but m_xdev->get_hand_tracking() is not implemented for WMR controllers.

Fixing this crash by setting hand_tracking_supported to false for
WMR controllers for now until get_hand_tracking() is implemented.

Link: https://gitlab.freedesktop.org/monado/monado/-/issues/251
Fixes: c4db3dfccc ("d/wmr: Add basic Reverb (G1, Bluetooth) motion controller support.")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-02 04:33:07 +02:00
Korcan Hussein 17d8e010c8 xrt: App enabled extension state
Adds support for passing through which extensions an OpenXR client
has enabled to server for drivers/compositors to be able to query.
2023-05-25 23:20:38 +01:00
Mateo de Mayo a860a7f40e t/slam: Implement new prediction using latest IMU samples for everything 2023-05-24 12:07:18 +00:00
Jakob Bornecrantz 5b8a68fce5 d/dai: Do some tracing on IMU samples 2023-05-23 14:42:21 +01:00
Jakob Bornecrantz b6a1a2b390 d/dai: Add env variables to tweak IMU settings
Add make code able to accept 1 and 2 samples in a batch.
2023-05-23 14:42:21 +01:00
Jakob Bornecrantz 9def97ebb8 d/dai: Set thread names and tweak printing 2023-05-23 11:48:11 +01:00
Jakob Bornecrantz 0257556763 d/dai: Tidy includes 2023-05-23 11:48:11 +01:00
Jarett Millard fe6d584712 d/pssense: Implement controller vibration and CRC check for input reports 2023-05-23 07:42:00 +00:00
Ryan Pavlik e3ce528703 cmake: Adjust build so that CPack makes a better deb file.
Not as good as the native one, but better.
2023-05-22 14:24:03 -05:00
Jakob Bornecrantz 1f632bcfb9 d/vive: Improve and refactor IMU time calculation 2023-05-22 11:51:07 +01:00
Jakob Bornecrantz 70850472b2 d/vive: Drain all imu packets at startup 2023-05-22 11:44:33 +01:00
Jakob Bornecrantz 7f1c5e9bd5 d/vive: Tidy header includes 2023-05-22 11:44:33 +01:00
Jakob Bornecrantz 647fd366c5 c/render: Remove compute default_sampler 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 27ba15cb24 c/util: Remove comp_swapchain_image samplers
No longer used, they where all the same.
2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 1644812dc5 c/main: Remove layer renderer framebuffer sampler 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 82453bab57 c/main: Use new samplers
The swapchain code was creating a whole bunch of samplers, two for each image.
The thought was that samplers might depend on format, but this was not the
case. So just add a few common ones on the render_resources structs and use
them everywhere. Also fixes the bleeding distortion problem.
2023-05-21 12:03:04 +01:00
Jakob Bornecrantz ee66760b63 c/main: Log assert case 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 44d2dbc268 c/main: Init gfx & compute render resources earlier 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 8d738248b0 c/render: Add and use new samplers 2023-05-21 12:03:04 +01:00
utzcoz 7b8d3c0907 d/remote: Remove unused clang-format comment [NFC]
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-05-21 10:44:04 +00:00
Moshi Turner 276fbc8113 d/dai: Add live control of floodlight brightness 2023-05-21 08:56:14 +01:00
Jakob Bornecrantz 7d11036e29 d/ht: Log if we can not find hand-tracking directory 2023-05-20 22:38:16 +01:00
Jakob Bornecrantz ab2b88d417 u/file: Search more paths for hand-tracking models 2023-05-20 21:10:31 +01:00
utzcoz b466d1d338 cmake: Remove extra empty lines [NFC]
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-05-20 15:17:27 +08:00
Jakob Bornecrantz 023d5bf232 c/main: Support compute queue in mirror code 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 44c81b6ddb c/main: Refactor out mirror_to_debug_gui code 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz f359826363 c/main: Fix readback timing information 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 3b5e84fd6f c/shaders: Add blit compute shader 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 53f96ed20d a/vk: Add vkCmdPushConstants 2023-05-19 23:18:29 +01:00
Jakob Bornecrantz b5a40a1b50 a/vk: Make it possible to select vk format in readback pool 2023-05-19 23:18:29 +01:00
Jakob Bornecrantz e10a37d39a u/pacing: Add env variable to set present to display offset 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz 96e8aba770 u/pacing: Explain min app time more 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz d5a7b8ad13 u/pacing: Add u_var tracking to app pacer 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz c658cc7f4d m/ff: Add comments to C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz d7df4f9b9a m/ff: Rename field to follow style guide in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz 2d725756f2 m/ff: Return value from m_ff_vec3_f32_get in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz a519c5ae6b m/ff: Add function to get internal fifo in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz c19fbce8c3 st/gui: Make it possible to inhibit sinks gui headers 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 17b8a979e5 st/gui: Make debug sinks be opened by default 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 06e8ff8350 u/var: Improve documentation 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 5b529e50cb ext/tracy: Fix compile when TRACY_HAS_CALLSTACK is not set 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz e21c3a7afe st/gui: Add some tracing 2023-05-19 18:32:20 +01:00
Jakob Bornecrantz 667e6e73fa u/debug_gui: Add some tracing 2023-05-19 18:32:20 +01:00
Jakob Bornecrantz a5de76095a u/debug_gui: Refactor loop 2023-05-19 18:32:20 +01:00
Mis012 19f87ba217 d/pssense: Replace uint with uint32_t in pssense_driver.c
The type "uint" doesn't seem to exist on some platforms at least
(for example alpine linux), and it's only used in a single file,
so it seems like a good idea to change the two uses to "uint32_t".

Closes #258
2023-05-19 16:17:42 +01:00
Jakob Bornecrantz 66a9131dd9 st/oxr: Guard against xsysc being NULL 2023-05-18 12:22:57 +01:00
Jakob Bornecrantz d79678aeec st/oxr: Always create the system compositor
Some apps will enable headless and vulkan, then use Vulkan.
2023-05-18 12:22:57 +01:00
Jakob Bornecrantz 288ee57fd2 d/survive: Get FoV from config struct 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz b84d1dfa00 d/vive: Get FoV from config struct 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz 9f5e8963a9 a/vive: Add tweaks for FoV values 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz 7b691ccab7 a/vive: Generate FoV values in config 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz 62c483301c a/vive: Order CMakeLists.txt files [NFC] 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz d984950be1 a/vive: Make imu config return be a out variable [NFC] 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz b93ed31cce a/vive: Constify config argument to get functions [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 5e0b21cd18 a/vive: Tidy vive_config.h [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 54083a99de a/vive: Tidy vive_config.c [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 67dd88ec4a a/vive: Refactor out calibration getters into own file [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 3487923eab d/qwerty: Remove old prober code 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz fb30f5e077 t/common: Put simulated, remote and qwerty higher up in list 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz be58024ffb t/common: Add Qwerty builder 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz 76c5d677d7 d/qwerty: Add helper create function 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz ef59d8e85d d/qwerty: Tidy header [NFC] 2023-05-16 22:25:05 +00:00
Ryan Pavlik ae6b0ad445 st/p,t/common: Protect tracker-creation calls 2023-05-16 22:04:53 +00:00
Ryan Pavlik cd79bef0cf cmake: Fix build flags on MSVC 2023-05-16 22:04:53 +00:00
Ryan Pavlik f0cc05d09b cmake: Turn off two drivers that are currently incompatible with MSVC 2023-05-16 22:04:53 +00:00
Ryan Pavlik 173b36c3a2 t/sdl_test: Fix macro collision on Windows 2023-05-16 22:04:53 +00:00
Ryan Pavlik 8603e5d63e i/client: Fix return type incompatibility on Windows 2023-05-16 22:04:53 +00:00
bjorn d16576252f c/main: Fix XRT_COMPOSITOR_FORCE_WAYLAND_DIRECT; 2023-05-16 14:40:10 -07:00
samuel degrande ea7ec1bda8 xrt: Fail to build with Clang 16 2023-05-16 14:25:36 +00:00
Christoph Haag 2f4a926184 t/legacy: Ensure all legacy drivers can be disabled [NFC] 2023-05-16 08:53:55 +00:00
samuel degrande 1ad168cfc5 cmake: Fix build failure on msys2/mingw64
This is due to the use of `${SDL2_LIBRARIES}` over `SDL2::SDL2`.

On some 'old' OSes such as Ubuntu 20.04, the SDL2 CMake config does
not set an SDL2:SDL2 target but rather defines SDL2_LIBRARIES and
SDL2_INCLUDE_DIRS variables.

This patch creates an SDL2::SDL2 target, if not already set, based on
those 2 variables.
2023-05-15 16:41:34 +00:00
Jakob Bornecrantz adc609d7c9 t/sdl_test: Compile as UTF-8 to fix MSVC warning
Fix the following warning:

sdl_program.cpp(25): warning C4566: character represented by universal-character-name '\u2603' cannot be represented in the current code page (1252)
2023-05-14 15:57:08 +01:00
Ryan Pavlik 4ffb271c6a cmake: Build all math-heavy code with optimization. 2023-05-14 08:28:37 +00:00
Jakob Bornecrantz 8c97342732 u/pacing: Add minimum compositor time 2023-05-14 06:52:55 +00:00
Jakob Bornecrantz f5e33e59c8 u/pacing: Add minimum app time option 2023-05-14 06:52:55 +00:00
Jakob Bornecrantz fd55a0f1ef u/pacing: Use helpers for ms <-> ns conversion 2023-05-14 06:52:55 +00:00
Jakob Bornecrantz e3ce39926a u/pacing: Improve comments 2023-05-14 06:52:55 +00:00
Jakob Bornecrantz bfb3d7029c u/time: Add ms to ns helper 2023-05-14 06:52:55 +00:00
Jarett Millard f1bc10003d d/pssense: Basic 3DoF pose tracking from IMU data 2023-05-13 10:58:33 -04:00
Jakob Bornecrantz ca20f359b5 ipc: Allow UWP/AppContainer and others to connect
Including: UWP/AppContainer, Authenticated user and Administrator. Currently
guarded with IPC_RELAXED_CONNECTION_SECURITY env variable.
2023-05-06 16:21:30 +01:00
Jakob Bornecrantz 5e19ae6a5b st/oxr: Refactor wait frame function to avoid setting state before we should
We would leak frame_id and active_wait_frames increment that would cause bad
states where we hadn't fully waited but would allow xrBeginFrame to complete.
Also improve error handling so that on error conditions the semaphore is
properly decremented and the application can call xrWaitFrame again.

This was caused by unreal doing something like this:
* xrBeginFrame <-- Error
* xrWaitFrame
* xrBeginFrame
* xrEndFrame
* Called at the same time:
  * xrWaitFrame
  * xrBeginFrame <-- Would get state from non-completed xrWaitFrame
2023-05-03 16:18:10 +01:00
Jakob Bornecrantz cfb63abac1 ipc: Do not leak arguments before fully having waited 2023-05-03 16:16:13 +01:00
Jakob Bornecrantz 0fc9796a74 u/pacing: Improve debug printing in app pacer 2023-05-03 16:16:11 +01:00
Jakob Bornecrantz 5511be3c2d u/pacing: Add variable tracking to fake pacer 2023-05-03 12:23:20 +01:00
Jakob Bornecrantz 04d5942fa5 c/main: Try to detect when we miss frames 2023-05-03 12:23:20 +01:00
Jakob Bornecrantz 73f68fd111 c/main: Prefer only two swapchain images 2023-05-03 12:23:19 +01:00
Jakob Bornecrantz 2ab43f7494 c/main: Only do early acquire if we are ready 2023-05-03 12:23:02 +01:00
Jakob Bornecrantz 27fafacf63 c/main: Refactor frame handling a bit 2023-05-03 12:23:02 +01:00
Jakob Bornecrantz 2a17212d7f c/main: Use vk_surface_info when creating images 2023-05-03 12:23:01 +01:00
Jakob Bornecrantz 622e09bc19 a/vk: Add vk_surface_info helpers 2023-05-03 00:09:03 +01:00
Jakob Bornecrantz 5432e4c1b0 d/twrap: Log errors in twrap_slam_create_device 2023-05-02 23:39:58 +01:00
Jakob Bornecrantz 1f2d444ffc t/common: Fix typo 2023-05-02 23:27:57 +01:00
Fernando Velazquez Innella 6096f2199d c/client: Signal D3D12 fence from GPU instead of CPU 2023-05-02 21:23:19 +00:00
Ryan Pavlik 887b79f577 t/common: Add a missing result and null check in North Star builder 2023-05-02 21:19:40 +00:00
Jan Schmidt 2d418ac14a d/wmr: Allow direct BT HP Reverb G2 controllers
Don't skip HP Reverb G2 controllers when they are directly
connected via bluetooth
2023-05-01 16:32:33 +01:00
Jan Schmidt 51097c9ecd d/wmr: Implement HP Reverb G2 controller
Implement the HP Reverb G2 controller subclass
and device specific input parsing.
2023-05-01 16:32:33 +01:00
Jan Schmidt 3c641c8490 xrt: Add extra HP Reverb G2 controller click controls
Add XRT_INPUT defines for HP G2 WMR controller home and squeeze click
inputs
2023-05-01 16:32:33 +01:00
Jan Schmidt 7e18fac224 d/wmr: Differentiate Odyssey+ controller
Switch the device name and input/binding mappings for
Odyssey+ controllers to differentiate them from OG WMR
controllers, allowing applications to load the correct
controller model
2023-05-01 16:32:33 +01:00
Jan Schmidt 3d0c898e22 d/wmr: Add Home button click to the OG WMR controller 2023-05-01 16:32:33 +01:00
Jan Schmidt ea53d274a5 d/wmr: Split out OG WMR controller handling
Move the original WMR controller specific handling
into a subclass of wmr_controller_base, and add
a stub placeholder for HP Reverb G2 controllers
2023-05-01 16:32:33 +01:00
Jan Schmidt f33326e90b d/wmr: Fix crash on invalid firmware
Don't access invalid memory on a short firmware read.
2023-05-01 16:32:33 +01:00
Jan Schmidt d326ff9890 d/wmr: Split the connection from controller
Factor out the bluetooth connection behaviour from
the WMR controller, so the connection can be
provided from the headset as well.
2023-05-01 16:32:33 +01:00
Jan Schmidt 35f72696fb xrt: Add WMR and Odyssey home click
Add xrt input entries to expose the home button on OG and
Odyssey+ WMR controllers
2023-05-01 16:32:33 +01:00
Jakob Bornecrantz cb6201f297 st/oxr: Set extensions earlier 2023-05-01 14:03:41 +01:00
Jakob Bornecrantz ce5669aabb st/oxr: Handle LOCAL_FLOOR enums 2023-05-01 14:03:41 +01:00
Jakob Bornecrantz 2b921ab673 t/slam: Enable some tracing 2023-05-01 14:03:41 +01:00
Jakob Bornecrantz c0cc22e101 d/wmr: Expand tracing in camera 2023-05-01 14:03:40 +01:00
Jakob Bornecrantz cfdea265f4 c/client: Avoid using shared context on synchronization 2023-05-01 14:03:01 +01:00
Jan Schmidt 96d188803c d/wmr: Fix typo in debug output
correnntly -> currently
2023-05-01 13:51:44 +01:00
Jan Schmidt 236e732404 d/wmr: Fix prober crash after failing to load fw
Fix a double-free. The wmr_hmd_create() method
already cleans up the hid devices on failure.
2023-05-01 13:51:44 +01:00
Jan Schmidt 87d804c7d6 d/wmr: Log larger Device Status messages
HP Reverb G2 sends larger device status messages with unknown
content. Log how large they are, and at least dump the first
11 bytes
2023-05-01 13:51:44 +01:00
Jan Schmidt ed54b7899c d/wmr: Don't wait forever for HMD firmware
Add a 100ms timeout for firmware reads from the HMD,
and error out if it takes longer. Fixes problems
sometimes waiting forever on my G2 when it gets
into a bad state.
2023-05-01 13:51:44 +01:00
Jan Schmidt 7b4fffed8f d/wmr: Improve readability in the camera source 2023-05-01 13:51:44 +01:00
Jan Schmidt e9c977243f u/logging: Add hexdump logging method
Add macros for logging hexdumps of memory blocks to help
with driver development. Only macros for trace and debug
level logging are provided, as noone should be logging
hexdumps except for development.
2023-05-01 13:51:44 +01:00
utzcoz 4f171b3d55 ext/openxr: Update headers to 1.0.27
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-27 21:48:50 +08:00
Jakob Bornecrantz 5197b4a42f d/vive: Add a slider to adjust all tracked pose timestamps 2023-04-26 22:17:36 +01:00
Jakob Bornecrantz ce3c5d59fb d/wmr: Add a slider to adjust all tracked pose timestamps 2023-04-26 22:17:36 +01:00
Jakob Bornecrantz 9d8668a0a6 cmake: Remove _SLAM suffixes on KIMERA and BASALT have defines 2023-04-26 21:39:16 +01:00
Jakob Bornecrantz 99c1742c82 ext/slam: Use LDFLAGS instead of libraries
This lets us avoid LIBRARY_PATH in order to build Monado.
2023-04-26 21:39:16 +01:00
Ryan Pavlik c924157c59 a/android: Only look up the standardized intent to find our own package.
Should allow a constrained query manifest in client apps.
2023-04-25 10:40:58 -05:00
Ryan Pavlik f57bc4a849 android-jni-wrap: Update to add more things 2023-04-24 11:43:30 -05:00
Christoph Haag aa052046a8 cmake: Delete active_runtime.json if it already exists 2023-04-24 13:57:00 +00:00
Jakob Bornecrantz c0d242e1ed a/vk: Fix doccomment style [NFC] 2023-04-21 14:28:18 +01:00
Jakob Bornecrantz 17ea4a73eb a/vk: Mark unexported function as static [NFC] 2023-04-21 14:28:18 +01:00
Jakob Bornecrantz c7fa7fe701 a/vk: Loop over all optional extensions, not just the first
This caused the event thread to not start
because the needed extensions where not enabled.
2023-04-21 14:27:33 +01:00
Jakob Bornecrantz 05792ff150 st/oxr: Refactor OXR_NO_PRINTING env vars 2023-04-18 22:28:53 +01:00
Jakob Bornecrantz fa0b3ad73c st/oxr: Refactor logging functions and use OutputDebugStringA on Windows
The OXR logging functions are not called during normal opperation so it's okay
to always copy into a full buffer.
2023-04-18 22:28:53 +01:00
Jarvis Huang 0d31791092 comp/android: Refine surface creation flow
Reuse MonadoView when "Display over other apps" is enabled. Move surface
creation logic to compositor for consistency. With this approach, compositor
implementer controls the way surface is created.
2023-04-18 16:24:35 -05:00
Jarvis Huang cf7e44b710 aux/android: Refactor MonadoView 2023-04-18 16:22:42 -05:00
Jarvis Huang 7c02d466e2 externl: Update android-jni-wrap 2023-04-18 16:22:42 -05:00
Jarvis Huang d60db29295 aux/android: Refactor SystemUiController 2023-04-18 16:22:42 -05:00
Jakob Bornecrantz 7147e47508 c/client: Implement excplicit transitions in Vulkan and D3D12 2023-04-18 14:31:55 +01:00
Jakob Bornecrantz 45fe1d6ed0 st/oxr: Refactor swapchains to use explicit transitions 2023-04-18 14:31:55 +01:00
Jakob Bornecrantz 6415480f1c st/oxr: Tidy includes [NFC] 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz b49cd74114 st/oxr: Rename and document common swapchain creation function [NFC] 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz 9055b9d2ec st/oxr: Remove unneeded prefixes on functions [NFC] 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz 52f790289d st/oxr: Swapchain destroy was the same for all APIs 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz a56caf762e st/oxr: Refactor swapchain functions a bit 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz 505e4e8c2f c/client: Refactor image barrier submission into a helper function 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz 0d21b73b05 c/client: Implement transition image stubs 2023-04-18 14:21:10 +01:00
Jakob Bornecrantz b7362f27e6 xrt: Add image transition inteface 2023-04-18 14:21:10 +01:00
Ryan Pavlik 9840730169 ipc/android: Run spotlessApply to format Java and Kotlin code 2023-04-17 10:58:38 -05:00
Ryan Pavlik fc3af6f711 a/android: Run spotlessApply to format Java and Kotlin code 2023-04-17 10:58:38 -05:00
utzcoz b5b0c30936 t/android: Run spotlessApply to format Java and Kotlin code
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-17 10:58:38 -05:00
utzcoz 8e93bbde4b gradle: Integrate spotless to format Java and Kotlin code
See https://github.com/diffplug/spotless.

Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-17 10:58:38 -05:00
utzcoz c8c5d6444e gradle: Remove redundant dependency of lifecycle-viewmodel
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-15 16:20:50 +00:00
Mario Kleiner ff9ad4016f c/multi: Refine some logging messages a bit.
Add some timestamps and extra logging to the frame scheduling code.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-04-15 00:43:20 +00:00
Mario Kleiner ae2e7405dd c/multi: Move log_frame_time_diff() to avoid false late frame reports.
In its original call location, this diagnostic/warning function gets
called for each composition cycle even for client frames which have
not yet been delivered for display, because the frames target display
time "XrFrameEndInfo frameEndInfo.displayTime" (as provided by the
OpenXR client) has not been reached yet. Iow. if a OpenXR client
specifies a target frameEndInfo.displayTime in the future, to request
frame presentation in the future, this will cause a flood of false
"Frame late ..." messages by the compositor, despite nothing being
wrong with the timing, until the frame is actually delivered.

E.g., if frameEndInfo.displayTime is 1 second in the future, we'll
get this for each client xrEndFrame() invocation:

WARN [log_frame_time_diff] Frame late by 11.11ms!
WARN [log_frame_time_diff] Frame late by 22.22ms!
... another 87 like these ...
WARN [log_frame_time_diff] Frame late by 988.43ms!

I think what we want is to only check client frames that are actually
delivered the first time by multi_compositor_deliver_any_frames() for
initial display in the current compositor work cycle, and then report
if this first frame display onset was not on or close to the OpenXR
client requested frameEndInfo.displayTime, but too early or too late,
in violation of the clients wishes.

Moving the call check and call of log_frame_time_diff() achieves this
and gives meaningful debug output.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-04-15 00:43:20 +00:00
Mario Kleiner 1c96ee619d u/metrics: Add option to fflush after writing each metrics record.
This allows to use the metrics logging in "streaming mode" where
records are written out with low delay, e.g., into a Unix fifo
file / pipe for live consumption by some tracing or recording
application.

XRT_METRICS_EARLY_FLUSH=true enables this "streaming mode".

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-04-15 00:32:22 +00:00
Mario Kleiner 9e647f9a46 d/vive: Parse/Recognize HTC Vive Pro Eye HMD headphone audio buttons.
Does not do anything yet within Monado, but documents how to parse
button state of left headphone volume up/down buttons and right
headphone microphone mute button.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-04-14 10:48:39 +00:00
Mario Kleiner 0116a76db5 d/vive: Add Vive Wand controller name string for the HTC Vive Pro Eye.
Behave like other Wands, just a different name string.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-04-14 10:48:39 +00:00
Jakob Bornecrantz 86262e8b4e a/vk: Remove global command pool 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz e9475b1313 c/main: Use cmd helpers for main submission 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 231a743896 c/main: Use cmd pool helpers in peek code 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 185bc2bc3c c/main: Use cmd pool helpers in mirror window code 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 5ef2b647f1 c/main: Use cmd pool helpers in layer render 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 1ddfcaa5ab c/client: Use cmd pool helpers 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz d1906d1cf8 c/util: Use cmd pool helpers in swapchain code 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 197461b4cd c/render: Refactor close loops [NFC] 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 6598760522 c/render: Put distortion image functions in own file 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz f536ec2009 c/render: Use cmd pool helpers in init code 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz e5fed9c3be c/render: Improve error handling 2023-04-14 02:34:49 +01:00
Jakob Bornecrantz 68b8a2f371 a/vk: Add command pool helpers 2023-04-14 02:34:49 +01:00
Moshi Turner 4d3c1cf7c5 t/common: Parse upside-down DepthAI device in North Star builder 2023-04-13 11:50:38 +00:00
Moshi Turner bdc33510a1 h/mercury: Dump camera calibration if debugging 2023-04-13 11:50:38 +00:00
utzcoz 667a0404c2 a/util: Remove unused headers for u_var.cpp 2023-04-13 06:41:06 +00:00
Moshi Turner ec59e97bda st/gui: Use IMU in EuRoC recorder scene 2023-04-12 16:43:20 -05:00
Moshi Turner c05c5d5c2e st/gui: Add EuRoC recorder for DepthAI cameras 2023-04-12 12:19:13 +00:00
Moshi Turner 53e738a093 d/dai: Add manual exposure controls 2023-04-12 12:11:06 +00:00
Jakob Bornecrantz ee0dad22d5 c/main: Tidy readback code [NFC] 2023-04-12 12:49:24 +01:00
Moshi Turner f2bea2c7c6 d/ns; a/util: Remove old name from Moshi's distortion correction method
I don't hate my old name that much, but this is my last chance to change it before there's some "moshi-style" North Stars floating around.
2023-04-11 23:45:23 -05:00
Moshi Turner 19e0af55d2 c/main: Bounce readback images off temporary image
Most NVidia graphics cards don't support blitting straight from device memory to host memory, but all GPUs support doing it this way.
2023-04-11 22:27:36 -05:00
Moshi Turner 51ff80e802 st/gui: Lazily create debug sinks so that they can be created at any time
Useful for deferred-creation compositors, and for repositories submoduling Monado.
2023-04-11 19:50:41 -05:00
utzcoz 39d701a30c t/common: Fix small typo for target_builder_simulated.c's comment [NFC] 2023-04-11 12:00:01 +00:00
utzcoz 5565564e70 gradle: Fix building with JDK11+
1. Bump Kotlin version to 1.7.10.
2. Bump Hilt version to 2.45.
3. Add implementation of lifecycle-viewmodel-ktx dependency explicitly
   to fix duplicate class error.

Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-11 11:43:57 +00:00
utzcoz 08831237f5 gradle: Migrate compileSdkVersion to compileSdk
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-11 11:43:57 +00:00
Christoph Haag c248670f2f d/survive: Add vive ipd range 2023-04-11 11:42:21 +00:00
Ryan Pavlik af29da2545 gradle: Use static C++ runtime library by default when building Monado, for compatibility.
We do not export any C++ symbols.

Added property to allow selection of shared C++ standard lib.
2023-04-10 14:11:41 -05:00
Ryan Pavlik 788973926a gradle: Fix warning related to dagger 2023-04-10 14:11:41 -05:00
Ryan Pavlik 8bc8abe904 gradle: Fix parsing OpenXR version 2023-04-10 14:11:41 -05:00
Ryan Pavlik 048552f914 gradle: Adjust where we generate files to 2023-04-10 14:11:41 -05:00
Ryan Pavlik 8b50c5cb9e gradle: Do not need the CDDL anymore because Dagger changed its deps 2023-04-10 14:11:41 -05:00
Ryan Pavlik 4369640ecc android: Clean up manifest and silence warnings 2023-04-10 14:11:41 -05:00
Ryan Pavlik 35b1bc063d gradle: Update dependencies further and fix conflicts 2023-04-10 14:11:41 -05:00
Jakob Bornecrantz 5f1b54bcd5 a/vk: Add blit and copy helpers 2023-04-09 14:04:53 +01:00
Jakob Bornecrantz c0287b690b a/vk: Add command helpers 2023-04-09 12:01:27 +01:00
Jakob Bornecrantz 14f15284a1 a/vk: Update comments for command buffer writers 2023-04-08 00:03:20 +01:00
Jakob Bornecrantz 585e23054d a/vk: Use helper define in vk_csci_get_image_usage_flags 2023-04-07 21:44:22 +01:00
Jakob Bornecrantz 732c4a23ae a/vk: Don't unconditionally set colour attachment usage bit for swapchains 2023-04-07 21:44:22 +01:00
Jakob Bornecrantz 748ec59ddf a/vk: Don't hardcode sampled bit anymore 2023-04-07 21:44:22 +01:00
Jakob Bornecrantz 9f06b1a25e c/util: Always request sampled in extra bits 2023-04-07 21:44:22 +01:00
Jakob Bornecrantz a03d1421b8 c/client: Respect native compositor's extra usage bits 2023-04-07 21:44:22 +01:00
Jakob Bornecrantz 1adf46b02a c/client: Use correct format in get_swapchain_create_properties funtions 2023-04-07 21:44:20 +01:00
Jakob Bornecrantz 94c9c8a253 xrt: Allow compositor to request extra usage bits
Some compositors might need extra usage bits set beyond just the constant
sampled bit, make it all generic and extend the xrt interface to allow it.
2023-04-07 21:33:52 +01:00
Jakob Bornecrantz b193c3bdd2 t/sdl_test: Make sure to init devices before system devices 2023-04-07 16:11:16 +01:00
Jakob Bornecrantz bab4a126ae xrt: Remove product_name from xrt_prober_device struct
And move it to an internal struct instead. Better to keep it internal to the
prober as it was only used for the bluetooth probing. And there was a function
that applications should use to get strings from xrt_prober_device.
2023-04-07 15:37:22 +01:00
Jakob Bornecrantz d40805e777 c/client: Silence VK_FORMAT_R32_SFLOAT warning in OpenGL code 2023-04-07 14:27:08 +00:00
Jakob Bornecrantz 8e087ac5ac d/vive: Use vive_poses helpers for offsets of poses 2023-04-07 13:37:05 +00:00
Jakob Bornecrantz ea97960b9e d/vive: Change how the pose GUI variable is updated 2023-04-07 13:37:05 +00:00
utzcoz 990ce39fa1 c/main: Remove unused headers for comp_renderer.c 2023-04-07 11:23:43 +00:00
Mateo de Mayo c0f7a5ed01 d/vive: Improve handling of controller pose 2023-04-06 16:46:11 +00:00
Jakob Bornecrantz e9c43a7ca6 d/wmr: Remove legacy found functions 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 2ddf868735 d/wmr: Do device creation via builder interface 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 56dd75c14d d/wmr: Add stub WinMR builder 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 05b83d5102 d/wmr: Move wmr_headset_type to wmr_common.h 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 3819a21e44 d/wmr: Tidy interface and common headers 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 6ee235ac3b d/wmr: Tidy camera destroy function 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 1410afc330 d/wmr: Reject timestamps that are older then the last sample received 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz a5d3fff573 t/common: Add NorthStar to doxygen 2023-04-05 16:53:24 +01:00
Jakob Bornecrantz 85886e53e1 c/client: Make it clear where we break the OpenXR spec 2023-04-04 13:56:55 +01:00
Jakob Bornecrantz a6764b751a c/client: Don't use vkDeviceWaitIdle
As per the documentation for vkDeviceWaitIdle, it requires that the VkQueue
host access is externally synchronized. And the application may have other
VkQueue's in use that we do not know about.

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDeviceWaitIdle.html
2023-04-04 13:56:55 +01:00
Jakob Bornecrantz 50838f5801 xrt: Introduce xrt_layer_frame_data 2023-04-04 13:38:21 +01:00
Jakob Bornecrantz bec9a30bfe xrt: Re-order compositor header for better grouping [NFC] 2023-04-04 13:30:22 +01:00
Mateo de Mayo 3a11afa846 d/wmr: Fix null dereference 2023-04-03 17:55:08 -03:00
Mateo de Mayo 3ecee6d0ca d/wmr: Support head tracking with more than two cameras 2023-04-03 12:17:11 -03:00
utzcoz 629c4b67f1 ipc/android: Remove unnecessary toString for log
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-02 16:14:15 +00:00
utzcoz d30b015b39 aux/android: Remove unnecessary toString for log
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-02 16:14:15 +00:00
utzcoz a4cea7c0e3 t/android: Remove unnecessary toString for log
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-04-02 16:14:15 +00:00
Jakob Bornecrantz a2081db38a st/oxr: Fix typo in OXR_CHECK_XRET define usages [NFC]
Fix typo that I introduced in !1727 (95512594a0).
2023-04-01 16:32:03 +01:00
Mateo de Mayo 24de185b6c t/openvr: Add openvr tracker for recording lighthouse groundtruth
With the SLAM_OPENVR_GROUNDTRUTH_DEVICE we can select a device (HMD, right/left
controller, vive tracker) to use as the groundtruth provider for a SLAM tracker.
This is useful to record euroc datasets with lighthouse groundtruth.
2023-04-01 14:56:39 +00:00
Jarvis Huang 95512594a0 st/oxr: Convert session IPC error to XR_ERROR_SESSION_LOST
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-04-01 15:44:32 +01:00
Jakob Bornecrantz c006ac138f st/oxr: Add helper for xrt_result_t checking 2023-04-01 15:44:32 +01:00
Jarvis Huang c560ff5592 st/oxr: xrPollEvent should not return XR_SESSION_LOSS_PENDING 2023-04-01 14:43:40 +01:00
Jarvis Huang 7cd1d4886f st/oxr: Support session lost error in session related APIs 2023-04-01 14:43:40 +01:00
Jarvis Huang f9d83c8b1f st/oxr: Handle XR_SESSION_STATE_LOSS_PENDING 2023-04-01 14:43:40 +01:00
Jarvis Huang 971947f722 c/multi: Implement xrt_multi_compositor_control::notify_surface_lost 2023-04-01 14:43:40 +01:00
Jarvis Huang aa9c559f96 xrt: Add new API in xrt_multi_compositor_control interface 2023-04-01 14:43:40 +01:00
utzcoz 982932158c c/main: Remove unused comp_renderer including for comp_window_peek 2023-04-01 10:37:09 +00:00
Ryan Pavlik c1ba8ff74f t/oxr_android: Fix manifest by specifying the full classname of the activity
Needed in order to fix the move of the default namespace.
2023-03-29 14:10:17 -05:00
utzcoz 62d1510458 c/main: Remove unused header files from comp_target_swapchain.c 2023-03-29 17:36:56 +00:00
utzcoz 7676fa0a93 gradle: Bump AGP to 7.1.2
1. Bump AGP to 7.1.2.
2. Bump hiltVersion to 2.38.1.
3. Migrate lintOptions to lint.
4. Move package from AndroidManifest to Gradle.
5. Fully qualify application class name.
6. Fix packagingOptions usage with resources wrapper.

Signed-off-by: utzcoz <utzcoz@outlook.com>
Signed-off-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2023-03-29 16:48:16 +00:00
Jakob Bornecrantz 92f7e36083 st/oxr: Validate view array types 2023-03-28 19:30:57 +01:00
utzcoz c1f4f41dd7 xrt/comp: Clean up comp_client's cmake conditions with D3D 2023-03-27 12:12:19 +00:00
Jakob Bornecrantz 3000028512 d/pssense: Link with aux_util
Fixes build with tracing, and should be linked since utilities are used.
2023-03-22 15:07:04 +00:00
utzcoz 2d6db97ea0 sdl_test: Fix building on Windows platform 2023-03-22 14:18:25 +00:00
Jarett Millard b975545764 d/pssense: Add PlayStation Sense controller driver
The driver probes the Sense controller devices and interprets the button presses from HID packets
2023-03-20 23:20:34 -04:00
Jakob Bornecrantz 191ca7dbfd u/hand: Remove unused field
When we need this enum we can add it back in the xrt headers.
2023-03-16 14:19:38 +00:00
Jakob Bornecrantz 531b10fa4c xrt: Tidy various header includes 2023-03-16 14:19:38 +00:00
Jakob Bornecrantz 0c83cd350b xrt: Do not include util headers in xrt headers
This lead to some files getting u_misc for free, and also
other things being pulled in when they shouldn't have been.
2023-03-16 14:19:38 +00:00
Jakob Bornecrantz 7ce5a729b1 d/survive: Add SURVIVE_TIMECODE_OFFSET_MS to set timecode offset at launch 2023-03-16 13:07:22 +00:00
Jakob Bornecrantz ea7fbd4444 d/survive: Use u_var_draggable_f32 for timecode offset 2023-03-16 13:07:22 +00:00
Jakob Bornecrantz 0be1a3c512 u/debug_gui: Fix assert if window has been closed before exiting service 2023-03-16 12:27:43 +00:00
Moshi Turner 749d034a14 d/vive, d/survive, aux/vive: Fix hand offsets 2023-03-15 23:57:27 +00:00
Moshi Turner 570a5513be d/opengloves: Remove left-over code 2023-03-15 23:42:46 +00:00
Jakob Bornecrantz 6b45e22164 d/survive: Make it possible to add offset to timecode calculation 2023-03-13 23:55:00 +00:00
Jakob Bornecrantz b4e901f674 t/common: Print what driver is being used in Lighthouse driver 2023-03-13 23:49:50 +00:00
Mateo de Mayo 5503d75c43 d/vive: Fallback to v4l2 camera timestamps when lighthouse is on
The pulse 0xFD of the report 0x25 comes at 54hz and thus we are assuming its
timestamp are the camera frame timestamps. However, it seems that this report
stops coming when the lighthouses are enabled and instead we get a 0x28 report.
This commit silently handles the 0x28 instead of throwing errors and fallbacks
to using v4l2 timestamps instead of the previous timestamps from pulse 0xFD.
2023-03-13 17:58:24 +00:00
Mateo de Mayo 642549b5a0 t/euroc: Fix race condition in imu and gt csv writers
Multiple cameras were flushing the imu/gt queues but only one should do so.
2023-03-13 17:58:24 +00:00
Fernando Velazquez Innella 4b78b4c58e aux/d3d: Add missing cubemap support 2023-03-13 17:29:56 +00:00
Jakob Bornecrantz fc6fb265ff t/file: Only read matrix sizes that are with in reasonable limits 2023-03-13 16:50:01 +00:00
Christoph Haag be093c4e06 a/tracking: Fix psvr tracker OpenCV parameters
Fixes OpenCV exception on startup with Playstation Move controller:
 what():  OpenCV(4.7.0) /usr/src/debug/opencv/opencv-4.7.0/modules/features2d/src/blobdetector.cpp:93: error: (-5:Bad argument) 0<minArea<=maxArea in function 'validateParameters'
2023-03-13 01:36:26 +00:00
Christoph Haag 9dbfdf97ce d/ohmd,svr: Fix build
fixes d601f893da
2023-03-13 01:32:34 +00:00
Jakob Bornecrantz 63a180cb97 h/mercury: Remove unused variable to fix warning 2023-03-11 14:06:59 +00:00
Jakob Bornecrantz 5da159ce8f ext/tracy: Silence warnings 2023-03-11 13:00:38 +00:00
Jakob Bornecrantz be7d5c0c2a ext/tracy: Update to v0.9.1 2023-03-11 12:54:50 +00:00
Jakob Bornecrantz 7c024b3994 st/oxr: Use xrt_space 2023-03-10 00:03:46 +00:00
Jakob Bornecrantz c70bc60084 xrt: Also create a space overseer when creating system devices 2023-03-10 00:03:46 +00:00
Jakob Bornecrantz 4aaefc7588 ipc: Add xrt_space support 2023-03-10 00:03:46 +00:00
Jakob Bornecrantz ad2542124b u/builders: Add helper function to create space overseer 2023-03-10 00:03:46 +00:00
Jakob Bornecrantz 4d782620d1 u/space: Add default Space Overseer 2023-03-10 00:03:46 +00:00
Jakob Bornecrantz 1c00a596af xrt: Add xrt_space interface 2023-03-09 20:42:58 +00:00
Jakob Bornecrantz bff220b6f8 ipc: Implement xrt_device::compute_distortion 2023-03-09 15:51:29 +00:00
Jakob Bornecrantz d601f893da xrt: Tidy compute_distortion function 2023-03-09 15:51:12 +00:00
Christoph Haag b0e164db19 d/survive: Fix warning 2023-03-08 22:12:18 +01:00
Christoph Haag 8cc5db3a6c d/survive: Add some debug gui entries 2023-03-08 21:46:42 +01:00
Christoph Haag 24b53c0f1a d/survive: Apply device IPD to view poses 2023-03-08 21:46:19 +01:00
Jakob Bornecrantz 062dec59b7 cmake: Sort print list and general tidy [NFC]
* Sort lists
* Add all entries to exposed cmakedefines list
* Remove duplicate hand-tracking entry
* Move SLAM entry to feature list as it's called feature
2023-03-08 01:03:21 +00:00
Moshi Turner 03546e0b99 h/mercury: Add wrist pose initialization guesser 2023-03-07 17:41:49 -06:00
Moshi Turner 3f2b71a9d5 h/mercury: Use post-rotation residual that'll handle big rotations
Fixes a long-standing bug
2023-03-07 17:41:49 -06:00
Moshi Turner cdd0a6df67 h/mercury: Have a post-translation as well as post-rotation
For better numerical stability. Shouldn't significantly affect tracking besides slight jitter reduction and very slightly higher accuracy.
2023-03-07 17:41:49 -06:00
Moshi Turner 7c93b1ccfd h/mercury: Move all defines to lm_defines.hpp 2023-03-07 17:40:45 -06:00
Moshi Turner 4ccc133ac5 h/mercury: Split lm_rotations into two files to make copyright ownership clear 2023-03-07 17:40:45 -06:00
Moshi Turner 7485afbeaa xrt: Refactor oxr_sdl2_hack to u_debug_gui
And OXR_DEBUG_GUI to XRT_DEBUG_GUI

Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-03-06 16:39:52 -06:00
Jakob Bornecrantz e338d57945 st/gui: Remove unused pointer [NFC] 2023-03-06 14:38:36 +00:00
Moshi Turner c0af2327fd h/mercury: Push frame timestamp back before predicting next frame ROIs
Fixes minor logic error and stops crash if hands are detected on the very first frame
2023-03-05 22:41:10 -06:00
Moshi Turner bc152f6983 h/mercury: Dynamically allocate arrays for stereographic projection
Also factor out stereographic_unprojection into its own file because we're gonna need it elsewhere
2023-03-04 17:52:15 -06:00
Moshi Turner 0931cbaf0f h/mercury: Add option to run hand detection model in all views 2023-03-03 20:27:39 -06:00
Moshi Turner 7f5562c765 h/mercury: Don't show hands until tracked for 10 frames 2023-03-03 20:27:39 -06:00
Moshi Turner 84bae0b8ca h/mercury: Add debug instrumentation header
So that we can run automated tests on our hand tracking
2023-03-03 20:27:39 -06:00
Moses Turner a934bf4ae3 h/mercury: Bump the hand detection threshold up 2023-03-03 20:27:39 -06:00
Jakob Bornecrantz 006bdbc400 u/pp: Add new xrt input enums to printing function 2023-03-03 21:38:54 +00:00
Jakob Bornecrantz 3ab34071be st/oxr: Extract space type conversions 2023-03-03 21:38:54 +00:00
Jakob Bornecrantz a980392b9e st/oxr: Refactor out conversion helper to own header 2023-03-03 21:38:54 +00:00
Jakob Bornecrantz b15ac35e76 st/oxr: Refactor some things into oxr_defines.h 2023-03-03 21:38:54 +00:00
Jakob Bornecrantz d84a679eb9 u/builders: Move setup tracking origin function here 2023-03-03 21:38:54 +00:00
Jakob Bornecrantz 05de788168 d/multi: Remove all uses of tracking_origin offsets 2023-03-03 21:38:54 +00:00
Moshi Turner 5519aecd2c cmake: Don't build t_euroc_recorder on Windows 2023-03-03 15:13:23 -06:00
Moshi Turner 8d2d90432a cmake: Add XRT_MODULE_MONADO_GUI 2023-03-03 15:13:23 -06:00
Moshi Turner ed086ea423 cmake: Add XRT_MODULE_MONADO_CLI 2023-03-03 15:13:23 -06:00
Moshi Turner ae7167dbab cmake: Add XRT_MODULE_AUX_VIVE 2023-03-03 15:13:23 -06:00
Moshi Turner 85a701a4a0 cmake: Add XRT_MODULE_MERCURY_HANDTRACKING 2023-03-03 15:13:23 -06:00
Moses Turner 58399cd993 h/mercury: Remove duplicate include 2023-03-03 15:13:23 -06:00
Moshi Turner 54bd4b844f a/math: Fix m_filter_f32_run -> m_filter_euro_f32_run
This is currently used in the delay filter in the Mercury SteamVR driver
2023-03-03 15:13:23 -06:00
Moses Turner c596b31327 h/mercury: Add interface header define 2023-03-03 15:07:45 -06:00
Moshi Turner c750d714a9 d/ht_ctrl_emu: Fix pinch detection 2023-03-03 15:07:45 -06:00
Jakob Bornecrantz 4b6491aa16 cmake: Introduce a new module category 2023-03-03 20:56:59 +00:00
Ryan Pavlik 2a3157b087 cmake: Do not install a test binary 2023-03-03 01:06:11 +00:00
Ryan Pavlik fd77b84938 st/oxr: Suppress clang-tidy removing a forward declaration. 2023-03-03 01:05:14 +00:00
Ryan Pavlik ae61287f4c a/vk: Enlarge buffer to fix warning 2023-03-03 01:05:14 +00:00
Ryan Pavlik 124c9ecf3f st/oxr: Suppress a warning.
It looks more serious than it actually is, this is normal usage.
2023-03-03 01:05:14 +00:00
Ryan Pavlik 9348130fe7 a/util: Fix bitwise operation on signed integer warnings 2023-03-03 01:05:14 +00:00
Ryan Pavlik bdc526b77d xrt: Fix bitwise operation on signed integer warnings 2023-03-03 01:05:14 +00:00
Ryan Pavlik cff131da36 st/oxr: Fix bitwise operation on signed int warnings. 2023-03-03 01:05:14 +00:00
Ryan Pavlik f43ac4841b d/wmr: Fix warnings/issues, mostly related to 32-bit builds 2023-03-03 01:05:14 +00:00
Ryan Pavlik f230446cec c/util: Fix printf on 32-bit 2023-03-03 01:05:14 +00:00
Ryan Pavlik 06b91dabc8 c/main: Fix printf formatting on 32bit 2023-03-03 01:05:14 +00:00
Ryan Pavlik 43ac5d44cf d/euroc: Fix printf formatting on 32bit 2023-03-03 01:05:14 +00:00
Ryan Pavlik fd2c7c6a98 a/util: Fix printf formatting on 32-bit 2023-03-03 01:05:14 +00:00
Ryan Pavlik 44d6755814 external: Fix typo in DearImGui demo. 2023-03-02 17:49:26 -06:00
Ryan Pavlik 172a5baf23 st/oxr: Add missing calling convention macros for entry points.
Fixes 32-bit Windows build.
2023-03-02 13:48:25 -06:00
Moshi Turner 3c1880448e a/vive: Remove unused zlib linkage 2023-03-02 04:35:44 +00:00
Moshi Turner e26a272c17 d/dai, st/gui, t/common: Make DepthAI frameserver work with multicam sinks 2023-03-01 14:37:26 -06:00
Ryan Pavlik 9cf124254e c/main: Constify target factories 2023-03-01 19:54:36 +00:00
Ryan Pavlik 3058f1c149 c/main: Fix typo 2023-03-01 19:54:11 +00:00
Mateo de Mayo 59c3c911e6 d/rift_s: Add initial multicamera support
Tested-by: Nova <technobaboo@gmail.com>
2023-03-01 19:47:10 +00:00
Mateo de Mayo 813cb31cc6 t/euroc: Support euroc recording for multiple cameras 2023-03-01 19:43:06 +00:00
Mateo de Mayo c39dc977c4 d/euroc: Support datasets with more than two cameras 2023-03-01 19:43:06 +00:00
Mateo de Mayo 186ca8258e t/slam: Adapt camera calibration data for multiple cameras 2023-03-01 19:43:06 +00:00
Mateo de Mayo d8e1b7d921 t/slam: Handle multiple camera sinks 2023-03-01 19:43:06 +00:00
Mateo de Mayo 09d7aac89e external/slam: Update interface to support multiple cameras 2023-03-01 19:43:06 +00:00
Mateo de Mayo 52cac31d3a xrt: Support more than two cameras in a SLAM sink 2023-03-01 19:43:06 +00:00
Mateo de Mayo a93dc650a1 u/debug: Export debug_to_num function 2023-03-01 19:43:06 +00:00
Jakob Bornecrantz 84ccf3a78e a/math: Tidy m_filter_one_euro.[h|c] 2023-03-01 19:34:50 +00:00
Ryan Pavlik 534d2e9f66 a/math: Improve comments for one euro filter 2023-03-01 19:33:48 +00:00
Ryan Pavlik 8f02541c27 a/math: Add a zeroing in the generic init for one euro 2023-03-01 19:31:59 +00:00
Ryan Pavlik 0c8d78fe49 a/bindings: JSON schema for bindings 2023-03-01 17:10:48 +00:00
Ryan Pavlik 2d056e6606 a/math: Add comment for searching in the lever arm math. 2023-03-01 17:08:39 +00:00
Ryan Pavlik 66a303f809 st/oxr: Internal docs 2023-03-01 17:08:39 +00:00
Jan Schmidt 699a92d9f8 rift_s: Ignore the first 100 samples for the clock
After turning on the display, the Rift S
sends a burst of stale data and it can lead to
wildly incorrect clock estimates that then
recover really slowly and cause SLAM tracking to
lag horribly.

Throw away the first 100 samples, which seems to be
enough (only the first 20 or so seem to be bad).

Also reduce the clock a2b cutoff frequency, for
faster adaptation to changes.

Tested-By: Nova <technobaboo@gmail.com>
2023-03-01 17:08:09 +00:00
Ryan Pavlik f6ab734b2e a/math: Add floating point conversion methods to Rational 2023-03-01 10:53:18 -06:00
Jakob Bornecrantz 9a19a91f2d ipc: Refactor out common ipc_client_xdev 2023-02-28 21:27:56 +00:00
Jakob Bornecrantz a86cb86c80 st/oxr: Remove unused out_xdev argument 2023-02-28 21:27:53 +00:00
Jakob Bornecrantz 78f069a10d a/math: Make argument const 2023-02-28 21:27:19 +00:00
Ryan Pavlik f66d60cb2c aux/android: The Android XINA already always adds "sampled" 2023-02-28 13:56:58 -06:00
Jarvis Huang 9b2384f1fb t/android: Fix unable to connet to runtime if process is still alive 2023-02-28 19:38:41 +00:00
Jakob Bornecrantz 494e17e173 c/util: Filter Vulkan formats for AHardwareBuffer formats
Some drivers says that they can export/import Vulkan formats that doesn't
have a direct mapping to a AHardwareBuffer format. Our import/export code
doesn't handle that case so make sure to filter out those formats.
2023-02-28 16:05:39 +00:00
Jarvis Huang 5380b6c149 st/oxr: Use xrt_device_is_form_factor_available 2023-02-22 23:52:21 +00:00
Jarvis Huang 693641b70b ipc: Add support for xrt_device::is_form_factor_available 2023-02-22 23:52:21 +00:00
Jarvis Huang b93d1ea8b8 xrt: Add xrt_device::is_form_factor_available 2023-02-22 23:52:21 +00:00
Simon Zeni fdec80cd99 d/survive: add hand tracking pose offsets to controller 2023-02-22 23:51:50 +00:00
Simon Zeni 0402a1e1a0 aux/vive: add hand tracking values to vive_poses transforms 2023-02-22 23:51:50 +00:00
Fernando Innella 80a8048c39 c/render: Fix handling of alpha channel in compute layer renderer 2023-02-21 11:10:10 -05:00
Mateo de Mayo e9e0cf9f2c t/slam: Recover fallback measurements for systems without timing extension
Fixes #235
2023-02-18 13:49:56 +00:00
Mateo de Mayo b666b8b017 t/slam: Use accel for prediction by default
Before we were not doing this because we have a hardcoded gravity vector.
Due to this, if the IMU gravity is too different, it causes the prediction to
bounce around slightly.
In practice the difference seems to be sufficiently small so as to be almost
not noticeable and we get the latency improvements we get are probably worth it.
2023-02-17 15:31:59 -06:00
Mateo de Mayo 4ac9d985e5 st/steamvr_drv: Silence warning 2023-02-17 15:31:53 -06:00
Mateo de Mayo 5ba9efd522 t/euroc: Implement trajectory recording 2023-02-17 21:03:08 +00:00
Connor Smith 8b8358f0c9 Fix typo in Magic Leap 2 controller shoulder button path. 2023-02-17 15:05:41 -05:00
Moses Turner 3bfc87f76d (NFC) h/mercury: Fix typo 2023-02-16 17:03:17 -06:00
Moses Turner 8621acd899 d/ht, h/mercury: Use u_file_get_hand_tracking_models_dir
Needed for Windows SteamVR driver
2023-02-16 17:03:17 -06:00
Moses Turner 8b2d62cf57 a/util: Add u_file_get_hand_tracking_models_dir
Needed for Windows SteamVR driver
2023-02-16 17:03:15 -06:00
Moses Turner 266aec20e1 (NFC) h/mercury: Random nit in if case 2023-02-16 17:01:12 -06:00
Moses Turner 79701d8567 h/mercury: Remove __builtin_expect on MSVC 2023-02-16 17:01:12 -06:00
Moses Turner 3155765aed h/mercury: IWYU hg_image_distorter 2023-02-16 17:00:48 -06:00
Moses Turner b32ee5bbfb a/vive: Add extern "C" so we can use from C++
Needed for Windows SteamVR driver
2023-02-16 17:00:48 -06:00
Moses Turner 2835b597be a/tracking: Support JPEG output in euroc recorder 2023-02-16 16:53:13 -06:00
Moshi Turner 73416db7ba a/tracking: Remove break statement that broke OPENCV_RADTAN promotion/demotion 2023-02-13 11:30:44 -06:00
Ryan Pavlik 0b7c822007 a/bindings: Fix typos 2023-02-08 17:35:58 -06:00
Ryan Pavlik f32ed406d8 a/android,ipc/android: Fix typos 2023-02-08 17:35:49 -06:00
Ryan Pavlik a87fb2be93 a/tracking: Fix typo 2023-02-08 17:35:33 -06:00
Ryan Pavlik a51c2bcb1a d/rift_s: Fix typo 2023-02-08 17:35:22 -06:00
Ryan Pavlik 992066ea7e c/shaders: Fix typos 2023-02-08 17:35:14 -06:00
Christoph Haag 60b8b6e8fc a/binding: reverb g2 input/menu/click is on both hands
Spec:

On both hands
    …/input/menu/click
2023-02-07 11:27:39 +00:00
Ryan Pavlik 999c67975a st/oxr: Fix inconsistent naming related to subaction paths 2023-02-06 17:58:00 -06:00
Ryan Pavlik b2e65ed08c st/oxr: Add some const correctness 2023-02-06 17:58:00 -06:00
Ryan Pavlik 573cbb12ee st/oxr: Fix typo 2023-02-06 17:58:00 -06:00
Daniel Willmott 795de613c1 d/survive: Add aim pose offset to index controllers 2023-02-05 20:19:52 +00:00
Daniel Willmott ab857e8f74 aux/vive: Add vive_poses 2023-02-05 20:19:52 +00:00
Daniel Willmott e383609cbc aux/math: Add math_quat_from_euler_angles() 2023-02-05 20:19:52 +00:00
Moses Turner e9f79c45bf h/mercury: Update hand tracking with new half-artificial model 2023-02-04 15:23:04 -06:00
Moses Turner bfdeaa7d8f a/tracking: Introduce t_camera_models.h 2023-02-04 15:23:04 -06:00
Mateo de Mayo 3cdc02c1bb a/vk: Small improvements
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-02-04 18:52:59 +00:00
Jakob Bornecrantz a8c4d1299e a/vk: Fix crash caused by different signedness comparisons
Closes #234.

All credit for debugging and figuring out what the problem is goes to Mateo, I
made a different fix for it.

Co-authored-by: Mateo de Mayo <mateo.demayo@collabora.com>
2023-02-04 18:52:35 +00:00
Mateo de Mayo 5b431152e1 t/common: Remove invalid parameter 2023-02-03 10:13:41 -03:00
Jakob Bornecrantz c7e3a358b3 c/main: Prettier print of VkSurfaceFormats 2023-02-02 20:50:42 +00:00
Jakob Bornecrantz e5b28c491a c/main: Refactor instance extension selection
Add also add VK_EXT_swapchain_colorspace
2023-02-02 20:50:42 +00:00
Jakob Bornecrantz a7f7023570 c/main: Add optional VK_KHR_format_feature_flags2 2023-02-02 20:40:20 +00:00
Jakob Bornecrantz 3a143cadd1 a/vk: Print more color space formats 2023-02-02 20:40:20 +00:00
Jakob Bornecrantz 7576ce0960 a/vk: Track VK_EXT_swapchain_colorspace 2023-02-02 20:40:20 +00:00
Jakob Bornecrantz b7addee249 a/vk: Track VK_KHR_format_feature_flags2 2023-02-02 20:40:20 +00:00
Jakob Bornecrantz 3dc0415374 ipc: Tidy client includes (NFC)
Fixes some clang-tidy warnings about duplicated includes.
2023-02-02 20:05:06 +00:00
Jakob Bornecrantz 0938a1a02b xrt: Fix missing function declaration without a prototype warnings
Found by clang-15.

src/xrt/auxiliary/math/m_permutation.c:133:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
m_do_the_thing()
              ^
               void
2023-02-02 13:03:08 +00:00
Patrick Nicolas 559e145934 c/main: Record pose used in compositor 2023-01-31 09:30:47 +00:00
Patrick Nicolas 7a0d87db25 c/main: Allow providing comp_target_factory in constructor 2023-01-31 09:30:47 +00:00
Guillaume Meunier 76dff0b42f ipc: make the pid filename, the socket filename, and the client library suffix customizable 2023-01-31 09:30:47 +00:00
Moses Turner 86e31f54f3 xrt: Refactor t_camera_calibration to use a tagged union instead of a bare array
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-01-30 17:09:27 -06:00
Jakob Bornecrantz 3b0f938028 d/simulated: Add builder 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz d1b7e3e557 d/simulated: Add controllers
Supports simulating Simple, WinMR and ML2 controllers
2023-01-30 13:20:57 +00:00
Jakob Bornecrantz c562930cdc d/simulated: Export logging level 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 0494777d1a d/simulated: Make hmd center be pose and make it possible to pass it in at start 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 121bcf028a d/simulated: Make it possible to pass in movement mode
And a little bit of tidy.
2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 06806cc6ef t/common: Tidy builder list 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 9b8de2f155 t/common: Sort builder definitions alphabetically 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 84ebd4d687 t/common: Add comment to NorthStar builder create function 2023-01-30 13:20:57 +00:00
Jakob Bornecrantz 17a14d5b10 t/cli: Add calib-dump command 2023-01-29 01:38:01 +00:00
Moses Turner 7d72b74a68 c/main: Make peek window struct private, and fix build with old SDL2 2023-01-28 12:47:57 -06:00
Jakob Bornecrantz 9bd63cb37d d/dai: It's using aux_util so depend on it 2023-01-27 20:17:27 +00:00
Moses Turner 1bba34e944 xrt: Remove old_rgb hand tracking 2023-01-27 12:37:33 -06:00
Moses 10cdde859a a/math, comp/main, comp/render: Change math_matrix_2x2_* to m_mat2x2_* 2023-01-27 12:37:22 -06:00
Moses Turner 7d8d1ad8e7 a/math: Add m_matrix_2x2_invert 2023-01-27 12:37:22 -06:00
Moses Turner da16e64982 a/math: Move m_matrix_2x2 functions into their own header 2023-01-27 12:37:22 -06:00
Moses Turner 2c73485ecd d/ht: Tidy header 2023-01-26 19:10:57 -06:00
Mateo de Mayo da50a2499f d/wmr: Adjust exposure and gain individually for each camera 2023-01-26 18:07:10 +00:00
Mateo de Mayo 60b996239c u/aeg: Add optional prefix for having multiple aeg UIs 2023-01-26 18:07:10 +00:00
Mateo de Mayo d22f58bee4 u/var: Add nested headers 2023-01-26 18:07:10 +00:00
Christoph Haag 6f263dbda4 a/vk: allow VkImageViewUsageCreateInfo in Vulkan 1.1
Some drivers do not advertise support for VK_KHR_maintenance2 in
Vulkan 1.1, because it has been promoted to core.

This caused a validation error on compositors that use Vulkan 1.1
because the scratch image is allocated with unorm format and STORAGE
usage: an image view with srgb format can not be created with STORAGE
usage on many GPUs.
2023-01-26 12:30:13 +00:00
Christoph Haag a188ef219c a/vk: Store vulkan version in vk_bundle
Also adds code in c/util's Vulkan code to store it.
2023-01-26 12:30:13 +00:00
Christoph Haag e7fff3e435 d/hdk: handle 0 bytes read 2023-01-26 00:23:18 +01:00
Christoph Haag bc1d355e26 d/hdk: Zero initialize buffer 2023-01-26 00:17:37 +01:00
Christoph Haag 4030b474ad d/hdk: Use 100 ms hid read timeout
Avoids burning cpu cycles with busy looping
2023-01-26 00:17:37 +01:00
Moses Turner c9405e946f t/common: Add environment variable for replacing RiftS controllers with hand tracking 2023-01-25 22:24:53 +00:00
Jakob Bornecrantz c21a8ef0cc st/oxr: Add controller extensions
Extensions enabled:
* XR_EXT_hp_mixed_reality_controller
* XR_EXT_samsung_odyssey_controller
* XR_ML_ml2_controller_interaction
2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 6ce2978648 xrt: Add ML2 controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz d231850771 xrt: Add Samsung Odyssey Controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 958911fd0b xrt: Add HP Reverb G2 Controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz ed1f18bb74 xrt: More space in xrt_input_name enum list 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 213cc271f6 xrt: Sort xrt_device_name enums 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz da5323642d m/space: Correct comments 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz c7fdaacd02 m/space: Make sure to use valid poses in linear and angular calculations 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz f7118d7a93 m/space: Refactor pose part first 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 02aad19c78 m/space: Make pose validity upgrading clearer 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 2c1d413bf0 m/space: Add missing extern "C" 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 1c046dc523 m/space: Move functions to correct section 2023-01-24 16:11:56 +00:00
Robbie Bridgewater 17560d0618 a/util,st/gui: Add i64 as a debug GUI type 2023-01-24 15:35:39 +00:00
Fernando Velazquez Innella e035d060d1 c/render: implement render_resources_get_duration
Useful for systems that don't support calibrated timestamps and caseas where only execution time measuring is needed.
2023-01-24 15:35:31 +00:00
Ryan Pavlik 85a897a0b5 a/d3d,a/vk,c/client,ipc: D3D Depth texture / DXGI handle support
a/d3d: Improve allocation

Enable D3D11 and D3D112 depth images using DXGI handles

Allow D3D depth by default

D3D: only use DXGI handles

NT handles don't support depth formats and may fail to properly interop with Vulkan with some image dimensions.

Removed D3D_COMPOSITOR_ALLOW_DEPTH env.
D3D now always imports depth.

Added authorship.

Format pass

Fix D3D compositor tests

ipc: Fix HANDLE bit twiddling code

Merge into commits related to D3D depth changes. Makes the code compile
as C++, useful for Windows traceing

Co-authored-by: Robbie Bridgewater <ebridgewater@magicleap.com>
Co-authored-by: Fernando Velazquez Innella <finnella@magicleap.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-01-24 15:35:22 +00:00
Robbie Bridgewater 3802e737bb a/d3d,a/vk: Add R32_SFLOAT formats
Co-authored-by: Catalin Slobodeanu <cslobodeanu@magicleap.com>
2023-01-24 15:35:01 +00:00
SJakab e4a40a6e4e st/oxr: Skip oxr_session_end if connected to Unreal 4. 2023-01-24 11:42:46 +00:00
Moses Turner 4709ab85ca d/wmr: Fix grammar 2023-01-23 14:24:28 -06:00
Christoph Haag 87680c69d4 d/ohmd: Get rid of enum alias
The last enum index was used to determine the size of the inputs array.
The "clever" solution of aliasing enum values saved a minor amount of space
when allocating the xrt_device, while still allowing to dynamically assign
any input profile.

It also has drawbacks of being confusing and making it impossible to
validate that inputs from the correct xrt_input_name is requested.
Therefore just get rid of it, the minor space savings is not worth it.

fixes 2be4cbf4c3
2023-01-23 17:46:33 +01:00
Mario Kleiner 887b770f9e aux/binding: Implement optional "steamvr_controllertypes" for SteamVR input bindings
Add an optional switch -s or --steamvr to steamvr_profiles.py, which enables
a different naming scheme for the "controller_type" field in the generated
SteamVR profile json files.

If the switch is provided and an interaction profile in bindings.json
provides the optional new property "steamvr_controllertype", that property
will be used for the "controller_type" field of the written out .json,
instead of the regular auto-generated name.

This allows to generate json files which use controller_type names normally
used by SteamVR, so Monado provided controllers are mapped to the same
OpenXR interaction profiles that SteamVR would normally map them to.
E.g., the standard controller_type for Oculus touch controllers used by
SteamVR is "oculus_touch" instead of Monado's "monado_oculus_touch_controller".

That in turn allows OpenXR clients to use the SteamVR/OpenXR runtime to
access controllers provided by Monado's SteamVR driver plugin. Without such
compatible json files, only standard OpenVR clients can use controllers
exposed by Monado's SteamVR driver by default, but not OpenXR clients.

Tested with an Oculus Rift CV-1, and shown to now enable OpenXR clients
to make full use of the Oculus touch controllers.

The mappings for controllers other than Oculus Touch are derived from
SteamVR log output, but not actually tested due to lack of suitable hw.

Per discussion for the merge request, we enable this '-s' flag by
default in the make file for SteamVR style naming scheme.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Mario Kleiner d3893c229f aux/binding: Implement optional "steamvr_path" for SteamVR input bindings
When using the Monado SteamVR driver plugin together with an Oculus
Rift CV-1 and Oculus touch controllers, the grip / squeeze sensors
(e.g., /user/hand/left/input/squeeze/value) and the thumbsticks did not
work.

This because SteamVR expects those controls to be exposed under a
different path than what one would use for OpenXR, e.g.,
OpenXR /input/squeeze --> SteamVR /input/grip and
OpenXR /input/thumbstick --> SteamVR /input/joystick

The same is true for some other controller types.

To fix this, add some new code for input subpath substitution, to perform
this remapping, depending on binding type:

For type "trigger":  Substitute squeeze with grip
For type "joystick": Substitute thumbstick with joystick

For rare controller types where this would be the wrong thing to do,
e.g., Valve Index (for type "joystick", needs the path to remain
"thumbstick" as before), and for special cases not covered, we add
a new optional parameter 'steamvr_path' which can be used in bindings.json
to handle such mismatches in path flexibly to allow a dedicated path
name for SteamVR, overriding the regular "OpenXR style" input path or
auto-substituted path is if the parameter is omitted.

This makes the Oculus Rift CV-1 touch controllers fully work under SteamVR.

I haven't tested this with other controllers, as I only have Oculus
controllers for testing atm. But after reading about the HTC Vive controllers,
i did add a "steamvr_path" override for /input/menu -> /input/application_menu.
Cfe. https://github.com/ValveSoftware/openvr/wiki/IVRDriverInput-Overview

Also, a minor typo fix in steamvr_profiles.py as a bonus.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Mario Kleiner 50f7b5ba5f d/ohmd: Fix input from controls_mapping[0].
Use INPUT_INDICES_LAST instead of 0 for checking if control_mapping[i]
is unassigned for index i, ie. for skipping input.

As 0 is a valid mapping assignment defined in "enum input_indices", this
lead to dead input for SIMPLE_SELECT_CLICK and OCULUS_TOUCH_X_CLICK, both
assigned to 0.

This commit makes the Oculus Rift CV-1 left touch controllers X-Button
work in Monado OpenXR native and SteamVR via. Monado driver plugin.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Jakob Bornecrantz cb94bc2df0 t/common: Fix warning in lighthouse builder (NFC) 2023-01-23 13:42:20 +00:00
Christoph Haag 694baebd07 d/ohmd: Fix build
fixes 2be4cbf4c3
2023-01-22 22:04:47 +01:00
Christoph Haag 2be4cbf4c3 d/ohmd: Support generic trackers and clean up 2023-01-21 19:21:59 +00:00
Moses Turner dcbdcede5a a/util: Fix edge cases in Moses's distortion method
Before this, we read out of bounds at the bottom of the display. Unsure why nothing but Valgrind caught it.
2023-01-21 03:50:20 +00:00
Christoph Haag bb75281907 ext/tracy: Link dl 2023-01-19 20:00:30 +00:00
Jarvis Huang 503dae2883 ipc/android: Early reject if server failed to start 2023-01-19 19:50:28 +00:00
Moses Turner 8d8b0d03b0 a/util: Constify u_box_iou's Box constructor 2023-01-17 23:46:46 -06:00
Moses Turner 1ef49b92f2 d/dai: Control floodlight brightness with an env var
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-01-15 09:54:54 -05:00
Jakob Bornecrantz 4643d4f089 st/gui: Add small hand-tracking demo scene 2023-01-14 20:11:49 -05:00
Christoph Haag 01dd02dc83 d/hdk: initialized thread helper
Fixes assert in debug mode.
2023-01-08 23:42:31 +01:00
Mateo de Mayo 6bd921b390 d/wmr: Fix unused corrected IMU timestamp 2023-01-02 16:21:08 -03:00
Jarvis Huang aa6b8cd88d ipc: Change init order to avoid assertion 2023-01-01 17:00:43 +00:00
Moses Turner cd163e366b c/main: Add another string for Reverb G2 to the nvidia direct mode allowlist 2022-12-31 03:11:41 -06:00
Moses Turner 946141ce40 h/mercury: Remove kine_ccdik optimizer
Goodbye, sweet prince.
This was my first attempt at the "optimizer" piece of our optical hand tracking, and it *did work* dammit! It just wasn't anywhere near as flexible or efficient as Levenberg-Marquardt.
It's worse in every way to the `kine_lm` optimizer, and getting hard to maintain, so we're getting rid of it. Gone, but never forgotten.
2022-12-29 20:03:05 +00:00
Jakob Bornecrantz 7da72f4697 external/nanopb: Generate monado_metrics with same version as files 2022-12-22 22:06:39 +00:00
Ryan Pavlik a7b9c7b69c external/nanopb: Update nanopb from upstream nanopb-0.4.7
GitOrigin-RevId: b97aa657a706d3ba4a9a6ccca7043c9d6fe41cba
2022-12-21 21:24:14 +00:00
Jakob Bornecrantz 966878b1db t/sdl_test: Make sure to include inttypes.h for PRIu64 define 2022-12-21 00:49:06 +00:00
Ryan Pavlik 9705b1e763 external/cjson: Update cJSON from upstream v1.7.15
GitOrigin-RevId: d348621ca93571343a56862df7de4ff3bc9b5667
2022-12-20 18:51:08 +00:00
Ryan Pavlik 00b1c9531d external/stb: Update stb libraries from upstream
GitOrigin-RevId: 1ee679ca2ef753a528db5ba6801e1067b40481b8
2022-12-20 11:54:28 -06:00
Jakob Bornecrantz 814170469a t/sdl_test: Include m_mathinclude to fix compile on Windows 2022-12-20 16:02:18 +00:00
Jakob Bornecrantz 1472bdf6b6 c/client: Create a share context instead of using context directly 2022-12-19 16:38:51 +00:00
Jakob Bornecrantz 0cf18ae044 c/client: Refactor context mutex locking to helper function 2022-12-19 16:38:51 +00:00
Jakob Bornecrantz b87239e7d8 d/wmr: Increase display init sleep and also add debug variable to control it 2022-12-14 12:20:10 +00:00
Malek 5c013bcecd a/math: Add stdbool include to m_lowpass_integer.h 2022-12-12 00:45:05 -08:00