Commit graph

280 commits

Author SHA1 Message Date
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
Moshi Turner 10fe48e81b cmake: Use fancy colors on AppleClang too 2023-05-31 20:24:13 -07:00
Ryan Pavlik b9f05182d0 cmake: Adjust XRT_OPENXR_INSTALL_ACTIVE_RUNTIME to default to OFF. 2023-05-26 19:39:57 +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
Ryan Pavlik f0cc05d09b cmake: Turn off two drivers that are currently incompatible with MSVC 2023-05-16 22:04:53 +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 ad1155f152 cmake: Use correct message type for OpenVR messages 2023-05-01 20:03:53 +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
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
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 f61310daf4 cmake: More uniform printing for modules [NFC] 2023-03-08 01:03:21 +00: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
Jakob Bornecrantz 04bc172e50 cmake: Make XRT_FEATURE_OPENXR_DEBUG_UTILS more apparent [NFC] 2023-03-08 01:03:21 +00: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
Moshi Turner 26d2394163 cmake: Sort some stuff in root file 2023-03-03 15:25:12 -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
Jakob Bornecrantz 4b6491aa16 cmake: Introduce a new module category 2023-03-03 20:56:59 +00:00
Ryan Pavlik cb65c4f236 build: Add option to use SSE2 on 32-bit x86, and enable by default.
Fixes/works around a float comparison test failure in input transform.
2023-03-02 17:25:02 -06: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
Gabriele Boccone d1b431bec6 cmake: D3D12 status on console output. 2023-01-10 14:38:19 +00:00
Jakob Bornecrantz 8338599571 cmake: Set C11 standard 2022-12-21 21:24:14 +00:00
Jakob Bornecrantz b7748691b7 ext/tracy: Do not define ENABLE_TRACY globally 2022-12-08 00:24:42 +00:00
Jakob Bornecrantz 7bc145d184 cmake: Add XRT_HAVE_TRACY variable 2022-11-21 16:46:12 +00:00
Mateo de Mayo 7f2b11ee4f build: Enable colored compiler errors by default
Noticeable when using Ninja as generator
2022-10-18 10:16:05 -03:00
Julian Petrov d0f713c4c4 ipc: Add Windows support 2022-10-13 17:07:27 +00:00
Robbie Bridgewater cc2e7b6da3 ipc: Allow IPC path to be set dynamically
Uses cache for XRT_IPC_MSG_SOCK_FILE
2022-10-09 15:21:11 +01:00
Jan Schmidt 9fbe81e494 d/rift_s: Port OpenHMD Oculus Rift S driver
Port across the Oculus Rift S driver from OpenHMD as a native
Monado driver.

This is mostly the same as the OpenHMD 3DOF driver, with
slightly better HMD distortion correction, various small
fixes, some capsense touch detection support.

