Commit graph

1033 commits

Author SHA1 Message Date
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
Mateo de Mayo 67a5946778 xrt: Add units to xrt_imu_sample fields
After using the structure a bit more, and realizing that while different components
sometimes use different units, it is easier to force them to send the imu_samples
in a standardized unit.
2021-10-06 16:41:18 -03:00
Moses Turner 5abd3b3570 d/ht: Switch to new get_hand_tracking signature and update tracking 2021-10-02 23:09:36 +01:00
Moses Turner 322d5b8f2d d/remote: Switch to new get_hand_tracking signature 2021-10-02 23:09:25 +01:00
Moses Turner 621681ffb4 d/vive: Switch to new get_hand_tracking signature 2021-10-02 23:09:14 +01:00
Moses Turner 9f0de997d1 d/ulv2: Switch to new get_hand_tracking signature 2021-10-02 23:08:12 +01:00
Moses Turner 193dcc8776 d/survive: Switch to new get_hand_tracking signature 2021-10-02 23:08:09 +01:00
Moses Turner bec03a09bc d/multi: Switch to new get_hand_tracking signature 2021-10-02 23:08:06 +01:00
Moses Turner b067d3b0c2 d/vf: Fix typo 2021-10-02 23:05:16 +01:00
Mateo de Mayo a409ed6141 d/rs: Fix build errors and warnings when compiling without a SLAM dependency 2021-10-01 23:22:16 -03:00
Moses Turner 140a39f9c4 d/ns: move ns_hmd_create to ns_hmd.h 2021-10-01 13:54:19 -05:00
Simon Zeni 036eb19343 d/ht: fix stack overflow on hand detection 2021-09-30 14:30:22 -04:00
Jakob Bornecrantz c8d57a4ff3 d/vive: Add some more tracing 2021-09-29 21:38:33 +00:00
Jakob Bornecrantz 98c1cb5358 d/vive: Add tracing support focusing on device message processing 2021-09-29 21:38:33 +00:00
Christoph Haag d2e64d8b75 d/survive: Add SURVIVE_LH_GEN env var
On some systems libsurvive gets randomly confused and misdetects lh2 as lh1.
This causes the config to be pruned and is very annoying.
2021-09-29 23:03:20 +02:00
Mateo de Mayo 6f20b6d88f d/rs: Add host-SLAM tracked device (hdev)
This device was tested on a D455 but should work on any other RealSense camera
that supports camera and IMU streams (even the T265), given that you properly
configure the external SLAM config file.
2021-09-28 16:11:42 -03:00
Mateo de Mayo 95e22ae7c8 d/rs: Implement new probing logic to choose between ddev and hdev creation
Also adds a rs_container to keep track of RealSense created objects that
are useful to have during execution.
2021-09-28 16:07:14 -03:00
Mateo de Mayo 961c7c8ed1 d/rs: Rename 6dof to ddev
This commit introduces the term `ddev` for a "Device-SLAM tracked device",
it will be useful to differentiate itself from the `hdev`
("Host-SLAM tracked device") that will be introduced in next commits.

Note that "config_realsense" json field was renamed to "config_realsense_device"
and the device's serial (used for tracking overrides) changed from
"Intel RealSense 6-DOF" to "Intel RealSense Device-SLAM".
2021-09-28 16:07:08 -03:00
Mateo de Mayo f70752aeda d/qwerty: Fix tracking overrides and correct multi typo 2021-09-28 16:07:03 -03:00
Mateo de Mayo debdb11e02 t/slam: Miscelaneous NFC changes
- Use @todo instead of TODO for doxygen
- Improve the slam_tracker interface documentation
- Move euroc functions declared by macros into extern C
2021-09-28 12:49:36 +00:00
Mateo de Mayo 1a5af03111 t/slam: Move pose corrections into the tracked devices
This discards the pose correction logic used that was for the D455 not for
an euroc dataset. It will be reintroduced in a later commit with an
appropriate device.
2021-09-28 12:49:36 +00:00
Mateo de Mayo 0b7f3d92ef d/euroc: Use new debug frame sinks 2021-09-20 14:59:18 +00:00
Jakob Bornecrantz 9bfabdf706 d/ht: Disable sink variable tracking 2021-09-17 13:39:50 +01:00
Jakob Bornecrantz 5d4adebbbe d/euroc: Disable sink variable tracking 2021-09-17 13:39:50 +01:00
Jakob Bornecrantz 8ccd0c3dff d/v4l2: Use u_sink_debug for debugging 2021-09-17 13:39:50 +01:00
Mateo de Mayo 6de1ab8f8e d/euroc: Add euroc device 2021-09-15 19:03:55 +00:00
Mateo de Mayo 3c618ec20c d/euroc: Improve euroc player
- Implement xrt_slam_source instead of xrt_fs
- Merge intermediate sink pointers into xrt_slam_sinks in_sinks
- Add out_sinks for downstream passage of data
- Make speed playback option a double (float was not precise enough)
- Add use_source_ts playback option to optionally use original dataset timestamps
- Fix colored datasets not working
2021-09-15 19:03:55 +00:00
Moses Turner 56f34d23b9 d/vive: Use m_relation history for HMD 2021-09-15 12:13:14 -05:00
Moses Turner 7f88583d37 d/survive: Use m_relation_history for HMD and controllers 2021-09-15 12:13:14 -05:00
Moses Turner f9d540aee0 d/rs: Use m_relation_history for 6DOF 2021-09-15 12:13:14 -05:00
Moses Turner 7f69dc795f d/ht; aux/util: Move ringbuffer implementation into aux/util 2021-09-15 12:13:00 -05:00
Moses Turner ee429ac279 d/ht: make blackbar work with non-square inputs 2021-09-14 14:09:03 +01:00
Jakob Bornecrantz 5192e82948 d/ht: Tidy includes 2021-09-13 21:47:05 +01:00
Jakob Bornecrantz 4cdfadf3e0 d/ht: Tidy view creation 2021-09-13 21:47:04 +01:00
Christoph Haag cc53994b4f d/survive: Count ahead of time how many configs to wait for
On recent libsurvive versions, loading the config of the HMD takes quite
long when only a HMD is active without controllers.

Instead of adjusting the timeout value all the time, rework how we wait for
the device configs.

Previously we just waited for device configs to arrive until no new configs
arrive for a predefined timeout.
Now we count how many objects of interest libsurvive actually knows, and then
only wait until the configs for this many devices are loaded.

