Commit graph

828 commits

Author SHA1 Message Date
Christoph Haag 4501088312 st/oxr: Don't return invalid pose after local space set up 2022-03-11 00:23:12 +01:00
zhibinw 41db1e5e12 st/oxr: Increase active_wait_frames count after previous xrBeginFrame has been called 2022-03-07 16:35:58 +00:00
Christoph Haag 7c55c51408 st/gui: Add warning when v4l driver is disabled on linux
"Failed to open camera!" is a very uninformative error
2022-03-07 13:53:59 +00:00
Christoph Haag 61024ab9a1 st/oxr: Use correct timestamp for layer space transform 2022-03-03 23:34:31 +01:00
Christoph Haag 76c18bda47 st/oxr: Fix layer poses sent to the compositor 2022-03-03 17:03:36 +01:00
Christoph Haag b863aa2629 st/oxr: don't run the timestamp conversion in a loop 2022-03-03 01:42:35 +01:00
Christoph Haag 075fde3613 st/oxr: propagate a few more space handling return codes 2022-03-03 01:42:02 +01:00
Christoph Haag 58c9679087 st/oxr: remove another unused function 2022-03-03 01:41:25 +01:00
Christoph Haag ed0bd9c244 st/oxr: rework spaces 2022-03-02 17:40:00 +00:00
Christoph Haag f633680506 st/oxr: Fix local[e]_ref_space typo 2022-03-02 17:40:00 +00:00
Jakob Bornecrantz 4ba68a7008 st/oxr: Remove direct access or mention of hmd distortion fov
The overrides didn't do anything unless Monado was compiled for
in-process, and even then the device might return a differnt fov.

The todo was for a driver and shouldn't be in the state tracker.
2022-02-19 13:45:26 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Moses Turner 0dcc73d5cf st/gui: Support RGBA, unusual strides, and add higher bitrate option 2022-02-18 20:06:20 -06:00
Ryan Pavlik 80ab7243ca st/oxr: Additional doxygen fix 2022-02-19 01:15:35 +00:00
Ryan Pavlik 9a440d9bce st/oxr: Fix doxygen warning 2022-02-18 21:22:32 +00:00
Christoph Haag c162ff655b st/oxr: add renderdoc API to xrBeginFrame/xrEndFrame
Usually renderdoc captures frames by hooking the present functions to
recognize when an application is finished rendering a frame.

OpenXR applications might not present to a window. Therefore use the
renderdoc API to capture application frames between xrBeginFrame and
and xrEndFrame.

This allows renderdoc to capture application frames without the need
to modify the application.
2022-02-18 13:44:15 +01:00
Christoph Haag 9cd3b47f94 st/oxr: Rework composition of head relation for xrLocateViews 2022-02-16 23:15:28 +00:00
Christoph Haag b81ab3f09a st/steamvr_drv: Use xrt_device_get_view_poses 2022-02-16 23:15:21 +00:00
Jakob Bornecrantz 49f95164a7 st/oxr: Use xrt_device_get_view_poses
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:16 +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
Moses Turner 1b3dadbec5 gui/remote: add pose for XR_EXT_hand_tracking test 2022-01-18 15:02:40 -06:00
Moses Turner 2188d8afc2 d/remote: expose hand active state to remote gui 2022-01-18 14:33:11 -06:00
Moses Turner 7b3378b28a aux/tracking; st/gui: save/load calibration gui state to file 2022-01-18 17:18:43 +00:00
Moses Turner dfd576e0ab st/gui: skip mode selection if there's only one mode 2022-01-18 17:18:43 +00:00
Moses Turner c8b9bff356 st/gui: fix typo - Asymetric -> Asymmetric 2022-01-18 17:18:43 +00:00
Christoph Haag d0cdb8fcd3 st/oxr: Fix subactoin typo in comment 2022-01-12 23:02:53 +01:00
Jakob Bornecrantz ec537eb3aa st/oxr: Refactor extension parsing and verify extensions 2022-01-04 22:04:12 +00:00
Jakob Bornecrantz fe9191a708 st/oxr: Sort extension list 2022-01-04 18:58:35 +00:00
Moses Turner 683dc4ea56 gui: add SLAM Stereo option to calibrate gui 2022-01-04 18:19:17 +00:00
Mateo de Mayo 3e8a070e93 u/var: Add u_var_combo 2021-12-21 11:43:17 +00:00
Mateo de Mayo fa88ce5f3f u/var: Add u16 var kind 2021-12-12 13:06:04 -03:00
Jakob Bornecrantz 3e38ada9a5 build: s/rs/realsense/g 2021-12-07 11:26:20 +00:00
Jakob Bornecrantz 12baf0ada3 st/prober: Warn when we can't get USB descriptors 2021-12-03 21:13:57 +00:00
Jakob Bornecrantz 59fccb0c38 st/prober: If we can't tell if we can open a device assume yes 2021-12-03 20:47:25 +00:00
Jarvis Huang 27550ffa39 aux/android: Looper trick for NativeActivity with app-glue 2021-12-02 09:40:36 -06:00
Mateo de Mayo 07bd614930 t/file: Extend calibration save/load interfaces with new v2 format 2021-12-02 11:27:42 -03:00
Ryan Pavlik 015abd6899 st/p: Fix prober warning. 2021-12-01 08:31:28 -06:00
Mateo de Mayo e245f4e5a9 u/sink: Allow u_sink_queue to queue more than one frame
Passing max_size=1 gives a similar behaviour as before, although instead
of discarding the last enqueued frame, it just ignores the new frame.
2021-12-01 13:45:18 +00:00
Christoph Haag 22d9d97e61 st/oxr: fix finding profiles for device
fixes 6627049af3
2021-11-24 01:36:25 +01:00
Christoph Haag 821c7f0f7a st/oxr: Don't create interaction profile in xrGetInputSourceLocalizedName
oxr_instance::oxr_interaction_profile is used to bind interaction profiles
available on the assigned device to interaction profiles suggested by the
application.

