Commit graph

3903 commits

Author SHA1 Message Date
Moses Turner 683dc4ea56 gui: add SLAM Stereo option to calibrate gui 2022-01-04 18:19:17 +00:00
Moses Turner 17034f0283 aux/tracking: assert on fisheye mat size for fisheye path 2022-01-04 18:19:17 +00:00
Jakob Bornecrantz 5eb739bb1a ext/openxr: Update headers to 1.0.20 2022-01-04 18:12:55 +00:00
Simon Zeni 8b1d432b79 d/ht_ctrl_emu: fix crash and truncation warning 2021-12-24 15:19:51 -05:00
Mateo de Mayo 7e0d93e3fb tests: Add tests for quatexpmap interface functions and minor changes in their docs 2021-12-22 12:16:27 -03:00
Mateo de Mayo 70576c2f02 t/slam: Implement basic prediction from last tracked poses 2021-12-21 11:43:17 +00:00
Mateo de Mayo 090e465dda external: Add semver to slam_tracker (1.0.0) and pose timestamps 2021-12-21 11:43:17 +00:00
Mateo de Mayo 88a3848b5a d/wmr: Map wmr_source data to monotonic clock 2021-12-21 11:43:17 +00:00
Mateo de Mayo 74e149159b t/slam: Add SLAM_SUBMIT_FROM_START envvar
Useful for setups that need some tuning to their sensors before sending
data to a SLAM system.
Removes the submit_frames property from wmr_camera as this replaces it.
2021-12-21 11:43:17 +00:00
Mateo de Mayo 1c7323f1c2 d/rs: Generalize laser emitter option setup to any rs option 2021-12-21 11:43:17 +00:00
Mateo de Mayo fa431fc010 d/rs: Map all rs_hdev timestamps to monotonic clock 2021-12-21 11:43:17 +00:00
Mateo de Mayo 76d7729e4d m/vec3: Add operator/ for scalar division 2021-12-21 11:43:17 +00:00
Mateo de Mayo bcb4cd82cd aux/math: Use dt in calculation of ang vel between quat diference 2021-12-21 11:43:17 +00:00
Mateo de Mayo 3e8a070e93 u/var: Add u_var_combo 2021-12-21 11:43:17 +00:00
James Hogan 7ee8d1ac5d
xrt: Revert xrt_view::display::{w|h}_pixels changes
Commit 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
accidentally removed some references to {w|h}_pixels as well as
{w|h}_meters. This resulted in recommended view image sizes of 0px*0px.

Revert those changes without reverting the rest of the commit.

Fixes: 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
2021-12-20 23:00:40 +00:00
Moses Turner 5635cd3885 ipc: fix typo - connec -> connect 2021-12-20 06:21:36 -06:00
Simon Zeni 4e4e6708bc Revert "d/survive: ajust timestamp from button event"
This reverts commit b396c200d0.

The issue has been fixed in libsurvive [1]

[1]: https://github.com/cntools/libsurvive/pull/250
2021-12-17 13:40:53 -05:00
Moses Turner a19f13171b meson: use cjson_include with depthai driver 2021-12-14 14:12:42 +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
Christoph Haag b7c8a6faa5 d/ht_ctrl_emu: work around truncation warning
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp: In function ‘int cemu_devices_create(xrt_device*, xrt_device*, xrt_device**)’:
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:102: warning: ‘ Left Hand’ directive output may be truncated writing 10 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                                      ^~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 11 and 266 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:84: warning: ‘ Right Hand’ directive output may be truncated writing 11 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                    ^~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 12 and 267 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-14 14:58:33 +01:00
Christoph Haag 2b101e6ffa d/wmr: don't print NULL value in error message
In file included from ../src/xrt/drivers/wmr/wmr_config.h:15,
                 from ../src/xrt/drivers/wmr/wmr_config.c:16:
In function ‘wmr_config_parse_camera_config’,
    inlined from ‘wmr_config_parse_calibration’ at ../src/xrt/drivers/wmr/wmr_config.c:422:8,
    inlined from ‘wmr_hmd_config_parse’ at ../src/xrt/drivers/wmr/wmr_config.c:477:13:
../src/xrt/auxiliary/util/u_logging.h:84:25: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
   84 |                         u_log(__FILE__, __LINE__, __func__, level, __VA_ARGS__);                                       \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xrt/auxiliary/util/u_logging.h:220:38: note: in expansion of macro ‘U_LOG_IFL’
  220 | #define U_LOG_IFL_E(cond_level, ...) U_LOG_IFL(U_LOGGING_ERROR, cond_level, __VA_ARGS__)
      |                                      ^~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c:22:35: note: in expansion of macro ‘U_LOG_IFL_E’
   22 | #define WMR_ERROR(log_level, ...) U_LOG_IFL_E(log_level, __VA_ARGS__)
      |                                   ^~~~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c:267:17: note: in expansion of macro ‘WMR_ERROR’
  267 |                 WMR_ERROR(log_level, "Invalid camera calibration block %d - unknown camera purpose %s", c->n_cameras,
      |                 ^~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c: In function ‘wmr_hmd_config_parse’:
../src/xrt/drivers/wmr/wmr_config.c:267:100: note: format string is defined here
  267 |                 WMR_ERROR(log_level, "Invalid camera calibration block %d - unknown camera purpose %s", c->n_cameras,
      |                                                                                                    ^~
2021-12-14 14:54:47 +01:00
Christoph Haag 42ae21d412 d/hdk: Remove unused variable 2021-12-14 14:19:53 +01:00
Christoph Haag d4a491ea74 targets/steamvr: Use python stdlib to copy
monado/src/xrt/targets/steamvr_drv/copy_assets.py:8: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.dir_util import copy_tree

monado/src/xrt/targets/steamvr_drv/copy_assets.py:8: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.dir_util import copy_tree
2021-12-14 14:17:57 +01:00
Christoph Haag 8bbaf2a05b a/tracking: Use #pragma message instead of #warning
Avoids warning
../src/xrt/auxiliary/tracking/t_tracker_slam.cpp:66:2: warning: #warning is a GCC extension
2021-12-14 13:51:16 +01:00
Ryan Pavlik 1203cf38f0 cmake: Fix build when we have EGL but not GLES headers. 2021-12-13 15:00:24 -06:00
Mateo de Mayo 74e79ff274 d/wmr: Add SLAM tracker 2021-12-13 10:41:55 +00:00
Mateo de Mayo d3bde043bd d/wmr: Forward IMU samples to wmr_source 2021-12-13 10:41:55 +00:00
Mateo de Mayo 41f42e0b3a d/wmr: Add wmr_source with camera streams support 2021-12-13 10:41:55 +00:00
Mateo de Mayo 92c1e55c37 d/wmr: Prepare HMD for SLAM tracking 2021-12-13 10:41:55 +00:00
Mateo de Mayo c1edfa95d7 d/wmr: Add Odyssey+ activation/deactivation functions
Co-authored-by: Jan Schmidt <jan@centricular.com>
2021-12-13 10:41:55 +00:00
Mateo de Mayo 7338aded9c d/wmr: Add exposure setting 2021-12-13 10:41:55 +00:00
Mateo de Mayo d9aaa4369f d/wmr: Add ROI rect for WMR cameras 2021-12-13 10:41:55 +00:00
Jan Schmidt 3bb3197fec d/wmr: Parse controller configuration
Extract LED and inertial sensor configuration from
controller JSON
2021-12-13 11:47:12 +11:00
Jan Schmidt ea4836b081 d/wmr: Read controller firmware configuration blocks.
Implement reading and logging of controller firmware blocks.

The main JSON configuration is obfuscated. The raw block can
be dumped to disk by setting the WMR_CONFIG_DUMP env var
to point to a directory to receive controller configs
2021-12-13 11:47:12 +11:00
Jan Schmidt 4e24a1277e d/wmr: Add pragma once to BT controller header 2021-12-13 11:47:12 +11:00
Jan Schmidt 1c67a1ff52 d/wmr: Add HP Reverb G2 controller PID
Recognise the HP Reverb G2 WMR controller if it is directly
connected via bluetooth (instead of tunnelled through the
headset like it normally would be).
2021-12-13 11:47:12 +11:00
Simon Zeni b396c200d0 d/survive: ajust timestamp from button event 2021-12-12 23:07:14 +00:00
Nima01 b3e0f5bc6a d/wmr: WMR Controller (BT): Don't waste CPU cycles when reading 2021-12-12 21:37:50 +01:00
Nima01 2d48a9bca2 d/wmr: WMR Controller (BT) 3DoF working, based on gyro and accel.
Tested on HP Reverb G1. Reading and applying device specific
config data is still pending.
2021-12-12 16:47:35 +00:00
Mateo de Mayo fe4f6c6eb0 misc: Improve wmr and euroc docs, fix ht memory leak, stride for cv::Mats 2021-12-12 13:13:18 -03:00
Mateo de Mayo cd0342c8dc aux/util: Add u_frame_create_roi 2021-12-12 13:12:42 -03:00
Mateo de Mayo fa88ce5f3f u/var: Add u16 var kind 2021-12-12 13:06:04 -03:00
Mateo de Mayo 471ca9530b m/3dof: Add reset functionality 2021-12-12 13:06:04 -03:00
Moses Turner 916e2ced42 doc: Add changelog for MR 1054 2021-12-10 21:27:31 -06:00
Moses Turner 749723f0ba xrt: Remove xrt_view::display::{w|h}_meters
It is not used anywhere.
2021-12-10 21:27:15 -06:00
Jakob Bornecrantz 59a09abf6a d/dai: Document work around 2021-12-10 21:31:28 +00:00
Jakob Bornecrantz 775d82d728 d/dai: Work around issue in v2.13.3 2021-12-10 21:31:28 +00:00
Ryan Pavlik 5b1c60eeb0 xrt: Add unique_ptr typedef for xrt_device 2021-12-10 21:24:02 +00:00
Ryan Pavlik 26e5f6eee7 a/math: Bring the C++ wrapper for relation_history up to parity.
Also add tests for it too.
2021-12-10 21:06:04 +00:00
Ryan Pavlik ef4550c268 a/math: Add a "get latest" to relation history as well. 2021-12-10 21:06:04 +00:00