This should make initialization of the survive driver faster and more robust.
2021-09-04 02:35:59 +02:00
Moses Turner d7fc516cfb d/vive: Use hand tracking if VIVE_USE_HANDTRACKING is set 2021-09-03 21:06:18 +00:00
Moses Turner db4a50410c d/survive: Use hand tracking if there aren't any controllers
rebase-survive
2021-09-03 21:06:18 +00:00
Moses Turner 624a676f56 d/ht: Change everything 2021-09-03 21:06:18 +00:00
Moses Turner efbc4cd9e5 d/survive: Allow users to set wait time through config_v0.json
Necessary for Moses - for some reason, with no controllers, his headset takes forever to probe
2021-09-03 21:06:18 +00:00
Moses Turner 815aa47ac2 d/vf: Add new format for stereo hand tracking 2021-09-03 21:06:18 +00:00
Jakob Bornecrantz 992642bdf8 d/vive: Tidy warning 2021-09-01 22:00:46 +01:00
Jakob Bornecrantz 407461fd4f d/vive: Silence warnings from when the camera is running 2021-09-01 22:00:46 +01: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
Jakob Bornecrantz 601a6832b8 d/vive: Use u_device_free to free distortion mesh data 2021-08-20 17:09:05 +01:00
Jakob Bornecrantz df484c508d d/vive: Tidy 2021-08-20 16:56:15 +01:00
Jakob Bornecrantz d61cf5dc78 d/vive: Make sure to properly destroy controller 2021-08-20 16:56:15 +01:00
Jakob Bornecrantz a89c8309c7 u/vive: Pass in logging level to parse function 2021-08-20 13:42:11 +01:00
Jakob Bornecrantz 00aca14832 u/vive: Add vive_config_teardown function to free any pointers that needs freeing. 2021-08-20 13:42:11 +01:00
Moses Turner 6dcf10a4fc d/rs: clean up device list 2021-08-20 12:28:30 +01:00
Moses Turner 74c93f83f7 d/survive: Use u_device_free to free distortion mesh data 2021-08-20 12:28:22 +01:00
Moses Turner e8907afeed d/rs: Free JSON 2021-08-20 12:28:19 +01:00
Jakob Bornecrantz 003ade3006 d/ht: Don't leak when we can't create the hand-tracker tracker 2021-08-19 23:20:24 +01:00
Moses Turner a1574312d2 d/v4l2: more paranoid logging 2021-08-18 13:17:17 -05:00
Jakob Bornecrantz f27b50ff5a d/dummy: Add option to rotate around up axis 2021-08-17 12:04:49 +01:00
Jakob Bornecrantz a6bdf92fd0 d/vf: Remove debug message 2021-08-16 21:18:52 +01:00
Moses Turner b2ef01af10 d/vf: Add trace marker 2021-08-16 21:18:46 +01:00
Jakob Bornecrantz fb92a3f27f d/vf: Add tracing support 2021-07-16 15:29:27 +00:00
Jakob Bornecrantz a6a5b3dda6 d/vf: Refactor frame handling 2021-07-16 15:29:27 +00:00
Jakob Bornecrantz f04a113693 d/vf: Tidy 2021-07-16 15:29:27 +00:00
Christoph Haag be0b4f496a d/ulv2: fix maybe uninitialized warning
../src/xrt/drivers/ultraleap_v2/ulv2_driver.cpp: In function 'void* leap_input_loop(void*)':
../src/xrt/drivers/ultraleap_v2/ulv2_driver.cpp:290:29: warning: 'hi' may be used uninitialized in this function [-Wmaybe-uninitialized]
  290 |                         int hi; // hand index
      |                             ^~
2021-07-15 01:35:49 +02:00
Christoph Haag 86e42858b7 d/qwerty: Add reasonable alternative code paths for asserts
In release builds asserts will be disabled, so we should try to handle the
assert cases reasonably.

This commit fixes several unused variable warnings when asserts are disabled.
2021-07-15 01:19:13 +02:00
Christoph Haag 2b94b2b165 d/ns: Fix may be used uninitialized warnings 2021-07-15 01:10:40 +02:00
Jakob Bornecrantz 94d029ed15 d/dai: Add tracing support 2021-07-09 20:23:49 -05:00
Jakob Bornecrantz 09513d73af d/v4l2: Add tracing support 2021-07-09 21:43:21 +01:00
Jan Schmidt 8192e74f76 d/wmr: Compute visible region for render rectangle.
Use the distortion function to calculate the visible limits of the
display and then configure the rendered FoV angles accordingly.
2021-06-26 03:52:32 +10:00
Jan Schmidt dfe932ffd7 d/wmr: Add an extensible headset map.
Add a mechanism for recognising known headsets and handling specific
init/deinit sequences for those that need it.
2021-06-26 03:52:29 +10:00
Dan Weatherford 6bb3577b1b d/wmr: Implement Lenovo explorer support.
Recognise the Lenovo explorer device
2021-06-26 03:52:29 +10:00
Jan Schmidt bad625965a d/wmr: Extract JSON configuration from the firmware.
Pull in the WMR config obfuscation key and extract the JSON
calibration data.

Based on a patch from Dan Weatherford <sabretooth@gmail.com>
2021-06-26 03:52:26 +10:00
Dan Weatherford 3ca80e9607 d/wmr: Add functions to read raw config data
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2021-06-26 03:52:26 +10:00
Jan Schmidt 0cf7b4a9b3 d/wmr: Add render distortion configuration
Take the parameters from the headset configuration and the existing
render FoV, and use them to instantiate a distortion mesh.