Controller poses are rotated 40° to match grip pose.
2022-09-25 02:17:44 +10:00
Moses Turner 074e18cac9 d/twrap: Add tracking wrapper driver 2022-09-21 07:57:03 -05:00
Moses Turner 0b4f378d11 cmake: Always build North Star driver.
The North Star base hardware has no USB component and the display is always on; currently we enable it at runtime by setting an env var
2022-09-21 01:52:15 +01:00
Jakob Bornecrantz 95efd0267d cmake: Sort print list (NFC) 2022-09-12 15:10:23 +01:00
Moses Turner 9d6ca80af3 xrt: Add SimulaVR driver 2022-09-12 12:20:51 +00:00
Simon Zeni 778900cd3c c/main: add hmd peek window 2022-08-12 14:19:13 -04:00
Simon Zeni 90f708d91c xrt: Enable XR_KHR_composition_layer_cube
Co-authored-by: Bjorn Swenson <bjorn@collabora.com>
2022-08-11 13:42:09 +01:00
Ryan Pavlik 2dc5083543 build: D3D12 build option 2022-07-26 14:45:29 +00:00
danwillm fd61dd08b2 drivers: add all of opengloves driver 2022-07-25 23:57:45 +01:00
Ryan Pavlik 13b154580b ci, cmake: add optional dep for bluetooth 2022-07-25 16:20:07 +01:00
Christoph Haag a530b6d375 build: Only use system cJSON if it is new enough
Fixes compilation errors on clang with old system cJSON
2022-07-20 11:32:09 +02:00
Moses Turner fa2554f289 st/oxr: Don't use the debug gui by default in out-of-process 2022-07-12 16:18:17 +00:00
Jakob Bornecrantz 7e45fc7dd9 t/common: Integrate null compositor 2022-05-28 17:30:19 +00:00
Jakob Bornecrantz c976c54008 c/null: Add null compositor
Based on sample compositor code.

Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2022-05-28 17:30:19 +00:00
Jakob Bornecrantz 57574a1e02 cmake: Tidy printout formatting (NFC) 2022-05-22 23:02:34 +01:00
Ryan Pavlik bd90347fce cmake: Clean up build 2022-05-20 22:37:15 +01:00
Ryan Pavlik ccb58dbe8a build: Add option to support D3D11 2022-05-20 22:37:15 +01:00
Ryan Pavlik bb7ba409b8 build,scripts: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 56a1c25378 d/simulated: Rename the simulated device driver. 2022-05-17 17:39:52 -05:00
Ryan Pavlik 1e307e8e9f a/os: Add a function to set thread name. 2022-05-17 12:39:44 -05:00
Ryan Pavlik 2f457d0665 build: Search for DXGI and WinRT (WindowsApp) libraries 2022-05-16 11:00:27 -05:00
Ryan Pavlik 46a3c7b039 build: Look for WIL (Windows Implementation Library)
Also define XRT_HAVE_WIL if we have it.
2022-05-16 11:00:27 -05:00
Jakob Bornecrantz 17878c5ff7 cmake: Sort config output 2022-05-10 14:04:58 +01:00
Ryan Pavlik bcdc2416a7 cmake: Adjust deps of XRT_INSTALL_*_SYSTEMD_*
Value may be ignored in this repo without the service target,
but it's harmless to have it on, and more flexible to build on.
2022-05-06 14:30:49 -05:00
Ryan Pavlik add6ed34b6 fixup slam 2022-05-04 11:37:49 -05:00
Ryan Pavlik 3287c984aa cmake: Reorganize options, renaming some.
Rename XRT_HAVE_SLAM to XRT_FEATURE_SLAM,
moving it from xrt_config_have.h to xrt_config_build.h
accordingly.
2022-05-04 11:24:02 -05:00
Ryan Pavlik 097eeb4f29 cmake: Switch to a new way of setting options more in line with expectations.
If you explicitly request an option, and it's not available due to dependencies,
we now error out instead of silently changing the value.
2022-05-04 11:24:02 -05:00
Ryan Pavlik 1abf73dfbe cmake: Remove debug print, allow renderdoc on Windows. 2022-05-03 22:45:10 +01:00
Ryan Pavlik b487b4d753 cmake: Skip find modules on Windows that don't make sense.
CMake is really slow on Windows...
2022-04-21 17:19:22 -05:00
Ryan Pavlik eec020cc96 cmake: Adjust default manifest options on Windows 2022-04-21 17:17:16 -05:00
Ryan Pavlik aa4f43b049 cmake: Improve manifest installation, allowing relative paths to be generated. 2022-04-20 11:47:04 -05:00
Jakob Bornecrantz b4f2bc88c8 cmake: Introduce XRT_HAVE_HIDAPI to make HIDAPI controllable 2022-03-28 22:35:01 +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
Ryan Pavlik 09603144f9 cmake: Don't build the WMR driver on Windows.
Ironically, it needs a Linux-only byte order header in its current
incarnation.
2022-01-21 20:26:48 +00:00
Mateo de Mayo 6070da19be cmake: Fix realsense build macro not being exported 2021-12-08 12:29:59 -03:00
Jakob Bornecrantz 3e38ada9a5 build: s/rs/realsense/g 2021-12-07 11:26:20 +00:00
Jakob Bornecrantz 849f401a6a cmake: Add XRT_HAVE_REALSENSE to control RealSense usage 2021-12-07 11:26:20 +00:00
Jakob Bornecrantz 986cde6750 cmake: Build the IPC irrespectively of the service or not 2021-11-24 21:30:01 +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
Ryan Pavlik 3bd0a07aa2 cmake: Split out finding GLX from the rest of OpenGL on Linux.
Fixes #132.
2021-11-04 15:36:58 +00:00
Ryan Pavlik ebde5344a1 cmake: Make compilation of the sample driver optional. 2021-11-03 17:04:05 -05:00
Ryan Pavlik babda5311a cmake: Fix outdated comment 2021-11-03 17:00:28 -05:00
Ryan Pavlik 86a708cee5 cmake: Allow overriding package version 2021-10-28 11:35:47 +00:00
Ryan Pavlik 72995a8298 build: Fix config message spacing 2021-10-19 15:27:01 -05:00
Mateo de Mayo ab2da01631 build: Add Basalt as an external SLAM system 2021-10-16 17:02:27 -03:00
Mateo de Mayo 7f247604e3 build: Use pkg-config for finding SLAM systems in CMake and other minor improvements 2021-10-07 14:33:10 -03:00
Moses Turner 1ee4e0c304 cmake: always export compile commands 2021-10-01 10:25:13 +00:00
Jakob Bornecrantz 5e66533751 cmake: Move XRT_HAVE_PERCETTO to before it's first use 2021-09-29 21:38:33 +00:00
Ryan Pavlik 995866a576 cmake: Improve use of percetto 2021-09-27 09:26:15 -05:00
Ryan Pavlik 7dc61f8d51 cmake: Move where we search for pkgconfig 2021-09-27 09:26:14 -05:00
Ryan Pavlik 524d6f73c3 cmake: Explicitly specify whether we expect a module or a config. 2021-09-27 09:25:15 -05:00
Ryan Pavlik 0fec29687a cmake: Switch to a new FindPercetto module. 2021-09-27 09:23:09 -05:00
Jakob Bornecrantz 4c58d377c1 cmake: Use . instead of comma for version 2021-09-17 11:54:57 +00:00
Christoph Haag 616c04458c build/cmake: Don't build slam if OpenCV is disabled
Fixes build with -DXRT_HAVE_OPENCV=OFF
2021-09-16 23:33:05 +02:00
Mateo de Mayo 8e8a9c14a9 external: Add slam_tracker.hpp and SLAM build flow 2021-09-15 19:03:55 +00:00
Simon Zeni 47be806428 c/main: Implement WINDOW_DIRECT_WAYLAND 2021-09-15 18:44:18 +00:00
Moses Turner 4b5f4b9721 cmake: Add ONNX Runtime as a dependency for the handtracking driver
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>

