Commit graph

70 commits

Author SHA1 Message Date
Christoph Haag 174c6f8bd5 meson: Fix build with new opencv and -Dtracking=enabled 2022-03-07 13:59:13 +00:00
Colin Kinloch 0a783ca208 systemd: Use pkgconfig variable systemduserunitdir as unit install directory 2022-01-18 21:11:44 +00:00
Christoph Haag ceefaaf55f meson: Include eigen as system library on recent meson
Avoids warnings in eigen headers:

In file included from /usr/include/eigen3/Eigen/Core:341,
                 from ../src/xrt/auxiliary/tracking/t_lowpass_vector.hpp:18,
                 from ../src/xrt/auxiliary/tracking/t_imu_fusion.hpp:17,
                 from ../src/xrt/auxiliary/tracking/t_imu.cpp:12:
/usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h: In function ‘static void Eigen::internal::trmv_selector<Mode, 1>::run(const Lhs&, const Rhs&, Dest&, const typename Dest::Scalar&) [with Lhs = Eigen::Transpose<const Eigen::Block<const Eigen::Block<Eigen::Matrix<double, 3, 2, 0, 3, 2>, -1, -1, false>, -1, -1, false> >; Rhs = Eigen::Transpose<const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1, 1, 1, 3> >, const Eigen::Transpose<const Eigen::Block<const Eigen::Block<const Eigen::Block<Eigen::Matrix<double, 3, 2, 0, 3, 2>, -1, -1, false>, -1, 1, true>, -1, 1, false> > > >; Dest = Eigen::Transpose<Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 1, -1, -1>, 1, -1, true>, 1, -1, false> >; int Mode = 6]’:
/usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h:332:12: warning: ‘result’ may be used uninitialized [-Wmaybe-uninitialized]
  327 |     internal::triangular_matrix_vector_product
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  328 |       <Index,Mode,
      |       ~~~~~~~~~~~~
  329 |        LhsScalar, LhsBlasTraits::NeedToConjugate,
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  330 |        RhsScalar, RhsBlasTraits::NeedToConjugate,
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  331 |        RowMajor>
      |        ~~~~~~~~~
  332 |       ::run(actualLhs.rows(),actualLhs.cols(),
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333 |             actualLhs.data(),actualLhs.outerStride(),
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  334 |             actualRhsPtr,1,
      |             ~~~~~~~~~~~~~~~
  335 |             dest.data(),dest.innerStride(),
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  336 |             actualAlpha);
      |             ~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h:105:24: note: by argument 5 of type ‘const double*’ to ‘static void Eigen::internal::triangular_matrix_vector_product<Index, Mode, LhsScalar, ConjLhs, RhsScalar, ConjRhs, 1, Version>::run(Index, Index, const LhsScalar*, Index, const RhsScalar*, Index, Eigen::internal::triangular_matrix_vector_product<Index, Mode, LhsScalar, ConjLhs, RhsScalar, ConjRhs, 1, Version>::ResScalar*, Index, const ResScalar&) [with Index = long int; int Mode = 6; LhsScalar = double; bool ConjLhs = false; RhsScalar = double; bool ConjRhs = false; int Version = 0]’ declared here
  105 | EIGEN_DONT_INLINE void triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,RowMajor,Version>
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-14 15:02:11 +01:00
Jakob Bornecrantz 3e38ada9a5 build: s/rs/realsense/g 2021-12-07 11:26:20 +00:00
Jan Schmidt 11d18bcc8d meson: Fix build when /usr/local/include doesn't exist.
include_directories() will fail the build if the directory doesn't
exist. Only require /usr/local/include if the leap library is found.
2021-11-28 02:57:35 +11:00
Jan Schmidt 760e8dd3ad meson: Add GStreamer recording support 2021-11-19 04:05:40 +11:00
Mateo de Mayo ab2da01631 build: Add Basalt as an external SLAM system 2021-10-16 17:02:27 -03:00
Moses Turner 1c99e8edb5 meson: add option for tracing; align messages 2021-09-28 12:41:01 +00:00
Mateo de Mayo d61a695f13 meson: Allow percetto to be used with meson
You may need to specify --libdir=$installdir/lib when installing percetto,
otherwise it gets installed on $installdir/lib/x86_64-linux-gnu by default and
meson might not look for the appropriate pkgconfig in there.
2021-09-28 12:41:01 +00:00
Mateo de Mayo 8e8a9c14a9 external: Add slam_tracker.hpp and SLAM build flow 2021-09-15 19:03:55 +00:00
Mateo de Mayo 73799268e6 meson: Look up for default opencv first
This makes the OpenCV dependency lookup behave in a more
similar way to what CMake is already doing.
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 dd5cbee0bc meson: Add ONNX Runtime as a dependency for the handtracking driver 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 37cbbb6660 d/dai: Add simple DepthAI driver
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2021-06-10 14:32:07 -05:00
Moses Turner e8b4059de9 meson: use c++17 2021-05-10 10:09:59 -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
Mateo de Mayo 0340ae3cc8 d/qwerty: Add Qwerty driver initial boilerplate
The Qwerty driver will emulate an HMD and controllers through the use
of mouse and keyboard, and in particular, using the SDL key events
generated from the debug GUI.
2021-03-29 15:41:25 -03:00
Christoph Haag 94d546322e build/meson: Print more build options on meson run 2021-03-10 01:58:51 +01:00
Christoph Haag 851a600a6a build/meson: Add systemd feature option for monado-service 2021-03-10 01:57:55 +01:00
Christoph Haag dbf804cfcb build/meson: Make it possible to disable daydream&arduino 2021-03-02 17:50:19 +00:00
Jakob Bornecrantz 8c6075e3b6 monado: Update version 2021-01-28 16:02:50 +00:00
Christoph Haag 9481013081 comp: add VkDisplayKHR window backend
Must be activated/selected with an env var for now: XRT_COMPOSITOR_FORCE_VK_DISPLAY=2
2021-01-19 17:00:46 +00:00
Christoph Haag 7a030e36ae build/meson: Build and run tests
closes #97
2021-01-07 22:15:08 +01:00
Lubosz Sarnecki 8c4b6cef39 meson: Fix building survive on auto.
The code didn't do anything.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki c1cd2c691b meson: Silence verbose OpenCV C11 extension warnings on clang. 2020-12-16 15:10:10 +01:00
Christoph Haag f0d21c1dcc d/vf: Add video file playback driver 2020-12-07 12:30:26 +00:00
Christoph Haag 717d3a27ef d/ht: Add hand tracking driver code skeleton 2020-12-07 12:30:26 +00:00
Christoph Haag d3ccbce76c build: meson: Add remote driver build 2020-11-20 16:14:02 +01:00
Christoph Haag cb62514fd0 steamvr: Implement basic SteamVR driver
v3:
  targets: Add Monado-SteamVR driver target
  st/ovrd: Add OpenVR driver header
  build: Factor out sdl hack into lib_sdl2_hack and update steamvr build
  build: Revert lib_sdl2_refactor
  steamvr: Emulate Index Controller by default
  steamvr: Use oxr_handle_destroy instead of exposing oxr_instance_destroy
  steamvr: don't use oxr internals
  steamvr: communicate 3dof tracking to steamvr
  steamvr: use util functions for device assignment and tracking origin setup
  steamvr: Install plugin to <prefix>/share/steamvr-monado
  steamvr: Use thread for updating poses every 1ms

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