TODO: Reverse the distortion in order to calculate good FoV range
that covers the full view for each headset.
2021-06-26 03:52:23 +10:00
Jan Schmidt f663727b07 d/wmr: Add some groundwork for config parsing.
Sketch out some groundwork for parsing WMR config blocks,
using some hard-coded values from my headset for now. Later,
this will be parsed from the headset JSON blob.
2021-06-26 03:52:16 +10:00
Moses Turner 7461c57043 cmake: make ulv2 build a little better 2021-06-23 23:40:43 +01:00
Jakob Bornecrantz 47470cc8e2 d/ns: Use fread when reading from config file 2021-06-21 12:29:31 -05:00
Moses Turner 3569e4f2ed d/ns: Fix 3D distortion FOV calc
co-authored-by: Nico Zobernig <nico.zobernig@gmail.com>
2021-06-21 12:29:31 -05:00
Moses Turner bcadbea3aa d/ns: Clean utility_northstar a bit 2021-06-21 12:29:31 -05:00
Moses Turner 7e385aa810 d/ns: Big refactor 2021-06-21 12:29:31 -05:00
Christoph Haag ccb9777a47 d/vive: Set hand tracking values to actives
fixes !716 which introduced the need for setting hand joint active status.
2021-06-16 23:17:07 +02:00
Moses Turner 6285223fd2 d/dai: Even more tidy 2021-06-11 18:49:50 +01:00
Jakob Bornecrantz 576593010f d/dai: Add code so we can open mono cameras with compile time option 2021-06-11 16:48:30 +00:00
Jakob Bornecrantz 96248931cc d/dai: Refactor a bit so we can at compile time support OAK-D 2021-06-11 16:48:30 +00: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 606b23b5c4 d/rs: Tidy code (NFC) 2021-05-18 03:48:50 +01:00
Moses Turner 5cb130cd08 d/rs: cleanup and initialize u_config_json with zero 2021-05-18 01:22:39 +00:00
Jae Lee df9ebf261f d/illixr: Update ILLIXR driver. 2021-05-16 22:59:32 +00:00
Moses Turner 302e72b2fe d/rs: remove superfluous rs_update_offset; add config options 2021-05-13 17:57:34 -05:00
Jakob Bornecrantz 5c916fd77d d/illixr: Use u_device_get_view_pose helper 2021-05-04 16:37:51 +00:00
Ryan Pavlik 348b7dff3a d/wmr: fix doxygen warning 2021-05-04 11:21:46 -05:00
Ryan Pavlik 4ef5b65487 d/wmr: Fix typo 2021-04-30 17:57:50 -05:00
Ryan Pavlik ad31345986 d/qwerty: Fix doxygen warnings.
Comments were a bit too clever to work across doxygen versions.
2021-04-30 17:34:21 -05: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
Jakob Bornecrantz daccde940e d/wmr: Fix accel axis conversion 2021-04-28 23:26:09 +00:00
Moses Turner f09e02c517 d/ns: fix resolution from 2880x1440 to 2880x1600 2021-04-28 18:07:07 -05:00
Ryan Pavlik c6a3dec08e doc: Rename sample NorthStar config for file extension reasons, and add schema 2021-04-28 21:13:34 +00:00
Jakob Bornecrantz 0c685cf7ba d/qwerty: Use u_device_get_view_pose helper 2021-04-27 22:18:39 +00:00
Jakob Bornecrantz b81d3138af d/remote: Assert if st/oxr calls the wrong thing (NFC) 2021-04-27 17:34:28 +01:00
Jakob Bornecrantz 385af79e82 d/survive: Add comment and assert to get_view_pose (NFC) 2021-04-27 17:19:18 +01:00
Jakob Bornecrantz a6b908f3ce d/vive: Add comment and assert to get_view_pose (NFC) 2021-04-27 16:51:56 +01:00
Jakob Bornecrantz 8277df418d xrt: Make eye_relation argument to xrt_device_get_view_pose const (NFC) 2021-04-27 01:44:13 +01:00
Ryan Pavlik 334b59f9fa d/qwerty: Port to new unit-vector defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik 48d043796c d/vive: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik c3ce7f33a0 d/ht: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik 06eab724ec d/remote: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik fde3e631cf d/qwerty: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik 85ea0f8f78 d/oh: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik 71fabf50c5 d/north_star: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Ryan Pavlik e44c6d56c7 d/wmr: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 3b0a6a558c d/vive: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 2d47c496e6 d/survive: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 6682bb0291 d/hdk: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 52c00436c7 d/remote: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 89895be83b d/psvr: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 7c5342efe2 d/oh: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik 2774b3375f d/north_star: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik d45e13642e d/dummy: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Ryan Pavlik f4a1c5344b d/android_sensors: Port to u_device_get_view_pose 2021-04-26 22:38:42 +00:00
Jakob Bornecrantz 1ef79820e6 d/wmr: Clarify struct layout (NFC) 2021-04-23 22:48:56 +01:00
Jakob Bornecrantz 0807ce6ddd d/wmr: Only take the lock once per received packet 2021-04-23 22:47:40 +01:00
Jakob Bornecrantz 13d127035b d/wmr: Remove raw_accel and raw_gyro fields (NFC) 2021-04-23 19:06:05 +01:00
Jakob Bornecrantz 1b4b180e61 d/wmr: Do prediction when returning poses 2021-04-23 18:24:13 +01:00
Jakob Bornecrantz a41a869c71 d/wmr: Rename variables and tidy code (NFC) 2021-04-23 14:50:58 +01:00
Christoph Haag 2b70189b45 d/wmr: log at least one space in trace log
Fixes warnings

../src/xrt/drivers/wmr/wmr_hmd.c:83:16: warning: zero-length gnu_printf format string [-Wformat-zero-length]
   83 |  WMR_TRACE(wh, "");
      |                ^~
2021-04-22 02:41:48 +02:00
Jan Schmidt bc4661aa48 wmr: Don't start reading thread until setup is complete.
Make sure the headset struct is fully configured before
starting the reading thread, otherwise we can get a crash if an
IMU update arrives for processing before the 3dof fusion is
ready.
2021-04-22 03:39:16 +10:00
Ryan Pavlik 4488699e55 d/ultraleap_v2: Add missing copyright/license header, reflow, and fix markdownlint warnings. 2021-04-21 11:14:49 -05:00
Christoph Haag 885a668a03 d/oh: Fix number of inputs for generic controller
fixes memory corruption
2021-04-20 12:43:56 +02: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 26d93c52df d/multi: Use supplied pose input name enum 2021-04-19 12:53:47 +02:00
Christoph Haag 598c1a3b56 d/ohmd: Only set output name if there is an output
This needs to be revisited after OpenHMD gets a proper API for haptic feedback.