cmake-rebase
2021-09-03 21:06:18 +00:00
Mateo de Mayo 97c59bd59f d/euroc: Add EuRoC dataset reader driver.
A squash of the following commits.

d/euroc: Add Euroc driver initial boilerplate

d/euroc: Implement xrt_frame_node interface

d/euroc: Implement mainloop thread start flow

d/euroc: Parse samples from data.csv files

d/euroc: Determine dataset information at start

Also use that information to provide a xrt_fs mode and to know if
right camera images are available to use.

d/euroc: Produce frames for left and right sinks

d/euroc: Implement xrt_imu_sink

d/euroc: Implement playback properties

d/euroc: Implement pausing with UI state machine

d/euroc: Show IMU and progress data in UI

d/euroc: Make sure to give in nullptr or valid pointers to wrapL8

d/euroc: Unreference frames when done with them

d/euroc: Fix leaks with debug sinks, and work around free issue

d/euroc: Refactor playback to produce samples with current timestamps

d/euroc: Fix double free by separating debug sinks from downstream sinks
2021-08-27 18:38:40 +01:00
Moses Turner 8c9483d193 cmake: Add address sanitizers 2021-08-16 21:18:52 +01:00
Moses Turner 7461c57043 cmake: make ulv2 build a little better 2021-06-23 23:40:43 +01:00
Moses Turner 960e68a976 cmake: option for forcing coloured compiler output 2021-06-23 23:39:16 +01:00
Moses Turner 37cbbb6660 d/dai: Add simple DepthAI driver
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2021-06-10 14:32:07 -05:00
Jakob Bornecrantz b4dac8d6fc cmake: Tidy whitespace and remove last mention of XRT_HAVE_VF (NFC) 2021-05-26 14:08:57 +01:00
Jakob Bornecrantz 64e1dd3127 cmake: Print out if we have GStreamer (NFC) 2021-05-26 13:42:26 +01:00
Jakob Bornecrantz b3455555c2 u/trace_marker: Use Percetto/Perfetto for tracing 2021-05-05 17:00:35 +01:00
Ryan Pavlik e82fafb186 cmake: Allow C++17 mode on all platforms, all modules.
Remove per-module C++17 settings.
2021-04-30 15:37:04 -05:00
Ryan Pavlik 3e127a1fa3 build: Move finding Python earlier, so it builds in Android Studio on Linux. 2021-04-27 16:43:38 -05:00
nima01 027ce21bd5 d/wmr: Initial 3DoF WinMR driver
Only supports HP Reverb G1 and G2 for now.

Squash of the following commits:

Initial boilerplate code for HP Reverb G1 driver implementation
Detect and open MS HoloLens Sensors interface
Power up HMD display when headset is detected, and som general code cleanup
Add Reverb G2 PID
reverb_g1: Fix defines
reverb_g1: Run clang format
wmr: Rename Reverb G1 driver to WMR driver
d/wmr: Code style
d/wmr: Flesh out driver a bit more
d/wmr: Code style
Add basic 3dof rotational tracking
d/wmr: Code style
d/wmr: More tidy
xrt: Remove XRT_DEVICE_REVERB_G1
d/wmr: Even more tidy
d/wmr: Changes for Reverb G2
d/wmr: Fixes since last commit
wmr: Fix the meson build and auto-enable the driver
d/wmr: Sleep for compositor to get modes
d/wmr: Use os_hid for control device
d/wmr: Remove hidapi as a dependancy
d/wmr: Move sensor reading to own thread and fix locking
d/wmr: Read from control device and handle more unknown messages
d/wmr: Decode IPD value from control device
d/wmr: Remove all left over dummy driver fields

Co-author: nima01 <nima_zero_one@protonmail.com>
Co-author: Jakob Bornecrantz <jakob@collabora.com>
Co-author: Jan Schmidt <jan@centricular.com>
2021-04-19 13:33:01 +00:00
Christoph Haag 4ea68b89a4 xrt: Add u_process, backed by libbsd's pidfile
Delete stale ipc files in ipc server when not already running.

If built without libbsd, fall back to previous behavior of complaining about existing ipc files and exit.
2021-04-15 21:42:06 +00:00
Moses Turner 55b86fe815 d/ulv2: Create the driver.
Co-authored-by: Moses Turner <mosesturner@protonmail.com>
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2021-04-01 02:10:33 +02:00