Main-author: Christoph Haag <christoph.haag@collabora.com>
Co-author: Jakob Bornecrantz <jakob@collabora.com>
2020-11-09 19:21:27 +00:00
Jakob Bornecrantz 151a03fb48 monado: Update version 2020-11-04 13:40:50 +00:00
Jakob Bornecrantz 3dfa7167b2 monado: Update version 2020-11-02 20:24:48 +00:00
Christoph Haag dc29c3f97e build/meson: Build daydream and arduino driver when dbus is enabled 2020-10-05 16:05:02 +00:00
Christoph Haag 5bea856f20 build/meson: Add XRT_HAVE_DBUS when dbus is found 2020-10-05 16:05:02 +00:00
Christoph Haag 5ca90343ab build/meson: Fix formatting for survive driver enablement 2020-10-05 16:05:02 +00:00
Christoph Haag cde94cc8a2 build: Remove libv4l2 dependency from meson
We use the linux/v4l2-common.h header to access v4l devices, not libv4l from v4l-utils.
2020-08-28 12:10:53 +00:00
Ryan Pavlik 6f56d91c05 xrt: Add separate build config for OpenGL ES 2020-07-17 15:17:42 -05:00
Ryan Pavlik e2cb7578bc build: Increase strictness of warnings. 2020-07-17 13:53:39 -05:00
Jakob Bornecrantz d1f30e4a5a monado: Update version 2020-07-10 16:43:47 +01:00
Jakob Bornecrantz 8e6592338f monado: Update version 2020-05-29 11:00:22 +01:00
Jakob Bornecrantz d645b58186 meson: Tidy NorthStar driver selection code (NFC) 2020-05-11 14:35:11 +01:00
Christoph Haag 5908c33439 d/survive: Add survive driver 2020-05-09 13:12:06 +00:00
Jakob Bornecrantz 7c8a8a3f87 ipc: Add code to enable a service process
This enables out of process compositing.
2020-04-29 14:58:24 +01:00
Lubosz Sarnecki a765b64ae0 meson: Don't ignore pedantic warnings on C++. 2020-04-07 15:00:17 +02:00
Lubosz Sarnecki 79b739d51a meson: Raise default warning level.
Increases the default warning level to 3, which includes pedantic
errors. Disable them on C++, which is the way it was done before.

To resolve most pedantic warnings on C++ either the compiler standard
would need to be increased to c++2a or the remaining copositor backends
would require porting to plain C. One of each or both should happen in
the future.
2020-03-31 18:26:56 +02:00
Lubosz Sarnecki a81b7e1751 meson: Don't specify warning level manually.
Since we already specify a `warning_level` in the project settings, it
is redundant to manually specify it as compiler parameters.

This patch resolves the following meson warning:
```
meson.build:25: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
meson.build:25: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
```
2020-03-31 18:26:56 +02:00
Lubosz Sarnecki 4d0c49096d comp/window_direct_mode: Use XCB/Xlib interop.
Since there currently is no Vulkan extension that takes XCB handles to
aqcuire the display Xlib interop needs to be used.

Before this patch Monado was opening connections for both APIs, which
introduced overhead.

Even though all XCB handles can be casted to Xlib ones, this cannot be
done with the main xcb_connection_t / Display. In it's design the
interop between both APIs can create a xcb_connection_t from a XCB
handle, but not the other way round. So in an interop case the Xlib
connection is the main one, since it's on a higher level.
More information on this can be found here:
https://xcb.freedesktop.org/MixingCalls/

Unfortunately the clean solution for this would be to specify a Vulkan
extension that takes XCB handles. This would make sense since Vulkan
is aware of XCB in other parts of the API as well. In Mesa the Xlib
structs will be ultimately casted to XCB.
2020-03-31 17:47:17 +02:00
Jakob Bornecrantz 0619190d2b build: Refactor how config defines are handled
With loads of changes from Ryan.
2020-03-03 10:33:14 +00:00