closes #119
2021-04-16 16:41:44 +02:00
Jakob Bornecrantz 0e18e1f8b0 d/qwerty: Add SDL include dirs 2021-04-15 21:27:13 +00:00
Moses Turner 7cd2a33737 drivers: switch blend mode to array 2021-04-11 04:08:49 -05:00
Christoph Haag 08e39a1a0e d/survive: Increase device detection timeout
With libsurvive 20127ef1bbb9206c9b429de47b891fc71d9df355 it can take a bit longer for devices to appear.
2021-04-08 19:37:09 +02:00
Jakob Bornecrantz 98f81734c8 d/vf: Add clock overlay to videotestsource 2021-04-03 03:07:21 +01:00
Jakob Bornecrantz 1155106dc1 d/v4l2: Be more tolorant for long pipelines 2021-04-03 03:07:21 +01:00
Christoph Haag 3a60df33aa d/openhmd: Add support for rift CV1 controllers 2021-04-02 15:48:10 +00:00
Jakob Bornecrantz 9695e90d95 d/vive: Setup the variable tracking for imu fusion 2021-04-02 16:00:42 +01: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
Moses Turner b319371500 d/survive: for now always set xrt_hand_joint_set->is_active to true 2021-04-01 02:02:26 +02:00
Moses Turner d54b653751 d/multi: correctly override hand pose for "attached" tracking 2021-04-01 02:02:26 +02:00
Christoph Haag 4061bf7707 d/multi: Add "attached" tracking override type
Example usage: Leap Motion attached to a Northstar headset.
2021-04-01 02:02:26 +02:00
Mateo de Mayo 5c6158cc8b d/qwerty: Implement controller pose reset 2021-03-29 15:42:01 -03:00
Mateo de Mayo 5e6c4b63a5 d/qwerty: Implement controller parenting to HMD
Although, it only works for the qwerty HMD.
2021-03-29 15:42:01 -03:00
Mateo de Mayo 7f00ca3da2 d/qwerty: Improve selection of default controller 2021-03-29 15:41:59 -03:00
Mateo de Mayo 8b81afeb59 d/qwerty: Implement haptic output 2021-03-29 15:41:25 -03:00
Mateo de Mayo 4ea696bfdd d/qwerty: Implement select and menu click inputs 2021-03-29 15:41:25 -03:00
Mateo de Mayo 582a287dd4 d/qwerty: Use u_logging.h with QWERTY_LOG env var 2021-03-29 15:41:25 -03:00
Mateo de Mayo ef74e24abe d/qwerty: Add variable tracking widget to UI 2021-03-29 15:41:25 -03:00
Mateo de Mayo a1b70c746b d/qwerty: Add qwerty_system for driver management 2021-03-29 15:41:25 -03:00
Mateo de Mayo f8f14a1d9e d/qwerty: Move left/right controllers with CTRL/ALT
In qwerty_sdl.c the u_device_assign_xdev_roles function is used for
knowing which devices are being used by the user. These could
be other physical devices. And as such the idea of a default focused
device is introduced and depends upon which devices the user already
has. With this change qwerty devices should be properly introduced
to fill any device the user may not have.
2021-03-29 15:41:25 -03:00
Mateo de Mayo 62e05f267a d/qwerty: Add still qwerty controllers
By making an initial inheritance hierarchy, thus separating qwerty_hmd
from qwerty_controller, both inheriting from qwerty_device
2021-03-29 15:41:25 -03:00
Mateo de Mayo e13a6fc2fd d/qwerty: Add QWERTY_ENABLE environment variable 2021-03-29 15:41:25 -03:00
Mateo de Mayo 183ee4f4ee d/qwerty: Implement mouse input and sprinting 2021-03-29 15:41:25 -03:00
Mateo de Mayo ec340fabe2 d/qwerty: Implement WASDQE and arrow keys HMD movement 2021-03-29 15:41:25 -03:00
Mateo de Mayo 12d52193da d/qwerty: Connect the debug UI to the Qwerty driver
It was necessary to add a list of xdevs to oxr_sdl2_hack_start and to
populate such list from its callees.
That includes sdl2_program.gui_program->xdevs which was not being filled
for the monado-service target.
2021-03-29 15:41:25 -03:00
Mateo de Mayo e6db1fae74 d/qwerty: Implement still HMD creation 2021-03-29 15:41:25 -03: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
Ryan Pavlik 98886d5317 d/multi: Fix contagious doxygen warning. 2021-03-26 17:10:53 -05:00
Christoph Haag 1f25acfa94 d/vive: remove duplicate range record error message 2021-03-24 18:45:00 +00:00
Christoph Haag a2b49138e7 d/vive: change imu range report error->info 2021-03-24 18:45:00 +00:00
Christoph Haag 3ba9a9411a d/vive: change config start report error->info
And clarify the message that it happens for example for powered off controllers.
2021-03-24 18:45:00 +00:00
Christoph Haag f6210be44a d/survive: Change event for unknown object error->info 2021-03-24 18:45:00 +00:00
Christoph Haag f9c2ab7ed7 d/ht: Change hand tracking not set up error->debug 2021-03-24 18:45:00 +00:00
Jakob Bornecrantz 67339a4d7c d/remote: Fix warning 2021-03-24 14:09:13 +00:00
Christoph Haag 857b831e30 d/illixr: Add driver name 2021-03-22 01:25:44 +01:00
Jakob Bornecrantz c73146c6fd d/psvr: Ensure that timestamps are always after each other 2021-03-17 01:10:02 +00:00
Christoph Haag a887ddcc3c d/hdk: Use a mutex for get_tracked_pose 2021-03-09 12:39:12 +00:00
Christoph Haag 5c014193f7 d/vive_controller: Use a mutex for get_tracked_pose and update_inputs 2021-03-09 12:39:12 +00:00
Christoph Haag aa65480607 d/vive: Use a mutex for get_tracked_pose 2021-03-09 12:39:12 +00:00
Christoph Haag 484d63a4eb d/survive: Use thread for processing events
Due to an oversight libsurvive events were only processed when inputs were updated.
If only triggering event processing when an event is needed, we would need to process
a random number of events, causing random overhead.

Rather, follow the model of other drivers and process events in a thread.
This required creating a local copy of the xrt_input arrays.

Fixes #113
Fixes !679

v2: Use a mutex for get_tracked_pose and update_inputs
2021-03-09 12:39:12 +00:00
Mateo de Mayo 75e908552f doc: Fix missing entities from modules documentation 2021-03-06 20:34:35 -03:00
Christoph Haag 12ad9a6766 d/ns: Remove tracker logic in favor of tracking overrides 2021-03-02 19:43:19 +01:00
Christoph Haag ff16eab9df xrt: implement multi device wrappers for tracking overrides
Example config ~/.config/monado/config_v0.json

{
	"active": "tracking",
	"tracking":	{
		"version":	0,
		"tracking_overrides": [
			{
				"target_device_serial": "LHR-E8CC625B",
				"tracker_device_serial": "LHR-1D80A098",
				"offset": {
					"orientation": {
						"x": 0,
						"y": 0,
						"z": 0,
						"w": 1
					},
					"position": {
						"x": 0,
						"y": 0,
						"z": 0
					}
				}
			}
		]
	}
}

