Commit graph

1004 commits

Author SHA1 Message Date
Jakob Bornecrantz 175ff58f10 build: Remove meson files 2022-04-28 21:36:25 +00:00
Jakob Bornecrantz 3b6b45b762 d/wmr: Prettier xfer status printing 2022-04-17 16:06:11 +01:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Nima01 f705683957 d/wmr: Partial decoding of device status message. Notifies when screen is fully powered up Reverb G1. 2022-04-13 00:19:50 +00:00
Ryan Pavlik 0ae0316400 cmake: Format build files 2022-04-13 01:11:13 +01:00
Alexander Koenig 5d76c83c37 Fix typo in rotate_lenses_right quirk, helps with #166 2022-04-12 23:14:32 +00:00
Ryan Pavlik ef9b15ee67 d/dummy: Silence some warnings 2022-04-12 23:06:11 +00:00
Mateo de Mayo e41cc1eec3 d/qwerty: Fix warning for AIM pose 2022-04-12 10:20:02 -03:00
Mateo de Mayo 310248546d d/euroc: Add euroc runner 2022-04-06 11:50:17 -03:00
Mateo de Mayo 4c85e3fbb3 t/slam: Refactor tracker to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo a80f88eb00 d/euroc: Refactor player to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo ff8c2d820c d/euroc: Improve player tolerance to more datasets
Makes all usable euroc and tumvi datasets stream properly by fixing
some border cases that a couple of datasets had.
2022-04-06 11:50:17 -03:00
Mateo de Mayo 7f0699dffc d/euroc: Add configuration options to the player
Specifically:
- EUROC_PLAY_FROM_START
- EUROC_USE_SOURCE_TS
- EUROC_PRINT_PROGRESS
- EUROC_MAX_SPEED
- EUROC_PLAYBACK_SPEED
2022-04-06 11:50:17 -03:00
Christoph Haag 6c9f1f4083 t/hand: Add meson build for mercury 2022-03-25 18:33:04 +00:00
Moses Turner 870a2ce704 d/ht: support DepthAI cameras and Mercury hand tracking 2022-03-23 18:30:02 -05:00
Moses Turner 912cc22c20 d/dai: Get ready to support fisheye cameras
Remove the #if 0 after the next depthai-core release.
2022-03-23 20:56:15 +00:00
Moses Turner 0a843eb20f d/dai: Translation is in cm but in m in Monado 2022-03-23 20:56:15 +00:00
korejan d43c7ffa71 android: Support for using device's set display refresh rate
* Adds support for querying the device's currently set display refresh rate to
  be used for android driver on creation. Allowing for devices which support
  selecting other refresh rate modes beyond 60hz.
* Changes hardcoded sensor polling rate to now match refresh queried from the
  device.
2022-03-22 12:33:30 +00:00
Moses Turner b3872e925f Switch real-time users of u_sink_queue to u_sink_simple_queue 2022-03-19 14:28:09 +00:00
Jakob Bornecrantz 6f10a20ce0 d/multi: Use xrt_device_get_tracked_pose function 2022-03-17 02:08:33 +00:00
Moses Turner d2366b31dc d/multi: Correctly override the head pose in get_view_poses 2022-03-15 20:13:10 -05:00
Moses Turner e4805c07e2 d/rs: Tracking origin probably should have an identity pose 2022-03-15 20:13:10 -05:00
Mateo de Mayo c9f7184d64 t/slam: Implement timing and trajectory error UI graphs 2022-03-14 23:42:13 +00:00
Mateo de Mayo af2dde11c3 misc: Fix some release build warnings and minor changes
- Add CMakeUserPresets.json to .gitignore
- Fix DASSERTs warning for release builds
- Do not use one euro filter with invalid poses
- Other NFC style changes
2022-03-14 23:42:13 +00:00
Mateo de Mayo e889ee7562 d/euroc: Implement ground truth trajectory load 2022-03-14 23:42:13 +00:00
Mateo de Mayo 71694b80fd d/euroc: Refactor player to stream samples more like a real device
Splits the image and IMU producers into their own threads.
2022-03-14 23:42:13 +00:00
Antonio Ospite 6ca4522de0 d/ns: really silence -Wunused-result warning
A previous change didn't really ignore the return value of fread() and
a warning was still emitted:

-----------------------------------------------------------------------
[103/1571] Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o
../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’:
../src/xrt/drivers/north_star/ns_hmd.c:512:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  512 |  (void)fread(json, 1, file_size, config_file);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Check the return value of fread to fix the warning for good, and declare
the return value of ftell as long as stated in the man page.
2022-03-14 14:06:02 +00:00
Jakob Bornecrantz e1b0f55a87 d/ns: Always check to close file on error path 2022-03-09 22:34:37 +00:00
Antonio Ospite a4167ee500 d/ns: silence -Wunused-result warning, close config_file in error paths
On some systems fread() is declared with  attribute warn_unused_result
and this results in a build warning:

-----------------------------------------------------------------------
Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o
.../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’:
.../src/xrt/drivers/north_star/ns_hmd.c:512:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  512 |  fread(json, 1, file_size, config_file);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Explicitly ignore the return value of that fread() to silence the
warning.

And while at it also close config_file in some error paths between
fopen() and fclose() which where leaking the file pointer when jumping
to the parse_error label.
2022-03-09 16:10:43 +01:00
Moses Turner 30b779e515 t/hand: Add ht_sync 2022-03-08 20:44:25 +00:00
Moses Turner a9db1a6f6e d/ht_crtl_emu: Free driver 2022-03-08 13:52:23 -06:00
Jakob Bornecrantz bf1edf96eb d/dai: Add OV7251 sensor info 2022-03-04 14:04:13 +00:00
Henry Che add7b5723f Update illixr_device.cpp: There is no function called get_view_pose in xrt_device.h. 2022-02-23 17:13:38 +00:00
Mateo de Mayo cee1571625 d/euroc: Fix euroc player skip functionality 2022-02-22 22:56:07 +00:00
Mateo de Mayo 4b94d83c11 a/math: Fix one euro implementations not dividing by dt
The dy name was kept. It can now be thought of as "[d]erivative of [y]"
instead of the previous "change of y". Also, the beta parameters of the
one-euro users were adjusted by approximately multiplying them by 0.016
to compensate.
2022-02-22 13:34:45 +00:00
nima01 be3546eb92 d/wmr: Reverb G1: Avoid camera buffer related hangs 2022-02-20 14:57:36 +00:00
Christoph Haag 49b81e219f aux/util: Move fov from u_device_simple_info::views to top level 2022-02-19 13:04:32 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Christoph Haag 5e1805f04b build: Add sample driver to meson build 2022-02-19 13:04:32 +00:00
Ryan Pavlik 4ecbcc2d27 d/wmr: Fix doxygen warning 2022-02-19 01:15:36 +00:00
Christoph Haag 5b1d15f143 d/survive: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag b2e7fc0f11 d/survive: Add pragma once and c++ compatibility 2022-02-19 00:55:54 +00:00
Christoph Haag bab6858eb8 d/multi: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag 43f0bb4343 xrt: Fix tracking override docs 2022-02-19 00:43:30 +00:00
Nova f2ec7a7dd5 d/survive: Add SURVIVE_DISABLE_HAND_EMULATION env variable 2022-02-17 13:20:59 +00:00
Jakob Bornecrantz 9b656cde77 xrt: Remove xrt_device::get_view_pose
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:24 +00:00
Jakob Bornecrantz 0511b319ba drivers: Implement xrt_device::get_view_poses
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:08 +00:00
Jakob Bornecrantz b322ff689b d/wmr: Add trace markers to some common functions 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 4aa2ae985c d/wmr: Refactor hololens code a bit 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 8f5a7b88c7 d/wmr: Tidy todos 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 7791a04069 d/rs: Add math include to fix build and org includes
Fixes build on Ubuntu 21.10
2022-02-14 14:34:06 +00:00
Mateo de Mayo 3cba6dc700 d/rs: Add exposure controls to the debug UI 2022-02-14 10:22:05 -03:00
nima01 41edf12a0d d/wmr: Debug GUI support for enabling/disabling HMD screen and displaying IPD and proximity values 2022-02-12 03:45:16 +00:00
Moses Turner 7ee8a7dba0 d/dai: add stereo-RGB pipeline behind ifdef, waiting for Luxonis to upstream multicam support 2022-02-10 10:55:06 -06:00
Ryan Pavlik c30acbf9f8 d/ht: Forward declarations and IWYU 2022-02-08 17:27:42 -06:00
Ryan Pavlik 5b8c869b56 d/ht: Fix header and usages of helpers 2022-02-08 17:21:46 -06:00
Ryan Pavlik 8c7af28904 d/ht: Fix build issues against updated history structure. 2022-02-08 16:58:24 -06:00
Ryan Pavlik 65ef8d58f1 d/ht: Cleanup usage of history buffer.
May wish to reconsider whether all these usages are required: they appear to only use the back (latest) element.
2022-02-08 17:00:11 +00:00
Moses Turner 614e0e58ae d/ht: use new HistoryBuf api 2022-02-08 17:00:11 +00:00
Ryan Pavlik d05df584b2 d/ht: Some cleanups 2022-02-08 17:00:11 +00:00
nima01 45466e419b d/wmr: Reverb G1 proximity sensor support 2022-02-02 02:27:55 +01:00
Christoph Haag 2ad634bd1e d/wmr: print json config on debug log level 2022-01-21 20:32:35 +00:00
Christoph Haag 6e339014a5 d/wmr: Add Medion Erazer X1000 2022-01-21 20:32:35 +00:00
Christoph Haag 45adabe135 d/wmr: Clarify comment in headset_map assert 2022-01-21 20:32:35 +00:00
Christoph Haag 88d55c6e22 d/wmr: Sort HP G2 controller PID to the other HP devices 2022-01-21 20:32:35 +00:00
Christoph Haag 96c09e06e7 d/wmr: consolidate interface getters
Moving them into one function makes it simpler to add more HMDs.
2022-01-21 20:32:35 +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 2188d8afc2 d/remote: expose hand active state to remote gui 2022-01-18 14:33:11 -06:00
Jarvis Huang 52cb2ef123 d/android: Stop thread function when device destoryed 2022-01-05 14:59:39 +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 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
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
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 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
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
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
Moses Turner c66b29d117 d/wmr: use u_extents_2d_split_side_by_side instead of u_device_setup_split_side_by_side 2021-12-10 14:08:52 -06:00
nima01 d5d1695438 d/wmr: Hook up motion controller gyro and accel
Basic IMU setup with fusion. Reading and applying config callibration data from controller is still work in progress
2021-12-08 00:43:50 +00:00
Jakob Bornecrantz aad9b04a92 d/wmr: Fix warning and tidy 2021-12-07 13:30:45 +00:00
Jakob Bornecrantz eee143f401 d/rs: Use long name as documentation name 2021-12-07 11:26:20 +00:00
Jakob Bornecrantz 3e38ada9a5 build: s/rs/realsense/g 2021-12-07 11:26:20 +00:00
Jakob Bornecrantz 6ae52651c4 d/vive: Up max config z and json size, also tidy 2021-12-06 19:43:49 +00:00
Jan Schmidt 6cc92c369a d/wmr: Fix accel <-> gyro mixup in previous change.
There was a typo in the calibration bias/correction
patch that messed up accel values by accidentally
reusing the gyro value.
2021-12-06 01:45:25 +11:00
Jan Schmidt c06c3fa782 d/wmr: Make WMR to OpenXR coordinate transform explicit
Instead of negating Y and Z readings from the IMU when
parsing, parse the native values, then apply the rotation
using the centerline transform before fusion.
2021-12-05 00:09:25 +11:00
Jan Schmidt c7549c8680 d/wmr: Apply HMD IMU correction from calibration.
Apply the mix_matrix and bias_offsets adjustments for
IMU readings.
2021-12-05 00:06:05 +11:00
Jan Schmidt ee030ff0c8 d/wmr: Extend config reading to include bias/mix_matrix
Add extraction of bias offsets and mix_matrix (rotation)
correction for IMU accel, gyro and mag configuration entries.
2021-12-05 00:06:05 +11:00
Jan Schmidt 385a3bd33d d/wmr: Split out inertial sensor configuration
Inertial sensor configuration blocks are common to
both HMD and controller calibration. Factor out a
shared structure to receive them.
2021-12-05 00:06:05 +11:00
Jan Schmidt 76c18bfdc7 d/wmr: Rename wmr_config_parse to wmr_hmd_config_parse() 2021-12-05 00:06:05 +11:00
Jakob Bornecrantz 971739627a d/vive: Actually print error message to say what is going on 2021-12-03 21:13:57 +00:00
Moses Turner 8af3a47f5a cmake: make DepthAI driver link to aux_tracking 2021-12-03 19:22:57 +00:00
Jakob Bornecrantz efde7f185c a/math: Put m_relation_history_get out argument last 2021-12-03 14:00:32 +00: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
Simon Zeni ba7f9d9578 d/ht_cemu: enable build if XRT_BUILD_DRIVER_HANDTRACKING is enabled 2021-12-01 05:36:05 +00:00
Simon Zeni 749792f324 d/ht_cemu: enable meson build 2021-12-01 05:36:05 +00:00
Moses Turner 6b14cc3923 d/cemu: use proper number of inputs 2021-11-30 23:32:05 -06:00
Moses Turner 80840c4f4a d/multi: propagate out_timestamp_ns 2021-11-30 05:56:57 -06:00
Moses Turner f5bc81756e d/survive: use controller emulation for hand-tracking 2021-11-30 05:56:57 -06:00
Moses Turner 0214937aa0 d/vive: use controller emulation for hand-tracking 2021-11-30 05:56:57 -06:00
Moses Turner 03359e2bfb d/ht_ctrl_emu: Create the driver 2021-11-30 05:56:57 -06:00
Nima01 bdf96d6810 d/wmr: Decode and handle controller buttons, thumbstick and trackpad. 2021-11-27 04:31:13 +01:00
Jan Schmidt ce03824824 d/wmr: Comment updates for wmr_protocol.h
Improve the descriptions of some pieces of the WMR
protocol
2021-11-25 23:33:55 +11:00
Jan Schmidt 7f392936c6 d/wmr: Report frame source_sequence and source_timestamp
Extract timestamp in source 100ns units and convert to
nanoseconds, then place them in the emitted xrt_frames.

