danwillm
76f96686d1
xrt/drivers: Convert hand tracking drivers to use hand simulation
...
Co-authored-by: Moses Turner <moses@collabora.com>
2022-08-01 17:33:40 +00:00
Moses Turner
2868348e8c
t/common: Make controllers work again with the Lighthouse builder
...
!1418 briefly broke controller setup.
2022-07-27 10:49:29 +00:00
Moses Turner
c0eed827c5
xrt: Remove t_hand_tracking_output_space
...
LEFT_CAMERA is the only one that remained useful
2022-07-27 10:49:29 +00:00
Jakob Bornecrantz
86ae6a5bb1
d/wmr: Fix warning
2022-07-26 18:15:04 +00:00
danwillm
fd61dd08b2
drivers: add all of opengloves driver
2022-07-25 23:57:45 +01:00
danwillm
0943ce10be
a/util, xrt: u_hand_tracking interface change
2022-07-25 23:57:45 +01:00
Mateo de Mayo
36ca9260cf
d/vive: Update tracking status to fix segfault
...
Co-authored-by: Moses Turner <moses@collabora.com>
2022-07-25 19:08:46 +00:00
Mateo de Mayo
6e16959098
d/vive: Add vive_source to convert v4l2 timestamps into monotonic clock
...
Use a sink in the middle of the stream to correct for v4l2 timestamps with
hardware timestamps to monotonic clock.
This sink, together with other utilities related to data streaming, lives in a
new vive_source entity, with similar functionality to wmr_source or rs_source.
The vive_source lifetime is managed by the builder xfctx, which prevents
deallocation dependencies between vive_device and the v4l2_fs to cause segfaults.
2022-07-25 19:08:46 +00:00
Mateo de Mayo
13d90bff77
d/vive: Implement 3DoF/SLAM switching button and pose offset
2022-07-25 19:08:46 +00:00
Mateo de Mayo
f0ceb40f6a
d/vive: Prepare data streaming and SLAM tracker
2022-07-25 19:08:46 +00:00
Mateo de Mayo
3cbb7f6b9f
d/vive: Pass status of visual tracking into the driver
2022-07-25 19:08:46 +00:00
Mateo de Mayo
8d929fe2fa
d/v4l2: Split some definitions into a new header
2022-07-25 19:08:46 +00:00
danwillm
de53e431ed
d/multi: fix untested codepath
2022-07-25 15:23:49 +01:00
Nova
0954bd0dd8
d/wmr: Clean up check_and_get_interface in wmr_prober.c
2022-07-25 12:19:48 +01:00
Nova
e141aa2d55
d/wmr: Add initial support for original Odyssey HMD
2022-07-25 12:19:48 +01:00
Christoph Haag
ffb0346ba4
d/survive: Fix compilation on clang
...
Fixes error
/home/haagch-collabora/monado/src/xrt/drivers/survive/survive_driver.c:384:53: error: passing 'const union xrt_output_value *' to parameter of type 'union xrt_output_value *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
int ret = survive_controller_haptic_pulse(survive, value);
^~~~~
/home/haagch-collabora/monado/src/xrt/drivers/survive/survive_driver.c:340:89: note: passing argument to parameter 'value' here
survive_controller_haptic_pulse(struct survive_device *survive, union xrt_output_value *value)
2022-07-24 23:48:57 +02:00
Mateo de Mayo
aaf5fe1b7b
d/vive: Improve ticks-to-nanoseconds conversion
2022-07-22 16:19:49 +00:00
Mateo de Mayo
aa617a9d8b
d/vive: Group 3dof IMU fusion fields and add a mutex
2022-07-22 16:19:49 +00:00
Moses Turner
f6ef1d8f28
d/dai: Add code to control IR floodlight and exposure behind ifdef
2022-07-21 00:23:32 +01:00
Moses Turner
4d0e46a5ac
d/dai: Remove depthai::opencv dependency
2022-07-21 00:23:32 +01:00
bjorn
919936991c
ipc: make all IPC input aggregates const;
2022-07-14 20:31:38 +00:00
Mateo de Mayo
49cd45b24e
d/euroc: Fix typo
2022-07-12 12:47:05 +00:00
Moses Turner
567304374d
d/v4l2: Factor out format setup so we can catch errors in stream_start
2022-06-30 15:19:51 +01:00
Moses Turner
bd421e683c
d/vive: Handle not-found devices correctly
2022-06-24 01:58:51 +01:00
Moses Turner
29cd525a3b
d/vive: Prepare for lighthouse builder
2022-06-24 01:54:45 +01:00
Moses Turner
766f1b94e9
d/survive: Remove lots of cruft and prepare for Lighthouse builder
2022-06-24 01:54:45 +01:00
Moses Turner
19958b4d77
d/ht: Remove cruft for Index
2022-06-24 01:54:45 +01:00
Moses Turner
00b6dd35ec
d/survive: Don't create hand-tracker ourselves
2022-06-24 01:54:45 +01:00
Moses Turner
a853022a66
d/vive: Don't create the hand-tracker ourselves
2022-06-24 01:54:45 +01:00
Moses Turner
0e50364be6
d/ht: Don't drop algorithm_choice on the floor
2022-06-24 01:54:45 +01:00
Moses Turner
6f21741c51
xrt: Fixup - rename *all* of the relevant hand-tracking structs
2022-06-21 21:18:41 +01:00
Moses Turner
1718d01fb1
xrt: Rename some hand-tracking structs and document them better
2022-06-21 20:37:08 +01:00
Moses Turner
8040224b39
xrt: add hand_tracking_image_boundary_info
2022-06-20 16:33:48 +01:00
Mateo de Mayo
329b5c05bc
d/wmr: Wait 3 seconds for Odyssey+ display
2022-06-18 14:19:01 -03:00
Mateo de Mayo
ed7c148a00
d/wmr: Optionally average IMU samples for 3DoF tracker
...
Similar to how this was being done for SLAM.
It's significantly less jittery and still has a good response.
Smarter filters might benefit from raw measurements so the functionality can
be enabled again with a checkbox.
2022-06-18 14:19:01 -03:00
Mateo de Mayo
10e39d79b8
d/wmr: Use poses instead of isometries for T_imu_cam poses
...
Now that sensor poses are in WMR space, this is a bit tidier
than creating the 4x4 matrices.
2022-06-18 14:19:01 -03:00
Mateo de Mayo
f98b71243c
d/wmr: Correct hand tracking pose
...
Now the tracked hand appears roughly in the same spot as your real hand and
the tracking works a bit better.
2022-06-18 14:19:01 -03:00
Mateo de Mayo
f390214f66
d/wmr: Correct SLAM-tracked IMU pose to middle of the eyes
2022-06-18 14:19:01 -03:00
Mateo de Mayo
008ba2433b
d/wmr: Refactor how precomputed transforms work
...
Hopefully this is an improvement and not just a rewrite. Some ideas were:
1. Keep poses in WMR space as much as possible.
2. Add an explicit function that precomputes a handful of transforms that allow
converting between WMR and OpenXR coordinates.
3. Make naming of variables in line with a relatively common T_A_B notation.
4. I wasn't able to figure out why `wmr_config_compute_pose` worked before,
in any case, hopefully the new notation convention helps understanding
why P_oxr_{acc,gyr} work.
2022-06-18 14:19:01 -03:00
Moses Turner
afec083047
d/ht: Don't depend directly on any external libraries; t/hand does that for us now
2022-06-16 15:51:55 +01:00
Mateo de Mayo
604815cb51
d/wmr: Fix pose correction from Basalt
...
There was a confusion about whether this was needed for some apps. It was.
2022-06-02 15:47:57 +00:00
Christoph Haag
77ee72d4eb
d/remote: Rename r_hub_system_devices_destroy
...
r_hub_destroy() taking a parameter of type struct xrt_system_devices* was weird.
2022-06-02 15:29:10 +02:00
Jakob Bornecrantz
9932e75db6
d/remote: Tidy and comment
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
7990ca9208
d/remote: Print out name values on wrong input name
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
93d92ec6a7
d/remote: Use vive_bindings helper library
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
7f73a58045
d/remote: Expose a Index controller instead of simple controller
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
46305b77db
d/remote: Properly shut down the run_thread
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
2b35699d85
d/remote: Use better logging helpers
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz
d0cc7e4082
d/remote: Use xrt_system_devices directly in the driver
...
And also make shutdown properly work.
2022-06-01 16:50:19 +01:00
Campbell Suter
bb414f7d39
d/qwerty: Fix the aim pose not being HMD-relative
...
Commit e41cc1eec3
added support for the XRT_INPUT_SIMPLE_AIM_POSE pose
input in the QWERTY driver. Unfortunately it didn't change the code that
identifies whether the pose for a controller or HMD is being read.
In the QWERTY driver, the hands are positioned relative to the HMD, so
if you move or rotate the HMD the hands stay in the same place
on-screen. Whether a pose lookup is multiplied by the HMD transform
depends on whether the pose being looked up is that of a controller.
Thus the aim pose would not be positioned relative to the HMD.
2022-06-01 12:52:17 +00:00
Campbell Suter
45703f0952
d/remote: Mark pose as invalid when deactivated
...
Previously the pose on the remote driver controllers would always have
the set pose and the valid-tracking flags set. Leaving the pose set
makes sense (you might want to track how your game behaves when a
controller looses tracking but still has a pose set, for example
tracking issues caused by occlusion) but it wasn't possible to test with
the pose marked as not being tracked.
Therefore this patch deactivates the tracking flags when the controller
is not marked as active.
2022-06-01 17:36:49 +12:00
Ryan Pavlik
bbda2bac48
d/wmr: Add TODO at suspicious code.
2022-05-31 13:38:56 +00:00
Mateo de Mayo
2785c6bcfa
d/wmr: Wait until first IMU sample to send frames
...
In an Odyssey+, it seems that before the first IMU sample the frame timestamps
do not make sense and thus can make the SLAM system crash.
Also, this commit enables SLAM submission from start unless specified.
SLAM for WMR headsets now works "out of the box" :)
2022-05-26 18:35:39 +00:00
Mateo de Mayo
24be4b0a98
d/wmr: Send calibration to SLAM tracker
...
This makes it possible to use Basalt without having to create a calibration file
for the headset anymore.
2022-05-26 18:35:39 +00:00
Mateo de Mayo
3bf07a2711
d/wmr: Load IMU calibration
2022-05-26 18:35:39 +00:00
Aidan Thornton
2fdd01afdd
d/android: initialize our thread and mutex
2022-05-25 12:30:21 +01:00
Moses Turner
6ef55d1f73
d/survive: Initialize threading primitive
2022-05-23 14:27:42 +00:00
Jakob Bornecrantz
38eac9dddc
xrt: Do not depend on util
2022-05-23 09:12:54 -05:00
Jakob Bornecrantz
a75e00d25e
d/qwerty: Include u_time.h in device file
2022-05-23 09:12:54 -05:00
Jakob Bornecrantz
08d100d7b0
d/hydra: Depend on util
2022-05-23 09:12:54 -05:00
Jakob Bornecrantz
0d055bb740
d/vive: Fix threading primitive initialization
2022-05-23 13:54:42 +00:00
Jakob Bornecrantz
4fa406610f
a/os: Fix fallout from name change
2022-05-20 23:07:33 +01:00
Ryan Pavlik
ea4c14c3aa
a/os: Rename os_thread_helper_stop to os_thread_helper_stop_and_wait
2022-05-20 18:46:37 +01:00
Mateo de Mayo
85bdbc1817
u/aeg: Implement state machine to correct overshooting and avoid oscillations
2022-05-19 14:03:17 +00:00
Mateo de Mayo
63b477d250
a/math: Add MIN, MAX and CLAMP macros
2022-05-19 14:03:17 +00:00
Mateo de Mayo
df5b5f40a9
d/wmr: Add auto exposure
2022-05-19 14:03:17 +00:00
Mateo de Mayo
84422acd74
d/wmr: Centralize exposure and gain update logic
...
Also use the new draggable_u16 UI input for exposure.
2022-05-19 14:03:17 +00:00
Ryan Pavlik
6706180cd8
drivers: Improve 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
df413a3809
d/ht: Fix doxygen warnings
2022-05-17 14:42:02 -05:00
Ryan Pavlik
0e4f40c980
d/wmr: Fix doxygen warning
2022-05-17 14:42:02 -05:00
Moses Turner
8ac95a5177
d/ht: Add some things to the WMR creation interface, and make it the default interface.
2022-05-16 19:15:33 +01:00
Jakob Bornecrantz
85d4a72d0f
d/psmv: Fix NULL check
2022-05-15 21:40:26 +01:00
Jakob Bornecrantz
6a2426c0a2
d/psmv: Refactor device creation in preperation of builders
2022-05-15 14:45:01 +01:00
Jakob Bornecrantz
ddb142564f
d/psvr: Refactor device creation in preperation of builders
2022-05-15 14:45:01 +01:00
Jakob Bornecrantz
23ed0a6632
xrt: Remove unused xdev argument to trackers
2022-05-14 22:40:36 +01:00
Moses Turner
5122ecd0b0
d/dai: Fisheye calibration was upstreamed, actually use it now
2022-05-12 20:01:15 +00:00
Jakob Bornecrantz
116d1a9bf8
xrt: Typedefs have a _t suffix
2022-05-12 11:59:12 +00:00
Jakob Bornecrantz
a38ea4231c
d/vive: Use prober helper code
2022-05-12 11:59:12 +00:00
Jakob Bornecrantz
b9d88f4eab
d/wmr: Use prober helper code
2022-05-12 11:59:12 +00:00
Moses Turner
e8776fd705
d/dai: Add little xrt_device implementation for head tracking
2022-05-10 23:47:30 +01:00
Moses Turner
5ba7ae3c53
d/dai: Add initial IMU support
2022-05-10 23:47:30 +01:00
Moses Turner
af5516f4b6
d/dai: We didn't need this calibration struct for anything
2022-05-10 23:47:30 +01:00
Jakob Bornecrantz
6b19eedf9c
d/survive: Use shared bindings
2022-05-09 10:46:44 +00:00
Jakob Bornecrantz
456f9c7f09
d/vive: Use shared bindings
2022-05-09 10:46:44 +00:00
Mateo de Mayo
1a687cdee4
d/wmr: Add initial hand tracking for WMR devices
...
Co-authored-by: Moses Turner <moses@collabora.com>
2022-05-07 15:53:56 +00:00
Mateo de Mayo
7e1f9a7964
t/hand: Add option for allowing xfctx to be managed externally
...
Other trackers (e.g., psmv, slam, etc) work as sinks and the xfctx that manages
them is handled by the device providing the data streams. This change helps
the hand tracker have a more similar interface to other trackers.
2022-05-07 15:53:56 +00:00
Mateo de Mayo
44dac0eb5d
d/wmr: Refactor UI and tracker initialization into their own methods (NFC)
2022-05-07 15:53:56 +00:00
Mateo de Mayo
e3fadb5364
doc: Fix some doxygen warnings
2022-05-07 15:53:56 +00: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
Moses Turner
a5024060eb
d/dai: Autodetect OAK-D vs OAK-D Lite
...
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-04 13:43:43 +00:00
Jakob Bornecrantz
e791f3ea2f
d/android: Fix various bugs
2022-05-03 14:22:34 +00:00
Jakob Bornecrantz
243c2e5326
d/psvr: Fix conversion warnings
2022-05-02 17:16:04 +01:00
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