v2: Add multi device wrapper
2021-03-02 19:43:19 +01:00
Christoph Haag 13db11901c d/rs: Add prober and create xrt_device for rs 2021-03-02 19:43:19 +01:00
Christoph Haag 6c6c70f700 d/rs: exit early if no realsense device is connected
Previously we only exited after rs2_pipeline_start_with_config timed out.
2021-03-02 19:27:36 +01:00
Christoph Haag aa7b3978b7 d/rs: Initialize offset to identity 2021-03-02 19:27:36 +01:00
Christoph Haag 279520c302 d/survive: Use autoprober interface 2021-03-02 17:50:19 +00:00
Christoph Haag 6914bae78e d/ns: Add autoprober name 2021-03-02 17:50:19 +00:00
Christoph Haag 9ea02ac032 d/vive: Give consistent name to HMD 2021-03-02 17:50:19 +00:00
Christoph Haag 6e852ec9a0 d/survive: Give consistent name to HMD 2021-03-02 17:50:19 +00:00
Christoph Haag 92d94ddcc7 d/psvr: Don't report created device if creation failed 2021-03-02 17:50:19 +00:00
Mateo de Mayo 116d77f52e st/prober: Allow autoprobe function to create more than one device. 2021-02-28 15:27:52 +00:00
Ryan Pavlik 0644521da9 d/ht: Fix typo in docs
Fixes doxygen warning.
2021-02-22 16:50:00 -06:00
Christoph Haag 4d1b5f033a d/vive: Add controller rotation pose prediction 2021-02-17 19:59:59 +01:00
Christoph Haag ab70115a89 d/vive: Add HMD rotation pose prediction 2021-02-17 19:59:52 +01:00
Christoph Haag b77630ba57 d/remote: define _BSD_SOURCE for SOL_TCP on musl 2021-02-15 22:04:38 +01:00
Jakob Bornecrantz a6fe8e8b1e st/prober: Clarify xrt_prober_get_string_descriptor 2021-02-15 16:13:06 +00:00
Christoph Haag d56834f7a9 d/psmv: Use bluetooth mac as serial 2021-02-15 14:55:10 +01:00
Christoph Haag d5e74b959a d/vive: Improve naming scheme 2021-02-12 00:38:52 +01:00
Christoph Haag c66aea3311 d/survive: Improve device naming scheme 2021-02-12 00:38:52 +01:00
Christoph Haag c67a6ccd34 xrt: Add xrt_device::serial for uniquely identifying devices if possible
d: Make controller serials unique by appending number

For drivers that do not (yet) know a persistent unique id per device.
2021-02-12 00:38:51 +01:00
Christoph Haag ea6d6bfb3f d/rs: Use XRT_INPUT_GENERIC_TRACKER_POSE instead of XRT_INPUT_GENERIC_HEAD_POSE 2021-02-12 00:37:43 +01:00
Christoph Haag 9760f6d123 d/survive: Create devices for trackers
They can not be queried yet.
2021-02-12 00:37:43 +01:00
Christoph Haag 7e1408787a d/survive: Update to new API and clean up
* Remove survive_device.{ctrl,hmd}::variant and use variant from config
* Use SurviveSimpleEventType_ConfigEvent to find connected devices
* Use SurviveSimpleEventType_PoseUpdateEvent for pose updates
2021-02-11 20:54:31 +01:00
Christoph Haag 3a02610e77 d/vive: Remove vive_controller_device::variant and use variant from config 2021-02-11 20:54:31 +01:00
Christoph Haag f93209a1ed d/vive: Remove vive_device::variant and use variant from config 2021-02-11 20:54:31 +01:00
Ryan Pavlik d8aad83932 d/ht: Fix mistaken 2029 copyright date. 2021-02-11 09:28:12 -06:00
Jakob Bornecrantz f8941fe5ee d/vf: Declare dependency to avoid build issues 2021-02-02 13:53:48 +00:00
Jakob Bornecrantz 35da4a51ea d/vf: Refactor code to add videotestsrc capability and break out gstreamer detection 2021-02-02 13:53:48 +00:00
Jakob Bornecrantz 5853103820 d/vive: Refactor out vive config code into auxiliary library
fix vive_config.h include for survive
2021-02-01 19:56:52 +01:00
Christoph Haag b87c7d5e61 d/survive: Port to vive_config parsing 2021-02-01 15:23:19 +00:00
Christoph Haag 152587d728 build/cmake: Add vive_config include dir to survive 2021-02-01 15:23:19 +00:00
Christoph Haag e8ac9ecee4 build/meson: Add vive_config include dir to survive 2021-02-01 15:23:19 +00:00
Christoph Haag b2da8dfd07 build/cmake: make vive_config lib and link to vive, libsurvive 2021-02-01 15:23:19 +00:00
Christoph Haag 721b159312 build/meson: make vive_config lib and link to vive, libsurvive 2021-02-01 15:23:19 +00:00
Christoph Haag a2e7e1c3d9 d/vive: Factor out controller config into separate struct 2021-02-01 15:23:19 +00:00
Christoph Haag e4b0e6282d d/vive: Factor out config into separate struct 2021-02-01 15:23:19 +00:00
Christoph Haag 232b8a7a49 d/ns: Fix informational message about example configs
v1 and v2 example configs are now in an exampleconfigs subdir.
2021-01-28 03:41:33 +01:00
Christoph Haag be3c7dc480 d/ns: Pretty print json example config with jq 2021-01-28 03:36:18 +01:00
Jakob Bornecrantz bfdd3a0a5b d/v4l2: More buffers 2021-01-27 16:09:07 +00:00
Jakob Bornecrantz bd257500b8 d/v4l2: Expose more information 2021-01-27 16:09:07 +00:00
Jakob Bornecrantz 17beaf8aa9 u/distortion: A stab in the dark to try and improve Index chromatic aberration 2021-01-25 00:12:03 +00:00
Jakob Bornecrantz 7d755427e3 u/distortion: Filp order of array access in distortion for Vive & Index 2021-01-25 00:12:03 +00:00
Jakob Bornecrantz 0c2d07808c u/distortion: Make Vive & Index distortion center per channel 2021-01-25 00:12:03 +00:00
Dan Weatherford bd381561d8 d/vive: Fix distortion center config parsing 2021-01-23 14:02:31 -06:00
Jakob Bornecrantz 360dbb63a7 d/ns: Work-around clang-format stuff 2021-01-15 16:38:54 +00:00
Jakob Bornecrantz 2b996f30c4 xrt: Reflow after column change 2021-01-15 13:50:32 +00:00
Christoph Haag 9c03f244b0 d/survive: Wait max 5 seconds for HMD and device configs
Sometimes the Index is in weird hardware states and doesn't respond properly.
In such cases, time out after 5 seconds and continue with no HMD present.