Unwrap the 8-bit frame sequence counter to 64-bits, and
add that too.

Add some comments and debug for other fields in the
incoming data.
2021-11-25 23:33:55 +11:00
Jan Schmidt 0fab912c5c d/wmr: Add debug gain control
Add a control to the debug UI for adjusting the
camera gain setting when testing.
2021-11-25 20:05:10 +11:00
Simon Zeni a090655e16 d/ht: remove old ht_models API 2021-11-24 16:42:56 -05:00
Simon Zeni ee45be6f7b d/ht: use new ht_model API 2021-11-24 16:42:56 -05:00
Simon Zeni 0e53b3b87f d/ht: introduce ht_model 2021-11-24 16:42:56 -05:00
Simon Zeni e84d948fb4 d/ht: blackar takes const input 2021-11-24 16:42:56 -05:00
Simon Zeni 32330d467c d/ht: planarize takes const input 2021-11-24 16:42:56 -05:00
Jakob Bornecrantz 63701511eb d/wmr: Tidy 2021-11-24 17:12:19 +00:00
Christoph Haag 01c6e4ed28 d/wmr: make wmr_config_key static
OpenHMD has a global variable wmr_config_key too which is exported in some
build configurations, causing Monado to fail linking openhmd and the wmr
driver together.
2021-11-24 14:36:55 +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
Christoph Haag 431857dd16 d/ohmd: use os_nanosleep for delay_after_initialization 2021-11-22 00:45:08 +01:00
Christoph Haag 8a4a09bb1b d/ohmd: Remove duplicate delay_after_initialization code 2021-11-22 00:40:13 +01:00
Jakob Bornecrantz 839ada7115 d/wmr: Add more to the I/O 2021-11-20 18:54:16 +00:00
Jakob Bornecrantz 7fa3109e2a d/wmr: Minimum to bind and return a pose 2021-11-20 17:44:34 +00:00
Jakob Bornecrantz 673ac5ee6c d/wmr: Add support for Samsung Odyssey controllers 2021-11-20 17:33:25 +00:00
Jakob Bornecrantz ea38309c86 d/wmr: Bracemaggedon 2021-11-20 15:37:15 +00:00
Jakob Bornecrantz 50e0e7783e d/wmr: Shuffle and group things in camera file 2021-11-20 15:00:02 +00:00
Jakob Bornecrantz 85f79f935b d/wmr: Tidy 2021-11-20 15:00:02 +00:00
Jakob Bornecrantz 1441453d5f d/wmr: Add log level to variable tracking 2021-11-20 13:54:51 +00:00
Jakob Bornecrantz 4329b755a9 d/wmr: Document camera start and constify argument 2021-11-20 13:50:54 +00:00
Jakob Bornecrantz 16c75e7cc7 d/wmr: Tidy variable tracking 2021-11-20 13:29:24 +00:00
Jan Schmidt 733d463ec4 d/wmr: Use proximity sensor value in IPD message.
The first byte after the packet ID toggles when
the proximity sensor is activated.
2021-11-20 12:52:45 +00:00
Jan Schmidt 5efe0da713 d/wmr: Handle 0x17 packets
Add a debug report for 0x17 packets on Reverb G2 that
report controller statuses. The statuses seen so far
are 0x0 for unpaired, 0x1 for paired but offline, and
0x2 for online. Paired reports provide VID and PID for the
associated motion controller.
2021-11-20 12:52:45 +00:00
Jan Schmidt 7b95755f07 d/wmr: Implement bluetooth debug message handling
Handle the debug message packet from the bluetooth
interface on the HP G2. There might be other packet
types, but that's the only one I've seen so far.
2021-11-20 12:52:45 +00:00
Jan Schmidt e0b5070f49 d/wmr: Rename controller related packets
Rename the controller and bluetooth related packets
according to their usage, and split out the
controller update handling function.
2021-11-20 12:52:45 +00:00
Jan Schmidt e18288cc57 d/wmr: Ignore all other packets when reading config
Any other WMR packets can arrive while we're reading the
config block - ignore all of them, not just a few. Fixes
config reading failures.
2021-11-20 12:52:45 +00:00
Jan Schmidt a14d6f1c2b d/wmr: Parse and log HMD debug messages 2021-11-20 12:52:45 +00:00
Jan Schmidt 6bb2972443 d/wmr: Set default camera gain
Add API for gain control on headset cameras,
and use it to set a mid-range default exposure gain
2021-11-20 12:52:45 +00:00
Jan Schmidt 0da1bd74ce d/wmr: Debug output for camera frames
Compute the frame size required for the cameras on a given
headset.