Creating an interaction profile that has not been suggested might interfere
with the binding code.

xrGetInputSourceLocalizedName can only be called after the action sets are
attached, meaning all the interaction profiles must have already been
suggested.
2021-11-24 01:34:13 +01:00
Christoph Haag 1a9e0750c7 st/oxr: document oxr_instance::oxr_interaction_profile 2021-11-24 01:34:13 +01:00
Christoph Haag a1c00e14fd st/oxr: Implement a basic version of XR_FB_display_refresh_rate 2021-11-22 20:44:18 +00:00
Christoph Haag eae7231f83 st/oxr: Add XR_FB_display_refresh_rate ext to script 2021-11-22 20:44:18 +00:00
Jakob Bornecrantz 3f98ea5595 xrt: Tidy s/ll/log_level/g
Also make sure all variable logging uses the right type for logging variables.
2021-11-22 14:29:10 -06:00
Moses Turner cef025a546 Revert "st/oxr: fix building on linux with OPENGL_GLX OFF"
This reverts commit d20f8f4363
2021-11-20 00:11:06 +00:00
Jakob Bornecrantz be5b9c9d88 st/gui: Prober or tracking is no longer needed for debug sink 2021-11-19 14:38:31 +00:00
Jakob Bornecrantz 6627049af3 st/oxr: Don't hardcode profiles for devices 2021-11-19 14:38:31 +00:00
Jakob Bornecrantz 974f42f068 st/oxr: Debug print devices 2021-11-19 14:26:44 +00:00
Jan Schmidt 760e8dd3ad meson: Add GStreamer recording support 2021-11-19 04:05:40 +11:00
Ryan Pavlik b5bcea758d xrt: Rename a prober-related define that wasn't namespaced. 2021-11-13 12:29:58 +00:00
Antonio Ospite d20f8f4363 st/oxr: fix building on linux with OPENGL_GLX OFF
When building on linux and OPENGL_GLX OFF compilation fails with the
following error:

-----------------------------------------------------------------------
../../state_trackers/oxr/libst_oxr.a(oxr_session_gfx_gl.c.o): In function `oxr_session_populate_gl_xlib':
oxr_session_gfx_gl.c:(.text+0x5c): undefined reference to `xrt_gfx_provider_create_gl_xlib'
collect2: error: ld returned 1 exit status
src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/build.make:126: recipe for target 'src/xrt/targets/openxr/libopenxr_monado.so' failed
make[2]: *** [src/xrt/targets/openxr/libopenxr_monado.so] Error 1
CMakeFiles/Makefile2:2490: recipe for target 'src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/all' failed
make[1]: *** [src/xrt/targets/openxr/CMakeFiles/openxr_monado.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
-----------------------------------------------------------------------

Apparently the gl_xlib backend really depends on GLX specifically, so
fix the issue by reflecting that in the conditionally compiled blocks.
2021-11-13 12:16:29 +00:00
Ryan Pavlik 4957f6577f st/p: Migrate num_ to _count 2021-11-13 12:04:38 +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
Mateo de Mayo 87a1198b0a misc: Address compilation warnings and fix u_json_get_bool 2021-11-12 15:33:06 -03: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
Ryan Pavlik 19947a2d27 cmake: Refactor how we build imgui 2021-11-12 09:38:50 -06:00
Ryan Pavlik b180b244e3 st/oxr: Populate oxr_system's blend modes list from the system compositor, not the device. 2021-11-12 03:05:10 +00:00
Jakob Bornecrantz 5554b0fa00 st/prober: Fix warning and tidy code 2021-11-10 11:32:54 +00:00
Nima01 2a1e6debfb st/prober: Support for querying of 'Product name' from Bluetooth devices. 2021-11-09 01:10:20 +00:00
Jakob Bornecrantz 551c1f19a9 st/prober: Depend on VF driver since we refer to it directly 2021-11-08 13:07:22 +00:00
Mateo de Mayo f407536279 st/prober: Hook the realsense SLAM source into the prober 2021-10-28 11:40:49 +00:00
Mateo de Mayo 0202cb9223 st/prober: Improve usage of SLAM tracking frameservers
Use a similar "hardcoded" idea as in p_factory_ensure_frameserver.
This fix usage of SLAM sources in other contexts like calibration, at the
cost of requiring a device to call create_tracked_slam at least once.
(again, similar to how psmv/psvr/hand tracking work already)
2021-10-28 11:40:49 +00:00
Christoph Haag cbc018239b st/gui: Fix editing tracking override when tracker is not connected
Fixes an assertion.
2021-10-28 11:21:58 +00:00
Christoph Haag 8da1b10010 st/gui: More consistent variable names in tracking overrides 2021-10-28 11:21:58 +00:00
Christoph Haag 9f7ef73429 st/gui: better wording for tracking override delete button 2021-10-28 11:21:58 +00:00
Ryan Pavlik 409541427d st/oxr: MSVC-specialized version of macro in oxr_xrResultToString 2021-10-19 16:49:23 -05:00
Moses Turner d440a23888 d/dai: rename things to either 'monocular' or 'grayscale' 2021-10-13 16:26:26 -05:00
Jakob Bornecrantz 0d07971ebb st/gui: Make it possible to use depthAI as a stereo and single source 2021-10-13 15:47:48 -05:00
Jakob Bornecrantz 21f6842e49 st/gui: Add some debugging to the paranoia 2021-10-12 20:44:32 +01:00
Moses Turner 8fdeaccbc7 st/oxr: Switch to new get_hand_tracking signature 2021-10-02 23:06:43 +01:00
Moses Turner e134b24f8f u/var: Add u_var_draggable_f32 2021-10-02 23:05:35 +01:00
Jakob Bornecrantz 9a4cc80e87 st/prober: Tidy and re-order functions 2021-09-29 21:38:33 +00:00
Jakob Bornecrantz 874d48a810 st/prober: Add some tracing functions 2021-09-29 21:38:33 +00:00
Mateo de Mayo e561d312f6 st/prober: Handle SLAM tracker creation failure for the Euroc player
This also adds a do-nothing section to `p_factory_create_tracked_slam`
that could be replicated by new SLAM frame servers.
2021-09-28 16:06:58 -03:00
Jakob Bornecrantz de283a8b0c t/calibration: Add support for findChessboardCornersSB 2021-09-20 15:54:00 +00:00
Christoph Haag d54c489738 st/oxr: Enumerate outputs too in xrEnumerateBoundSourcesForAction
Fixes #118
2021-09-20 00:28:46 +02:00
Jakob Bornecrantz 7e8428a4d2 st/gui: Remove U_VAR_SINK support 2021-09-17 15:27:23 +01:00
Jakob Bornecrantz b0b4034a93 st/gui: Add support for u_sink_debug 2021-09-17 15:27:23 +01:00
Jakob Bornecrantz bef417b5a8 st/gui: Handle setting recording info from the first frame 2021-09-17 15:27:23 +01:00
Jakob Bornecrantz 2b72672cc2 st/gui: Expose bitrate as a combobox in recording window 2021-09-17 15:27:15 +01:00
Jakob Bornecrantz 7a6412672d st/gui: Refactor out recording code into own window 2021-09-17 13:39:50 +01:00
Mateo de Mayo 78e8d3177c st/prober: Use euroc stream for SLAM tracking 2021-09-15 19:03:55 +00:00
Mateo de Mayo 549c59a493 t/slam: Add SLAM tracking module 2021-09-15 19:03:55 +00:00
Christoph Haag fb6cf9b4cc st/oxr: Only advertise hand tracking funcs if compiled with ext 2021-09-13 21:28:01 +01:00
Christoph Haag 2b7e8d8dce st/oxr: Add ifdef for XR_EXT_hand_tracking 2021-09-13 21:27:58 +01:00
Christoph Haag d114b8bb34 st/oxr: Move XR_EXT_thermal_query #endif to the correct place 2021-09-13 21:27:54 +01:00
Mateo de Mayo d9482d0b76 u/var: Add f64 kind 2021-09-13 18:59:03 +01:00
Mateo de Mayo 91db53572b st/prober: Make euroc start by hooking it into the prober 2021-08-27 18:39:37 +01:00
Mateo de Mayo de3bfc193d u/var: Add button and u64 var kinds
Also: fix on_ff_vec3_var
2021-08-27 13:02:18 +00:00
Mateo de Mayo 167fe78af0 st/gui: Handle NULL pdev in video listing scene. 2021-08-27 13:02:18 +00:00
Christoph Haag 7c285be9e8 st/oxr: Support XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR
Trivial, because XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND and
XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR enum values are aliased.
2021-08-27 02:38:05 +02:00
Christoph Haag 5e0891404e scripts: Add XR_KHR_swapchain_usage_input_attachment_bit extension 2021-08-27 02:21:58 +02:00
Jakob Bornecrantz 8225539178 st/gui: Make sure to unreference any frames pending for upload 2021-08-20 17:35:32 +01:00
Jakob Bornecrantz 36a8f949d5 st/gui: Make sure to add ogl texture sink to context 2021-08-20 17:18:42 +01:00
Jakob Bornecrantz ea2aa56af8 st/oxr: Add debug variable for adding extra sleep in wait frame 2021-08-17 12:04:49 +01:00
Christoph Haag 162915f022 p/prober: disable all drivers when qwerty is enabled
qwerty is auto probed, making HMDs that are not auto probed always take precedence.
When setting QWERTY_ENABLE=1 the intent is usually to exclusively use qwerty.
Therefore we default to disabling all other drivers when this variable is set.

To make the old behavior of adding qwerty devices with lower priority than actual
devices, the variable QWERTY_COMBINE=1 is introduced.
2021-07-16 15:15:28 +00:00
Christoph Haag bc8ac9ca3c st/oxr: Use OXR_MAX_BINDINGS_PER_ACTION instead of hardcoded 32
The hardcoded value 32 was actually wrong and caused a warning

../src/xrt/state_trackers/oxr/oxr_input.c:668:9: warning: 'oxr_binding_find_bindings_from_key' accessing 256 bytes in a region of size 128 [-Wstringop-overflow=]
  668 |         oxr_binding_find_bindings_from_key(log, profile, act->act_key, binding_points, &num);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-07-15 01:08:20 +02:00
Christoph Haag e2e13b7ac3 st/gui: Don't access first vec3 member as float array
It produces a warning

../src/xrt/state_trackers/gui/gui_scene_debug.c:141:9: warning: ‘igInputFloat3’ accessing 12 bytes in a region of size 4 [-Wstringop-overflow=]
  141 |         igInputFloat3(name, (float *) &value.x, "%+f", ImGuiInputTextFlags_ReadOnly);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-07-15 00:59:09 +02:00
Jakob Bornecrantz f725924723 st/gui: Make it possible to select the DepthAI camera in Video select UI 2021-07-13 15:01:00 +00:00