Previously we also relied on the controller configs to be already available
once the HMD config was available. In rare cases they were not - wait for
the controller configs with the same timeout.
2021-01-15 00:50:20 +01:00
Lubosz Sarnecki fd58ccecc9 drv/android: Fill in xrt_device str. 2021-01-13 12:33:15 +01:00
Moses Turner a1ed0b293c d/rs: predict pose
d/rs: predict pose
2021-01-12 17:15:40 -06:00
Moses Turner baf0e1acfb d/rs: apply offset to t265 pose, d/ns: fix up some minor things, load realsense offset from json file 2021-01-12 15:28:18 -06:00
Moses Turner fc47d0baad d/ns: fix polynomial distortion math again, document nonsensical parts of polynomial math, update config files 2021-01-12 15:28:18 -06:00
Moses Turner 684daa3293 d/ns: possibly fix mesh calculation
also fix flipped tracking tracking
2021-01-12 13:01:37 -06:00
Moses Turner 365692e9ca d/ns: Hopefully make v2 driver read ipd from baseline in v2 config files 2021-01-12 13:01:37 -06:00
Moses Turner 735d9654ec d/ns: apply right eye fov correctly 2021-01-12 13:01:37 -06:00
Christoph Haag 637b5658da d/survive: Predict poses for requested time 2021-01-11 23:50:01 +00:00
Jakob Bornecrantz fdd87a0239 d/rs: Save a lot more data from the latest pose 2021-01-11 23:50:01 +00:00
Christoph Haag 679a1233ee d/ht: Set up tracking origin with no offset 2021-01-06 13:29:36 +00:00
Christoph Haag d85224e7c3 d/ht: Don't create hand tracking driver without successful init
Fixes a crash when no calibrated camera is found.
2021-01-06 13:29:36 +00:00
Christoph Haag 6d7dff360c d/psmv: Scale rumble value on zcm1
The motor on my psmv controller does not rumble at amplitudes < 0.25.
2021-01-06 13:23:28 +00:00
Jae Lee a71de192e0 illixr: Add initial integration. 2020-12-29 23:44:57 +00:00
Lubosz Sarnecki 853458ed37 xrt: Port commented printfs to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 0302a47e6f d/realsense: Port to static u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 8ce0f73585 d/vive/conteroller: Porting to static u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 0708863e55 d/ohmd: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki e0b2c4ad2e d/ohmd: Make env variables consistent with driver name. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 2dbb6a6bb8 d/daydream: Port to u_logging.
Port static printfs to u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 1ba7d803a0 d/hydra: Port to u_logging.
Port printfs to static u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 00b2778504 d/arduino: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 6a2221115d d/ns: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki a9703f6b39 d/survive: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 2be5e32b67 d/v4l2: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki e6b2c1f2c7 d/vf: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki 1f85d1c2ba d/hdk: Port to u_logging. 2020-12-28 13:04:11 +00:00
Lubosz Sarnecki b1c700a500 d/survive: Ignore -Wignored-qualifiers in survive header. 2020-12-28 13:04:11 +00:00
Christoph Haag d5183336b3 d/ohmd: Add display left rotation for Oculus Rift DK2 2020-12-23 11:51:51 +01:00
Lubosz Sarnecki d55c2b016a d/vf: Use static logging if no object is provided.
Found by clang11 warning.
2020-12-16 15:10:10 +01:00
Lubosz Sarnecki c03decd4d9 d/ht: Remove unused variable. Fixes warning on gcc 10. 2020-12-16 15:02:46 +01:00
Christoph Haag 49202eda87 d/psvr: Make get_tracked_pose thread safe 2020-12-14 02:00:09 +01:00
Christoph Haag f0d21c1dcc d/vf: Add video file playback driver 2020-12-07 12:30:26 +00:00
Christoph Haag e480352cee t/hand: Add hand tracking module 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 f7a8e8810b xrt: Split hand tracking input name into left/right
oxr_hand_tracker now stores which xdev and input name it tracks.
2020-12-07 11:43:51 +00:00
Lubosz Sarnecki cf2fe0e2c3 d/android: Use XRT_DEVICE_GENERIC_HMD device name. 2020-12-01 18:05:32 +01:00
Lubosz Sarnecki d493044e55 d/android: Use display metrics instead of hardcoded Pixel 3 values. 2020-12-01 17:36:15 +01:00
Christoph Haag 3168eb750d d/remote: Only define __USE_MISC if not defined 2020-11-30 15:38:06 +00:00
Christoph Haag 006971ae7a u/hand_tracking: Calculate joint velocities
And return them in the state tracker
2020-11-23 20:42:54 +00:00
Christoph Haag f5ef3985ba xrt: Add support for locating hand joints in action spaces 2020-11-23 20:42:54 +00:00
Christoph Haag d3ccbce76c build: meson: Add remote driver build 2020-11-20 16:14:02 +01:00
Jakob Bornecrantz 5ce0a0b3ab d/remote: Add hand tracking support 2020-11-18 17:37:39 +00:00
Christoph Haag a2b67ab3fe d/ohmd: Rotate rift s display right, not left 2020-11-12 16:04:00 +01:00
Christoph Haag 7ef8d1231d d/ohmd: Update display rotation code 2020-11-12 16:04:00 +01:00
Christoph Haag 9e788df463 xrt: Remove lens center from xrt_view
It's only used internally in drivers now.
2020-11-12 16:04:00 +01:00
Ryan Pavlik a345b07308 d/psvr: Fix typo in config/debug macro 2020-11-10 03:09:07 +00:00
Jakob Bornecrantz 135c93288b d/psvr: Rename some hid variables for better code 2020-11-09 23:42:15 +00:00
Ryan Pavlik 83b91ea4a9 d/ns: Some clang-tidy cleanups 2020-11-09 16:18:00 -06:00
Ryan Pavlik 97d711a9ef d/hdk: Appease clang-tidy a little more. 2020-11-09 16:18:00 -06:00
Ryan Pavlik 4c0d71aa30 d/ns: const correctness cleanup for math. 2020-11-09 16:17:57 -06:00
Ryan Pavlik d4011ed78a d/ns: Fix memory leak in math 2020-11-09 16:06:14 -06:00
Christoph Haag 29820345c7 d/survive: Fix bindings declaration after rebase of MR 587 2020-11-06 16:36:09 +01:00
Christoph Haag ffa7cc84c8 d/vive: Add device bindings 2020-11-05 14:44:04 +00:00
Christoph Haag 4b261219a2 d/survive: Add device bindings 2020-11-05 14:41:55 +00:00
Jakob Bornecrantz 12df35232a d/psmv: Add device bindings 2020-11-05 14:41:55 +00:00
Jakob Bornecrantz 24a3886e85 d/daydream: Add device bindings 2020-11-05 14:41:55 +00:00
Jakob Bornecrantz 5997708634 d/arduino: Add device bindings 2020-11-05 14:41:55 +00:00
Jakob Bornecrantz 2a9a0100bc d/psvr: Tidy code 2020-11-04 13:26:47 +00:00
Ryan Pavlik f70b1abd88 d/android: Use not-deprecated API when possible. 2020-10-30 18:20:36 -05:00
Lubosz Sarnecki ae1d4e9541 d/android: Enable cardboard distortion. 2020-10-30 18:20:36 -05:00
Lubosz Sarnecki f4113ef15b d/android: Add Android sensors driver. 2020-10-30 18:20:35 -05:00
Jakob Bornecrantz 09ba7fc1e3 d/remote: Fix warning when building with clang 2020-10-29 16:17:20 +00:00
Jakob Bornecrantz d72776b82c d/psvr: Switch to logging API 2020-10-26 22:41:49 +00:00
Jakob Bornecrantz 6fd1e7b36c d/dummy: Add logging to variable tracking 2020-10-26 22:41:27 +00:00
Jakob Bornecrantz 02a3b47f7c d/dummy: Switch to logging API 2020-10-26 22:17:15 +00:00
Jakob Bornecrantz 3611193feb d/dummy: Tidy file 2020-10-26 22:14:05 +00:00
Christoph Haag f910367014 d/oh: Add startup delay for Rift S and rotate left 2020-10-21 01:26:53 +02:00
Jakob Bornecrantz 3483a7286d d/remote: Add remote driver 2020-10-15 21:07:40 +00:00
Christoph Haag c0a5b3b76c d/survive: Implement haptic feedback 2020-10-13 19:39:28 +02:00
Christoph Haag 0dcde4a597 d/vive: Actually Use defined values for default haptic frequency and min haptic duration 2020-10-13 19:39:28 +02:00
Christoph Haag 270a4143c7 d/vive: Use defines for minimum haptic frequency and unspecified haptic frequency 2020-10-13 19:39:25 +02:00
Christoph Haag d959bea54a d/vive: curl thumb when touching a button 2020-10-12 22:55:33 +02:00
Christoph Haag 05f65e0028 d/survive: curl thumb when touching a button 2020-10-12 22:55:33 +02:00
Christoph Haag f8088c1fa4 d/survive: Add fingertracking and refactor
Get controller config at startup & determine variant.
2020-10-12 22:55:33 +02:00
Christoph Haag 5164488225 d/vive_controller: Add finger tracking 2020-10-12 22:55:33 +02:00
Christoph Haag 2a07c1034e d/ns: Don't create rs tracker twice on v1 2020-10-12 16:06:25 +02:00
Jakob Bornecrantz 96046d1315 d/ohmd: Use new none distortion code 2020-10-07 23:45:45 +01:00
Jakob Bornecrantz 7baf90d3d8 d/hdk: Use new none distortion code 2020-10-07 23:45:43 +01:00
Jakob Bornecrantz cd2ea960b9 d/dummy: Use new none distortion code 2020-10-07 23:45:41 +01:00
Christoph Haag dc29c3f97e build/meson: Build daydream and arduino driver when dbus is enabled 2020-10-05 16:05:02 +00:00
Jakob Bornecrantz 6ec6c2eac9 d/dummy: Make view rotate slightly with time 2020-10-01 23:49:12 +01:00
Jakob Bornecrantz 9f39410b64 d/dummy: Make the view move slightly with time 2020-10-01 15:50:51 +01:00
Jakob Bornecrantz 9a675cc7f3 xrt: Rename xrt_uv_triplet 2020-09-30 15:35:57 +01:00
Christoph Haag bb56e5f3c5 d/openhmd: Make struct oh_device private and refactor 2020-09-30 02:08:03 +02:00
Christoph Haag f6c3998d29 xrt: Use struct vive_values for u_compute_distortion_vive 2020-09-30 02:05:05 +02:00
Christoph Haag 29188d681c xrt: Remove all but mesh distortion values from xrt_hmd_parts::distortion
Move vive values to struct u_vive_values in u_distortion_mesh.
Move openhmd values to private struct inside ohmd driver.
2020-09-30 02:05:05 +02:00
Christoph Haag 2e7451ca5e comp: Support only mesh and no istortion, remove pano and vive shaders
Also changes hardcoded binding indices into variables to make following the code easier
e.g. when adding new UBOs.
2020-09-30 02:05:04 +02:00
Christoph Haag fd883e26bf d/openhmd: Fix distortion_k value ordering
Their order is opposite to the psvr panotools values.
2020-09-30 01:30:30 +02:00
Christoph Haag fb71c71a8c xrt: Replace mesh generator with xdev->compute_distortion()
Each HMD driver now has to implement compute_distortion() which will be called
by the compositor implementation to generate a mesh (usually).