Copy the pixels out into an xrt_frame, then send it
to a debug sink - one for SLAM tracking exposures, and
1 for controller frames.

Based on a patch by Jakob Bornecrantz
2021-11-20 12:52:45 +00:00
Jan Schmidt 5fe935a5b0 d/wmr: Add camera reading loop
Calculate and configure USB transfers to read the
cameras on a WMR headset. Needs more work to
make use of the received frames.
2021-11-20 12:52:45 +00:00
Jan Schmidt e422be89fa d/wmr: Add camera configuration block parsing
Read camera configuration info from the HMD JSON
block
2021-11-20 12:52:45 +00:00
Jan Schmidt 7fb94889a8 d/wmr: Fix a small lock handling mistake
In the wmr handling thread, make sure lock
handling is symmetrical in all code paths.
2021-11-20 12:52:45 +00:00
Nima01 e536a02b33 d/wmr: Factor out parsing of controller messages and minor cleanup. 2021-11-18 17:19:07 +00:00
Nima01 c4db3dfccc d/wmr: Add basic Reverb (G1, Bluetooth) motion controller support. 2021-11-18 17:19:07 +00:00
Nima01 acd8a0986e d/wmr: Prepare for WMR motion controller driver - Change ambiguous names and traces. 2021-11-18 17:19:07 +00:00
Antonio Ospite 14cc4f1ba2 d/v4l2: fix building with older linux kernel like 4.15
Older linux kernels like 4.15 don't have V4L2_CID_DIGITAL_GAIN or
V4L2_CTRL_FLAG_MODIFY_LAYOUT, add conditional guards to build
successfully on systems with such kernels.
2021-11-13 13:48:00 +00:00
Jakob Bornecrantz 79ec1bd695 d/wmr: Add basic support for Samsung Odyssey+
Display start-up sequence still probably needed.
2021-11-13 12:36:25 +00:00
Ryan Pavlik 9a41a1a8be d/ulv2: Improve source docs 2021-11-13 12:29:58 +00:00
Ryan Pavlik 0fa5876a5c drivers: Add references to xrt_prober_found_function_t in all relevant docs 2021-11-13 12:29:58 +00:00
Ryan Pavlik 2e323add6f drivers: 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
Moses Turner c1d4314aad d/ht: move DEBUG_GET_ONCE_LOG_OPTION to ht_driver.cpp (NFC)
Fixes an annoying warning.
2021-11-08 08:11:26 -06:00
Simon Zeni 49d2d81940 d/ht: split ht_algorithm into source and header 2021-11-08 13:56:37 +00:00
Simon Zeni 39bc129564 d/ht: split ht_models into source and header 2021-11-08 13:56:37 +00:00
Simon Zeni 7618a7e34d d/ht: split ht_nms into source and header 2021-11-08 13:56:37 +00:00
Simon Zeni 83630efc3d d/ht: split ht_image_math into source and header 2021-11-08 13:56:37 +00:00
Simon Zeni 44b46a28bf d/ht: split ht_hand_math into source and header 2021-11-08 13:56:37 +00:00
Jakob Bornecrantz 2a536f17d1 cmake: Remove missed source array 2021-11-05 15:56:14 +00:00
Ryan Pavlik 9ab69a2c99 d/arduino/device: Fix it's vs its 2021-11-03 17:28:56 -05:00
Ryan Pavlik ebde5344a1 cmake: Make compilation of the sample driver optional. 2021-11-03 17:04:05 -05:00
Ryan Pavlik 55d16046eb doc: Update driver writing documentation 2021-11-03 17:04:02 -05:00
Ryan Pavlik 33e367ee42 drivers: Add a sample driver intended for use as a template. 2021-11-03 17:00:28 -05:00
Ryan Pavlik e2c6fbdd9a cmake: Inline lists of sources for drivers, per current best practice 2021-11-03 17:00:28 -05:00
Simon Zeni c67587c066 d/ht: improve anchor data for hand detector 2021-11-01 17:54:26 -05:00
Jason McNew fd065cca6e d/wmr: Fix segfault if unsupported HoloLens Sensors device is present. 2021-10-31 17:07:55 +00:00
Mateo de Mayo f84629ccbc d/rs: Split SLAM source out of rs_hdev
(This temporarily disables the RealSense SLAM stream as there is
nothing starting it until the next commit)
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
Mateo de Mayo 773eccad6c docs: Move some driver entities into @addtogroup and other NFC 2021-10-28 11:40:49 +00:00
Ryan Pavlik 05ed361601 t/psvr: Fix some truncation warnings. 2021-10-19 16:49:13 -05:00
Ryan Pavlik b62fb33e36 d/wmr: Fix some truncation warnings. 2021-10-19 16:11:34 -05:00
Mateo de Mayo 1095c3a2c1 d/rs: Add pose correction for Basalt 2021-10-16 17:03:02 -03:00
Moses Turner d440a23888 d/dai: rename things to either 'monocular' or 'grayscale' 2021-10-13 16:26:26 -05:00
Jakob Bornecrantz be9a91fd12 d/dai: Explicitly close queue to avoid use after free errors from asan 2021-10-12 20:44:32 +01:00
Jakob Bornecrantz 6f22d4d819 d/dai: Handle cameras without calibration data 2021-10-12 15:37:42 +01:00
Jakob Bornecrantz c5b2c5827b d/dai: Some tidy 2021-10-11 21:45:38 +01:00
Jakob Bornecrantz a5fc2fa49e d/dai: Expose function to get stereo calibration 2021-10-10 00:16:39 +01:00
Jakob Bornecrantz 3fd740e6e9 d/dai: Add support for a stereo pipeline via slam_stream_start 2021-10-09 22:28:11 +01:00
Jakob Bornecrantz 344b5d9755 d/dai: Refactor out create function 2021-10-09 22:28:11 +01:00
Jakob Bornecrantz e1dd59f749 d/dai: Refactor out pipeline setup to helper function 2021-10-09 22:28:11 +01:00
Jakob Bornecrantz b8e2cbd9ee d/dai: Add code to extract calibration of gray stereo cameras 2021-10-09 22:28:11 +01:00
Jakob Bornecrantz 8c242c1bc1 d/dai: Work around RGB_OV_9782 not yet being supported on main 2021-10-09 22:28:11 +01:00
Jakob Bornecrantz c2b00ebb18 d/dai: Switch default logging to info 2021-10-09 22:28:11 +01: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
Mateo de Mayo df3c36ba0c d/rs: Improve how hdev handles IMU samples
- Prevent race conditions with a lock
- Check that timestamps "domains" are the same across samples
- Use faster sensor to push the IMU sample instead of always gyro
2021-10-06 16:41:18 -03:00