u_distortion_mesh contains implementations for the defaults (panotools, OpenHMD, vive).

Also adds compute_distortion function for Vive distortion

There are differences between OpenHMD and Panotools values, main differences for now:
* psvr has 5 pano coefficients, ohmd has 3
* psvr uses viewport size and lens center in pixels for distortion calculation, ohmd in meter
* psvr uses different distortion scaling than ohmd
2020-09-28 17:04:15 +01:00
Christoph Haag ee8fdb45fd d/ns: remove useless assignments 2020-09-22 02:19:13 +02:00
Christoph Haag 3c0ae7e61e d/dummy: reduce dummy HMD resolution to 720p 2020-09-21 20:37:28 +02:00
Christoph Haag 31539c800e d/ohmd: Add (OpenHMD) suffix to openhmd driver string 2020-09-21 20:37:28 +02:00
Ryan Pavlik dae3ab3a4f xrt: Be sure to include config headers 2020-09-18 13:56:24 +01:00
Ryan Pavlik a0c8839a71 xrt: Remove un-needed includes of unistd 2020-09-18 13:56:16 +01:00
Christoph Haag 17ff908041 d/ns: Set XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT 2020-09-14 16:57:10 +02:00
Christoph Haag 37519dc54d d/dummy: Set XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT 2020-09-14 16:56:54 +02:00
Christoph Haag 150b7649f3 d/survive: Don't fix up invalid pose 2020-09-11 18:52:01 +02:00
Christoph Haag a664bb22bf d/survive: Update to recent libsurvive git
Rewrite input event handling and add new events from libsurvive.
2020-09-11 18:52:01 +02:00
Christoph Haag c3fbe6eaf8 d/survive: remove unused structs 2020-09-11 18:52:01 +02:00
Christoph Haag 357b47522c d/survive: set relation flags properly 2020-09-11 18:52:01 +02:00
Christoph Haag 6133d4cf99 d/survive: Remove out_relation_timestamp_ns 2020-09-11 18:52:01 +02:00
Jakob Bornecrantz 8e24dda794 xrt: Remove out_timestamp argument to xrt_device::get_tracked_pose 2020-09-07 23:37:09 +01:00
Jakob Bornecrantz 74690a2278 d/psmv: Rotate angular velocity to be in base space 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz f9905a4007 d/psmv: Use space graphs for poses 2020-09-07 23:33:28 +01:00
Moses Turner 0ff1865c2e d/ns: Add version 2 config support 2020-09-07 11:35:24 +01:00
Jakob Bornecrantz ea6374d296 d/dummy: Minor comments 2020-09-06 22:53:10 +01:00
Jakob Bornecrantz 787c104339 d/psmv: Use last package timestamp for input changes 2020-09-02 22:08:01 +01:00
Jakob Bornecrantz 2d8a39b731 d/v4l2: Set correct name on variable tracker 2020-09-02 18:36:47 +01:00
Jakob Bornecrantz ffa888a575 d/v4l2: Use different tweaks depending on capture type 2020-09-02 11:57:47 +01:00
Jakob Bornecrantz 6846ab7637 xrt: Add stream capture type 2020-09-02 11:52:59 +01:00
Christoph Haag 330279d330 d/psvr: Set positional tracking bit when tracker is present 2020-09-01 17:03:55 +02: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
Pete Black 3fdce20afd d/psvr: Only power on front LEDs 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz deb5633bf9 d/psmv: Introduce proper grip and aim poses
Correctly rotate the grip pose to follow the spec more closely.
2020-08-27 10:42:05 +01:00
Christoph Haag cd05c86c59 d/ns,rs: Add external slam tracking type 2020-08-19 14:46:55 +02:00
Christoph Haag 7fb0af90de xrt: Add tracking system type for Hydra 2020-08-19 11:06:28 +00:00
Christoph Haag 23bd6a4377 xrt: Add tracking system type for Lighthouse 2020-08-19 11:06:28 +00:00
Christoph Haag 08ed44b22c d/vive,survive: Manually improve values for Valve Index display
These values are hand picked to provide a less stretchy image.
2020-08-17 22:07:22 +02:00
Christoph Haag 518728156b d/northstar: Set positional tracking bit true when built with RS support 2020-08-17 11:51:38 +00:00
Jakob Bornecrantz 132b0c541d d/rs: Use a thread to get the poses
Tested by moses from Discord.
2020-08-17 11:58:18 +01:00
Ryan Pavlik 146218b346 xrt: Some clang tidy fixes.
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Jakob Bornecrantz ec9ecf6332 d/psvr: Fix 3DOF tracking 2020-08-10 16:07:53 +01:00
Christoph Haag ae07036324 d/vive: Demote watchman timeout error message to trace
It's desirable to support running without basestations without spamming messages.
2020-08-05 21:11:24 +00:00
Christoph Haag 3a68f60d47 d/vive: Run watchman poll in separate thread
Watchman polling times out after 1 second when basestations are not present/off.
This should not block reading the IMU.
2020-08-05 21:11:24 +00:00
Christoph Haag 2b20ee1f12 d/vive: close the zlib inflate stream
fixes memory leaks of zlib stream internal state
2020-08-05 20:32:51 +00:00
Christoph Haag 12c0f5d75a d/vive: Destroy watchman hid device on shutdown 2020-08-05 20:32:51 +00:00
Lubosz Sarnecki 9c16f5ed69 d/vive/lighthouse: Handle lighthouse v2 reports.
Poll ligthouse reports in separate function. Check for report sizes
consistently.
2020-07-31 13:30:12 +02:00
Lubosz Sarnecki 04467942c1 d/vive: Add and use vive_lighthouse from ouvrt. 2020-07-31 13:30:12 +02:00
Lubosz Sarnecki bb7d05a918 d/vive: Print report type names.
Be fault tolerant on unexpected report.
2020-07-31 12:45:47 +02:00
Lubosz Sarnecki c3ba93c1ce d/vive: Poll pulse reports.
Make sensor polling function take processing callback and be more
generic.
2020-07-31 12:45:47 +02:00
Lubosz Sarnecki 2db3b6b218 d/vive: Open and enable watchman on Vive, Vive Pro and Index. 2020-07-31 12:45:13 +02:00
Lubosz Sarnecki cbb1dd82da d/vive: Remove unnesseccary clang-format off. 2020-07-31 12:35:03 +02:00
Ryan Pavlik 2cce94799d d/psvr: Fix hidapi include 2020-07-17 13:53:39 -05:00
Ryan Pavlik 4220638afd xrt: use _USE_MATH_DEFINES to make sure M_PI gets defined. 2020-07-17 13:53:39 -05:00
Christoph Haag b073e3dfb9 xrt: Add support for assigned device roles
Abandons the assumption that in oxr_system.xdevs[], index 0 is HMD,
1 is left controller, 2 is right controller.

Now to represent the dynamically assigned roles, oxr_system.role contains
the index for a device in oxr_system.xdevs[] for head, left and right.

This role assignment happens on the client side and currently can not be updated
from the server side.

Also adds an enum that device drivers set indicating allowed assignments
(many controllers are physically designed to be held in a specific hand).

This also adds support for configurations with only a HMD and a right controller.
2020-07-13 18:03:01 +02:00
Christoph Haag 5788fb90a2 drivers: Add rotation/position tracking bool to xdev
xrGetSystemProperties() will return these values to application in XrSystemTrackingProperties
using the xdev assigned to head.
2020-07-13 18:03:01 +02:00
Lubosz Sarnecki 499751e4fa d/vive: Use VIVE_ERROR when vive_device is available. 2020-07-09 14:11:35 +02:00
Lubosz Sarnecki 4d412edaa1 d/vive/protocol: Port to u_logging. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki dce8da5130 d/vive/controller: Port to u_logging. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki 5dff60a93d d/vive: Create common header for controller and hmd. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki dfcff5e806 d/vive/device: Use VIVE_WARN and VIVE_INFO. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki 7121c260ae d/vive/device: Replace old debug macros with new ones. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki 7be5efbe82 d/vive/prober: Prettify logging. rename methods. 2020-07-09 13:38:07 +02:00
Lubosz Sarnecki eaea6888a7 d/vive: Port logging to u_logging. 2020-07-09 13:37:58 +02:00
Jakob Bornecrantz 20501b8e58 d/psmv: Use new log level var tracker 2020-07-03 19:01:55 +01:00
Jakob Bornecrantz c4741cc49f d/psmv: Use new logging level helper 2020-07-03 19:01:55 +01:00
Jakob Bornecrantz ffcc06e099 d/psmv: Use new logging functions 2020-07-03 14:55:44 +01:00
Lubosz Sarnecki fdffbfc68a d/vive/controller: Print spew when receiving lighthouse data. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki 1071d7a50b d/vive/controller: Uncomment and improve spew prints. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki d047ce8af4 d/vive/controller: Add Vive tracker gen 2 support. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki 6662e0caef d/vive/controller: Add Vive tracker gen 1 support. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki 2fd6fe2f16 d/vive/prober: Print error before device init. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki 260cfd8d26 d/vive/controller: Use u_json and move config to vive_config.
To be consistent with the headset implementation, move all config
related code to vive_config and use u_json consistently with static
string sizes.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki 53619fa64e d/vive/controller: Move prober interface to vive_prober.
Create propper initializer for the controller and move the proper
interface to vive_prober to be more consistent with the device. This
will also allow to share more code like the config parsing in a later
patch.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki f33c6356d7 d/vive: Rename vive_controller files.
To be more consistent with the rest of the driver, rename the controller
files to match the others style.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki eb51b89e9c d/vive_config: Move config and json related code to vive_config.
Isolate JSON config related code in vive_config.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki 2580958e2c d/vive: Use functions from u_json.
Uses the old and newly moved u_json functions.
Creates defines to keep short syntax.
Strings are now stored with static sizes in favor of being allocated
dynamically and not freed.
2020-07-02 18:42:42 +02:00