Commit graph

648 commits

Author SHA1 Message Date
Jakob Bornecrantz 3ffa40c628 u/var: Refactor how variables info is passed 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz d5c62f8ccb u/var: Add tracking for filter fifos 2020-09-15 16:41:07 +00:00
Christoph Haag a884e24b9a aux: Support waiting more than 0.999... seconds in os_nanosleep 2020-09-11 18:52:01 +02:00
Christoph Haag 1429d678a0 aux/space: Propagate orientation valid bit through space graph resolve
Invalid poses may be handled more gracefully in the future. For now poses
are not transformed if orientation is not valid, because transforming with
an invalid quaternion will have bad results in any way.

v2: Upgrade poses with valid position but invalid orientation to valid poses
2020-09-11 18:51:58 +02:00
Christoph Haag 6cce04f8d3 aux/space: fix typo: propagate tracked orientation bit properly 2020-09-09 14:51:06 +02:00
Jakob Bornecrantz eaffa05a37 xrt: Remove acceleration components from xrt_space_relation 2020-09-07 23:36:34 +01:00
Jakob Bornecrantz 5a4d45bbaa m/base: Remove old space relation functions 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz fe94dec5ea m/space: Space graph functions 2020-09-07 23:33:25 +01:00
Jakob Bornecrantz ca91695722 m/quat: Add math_quat_rotate_derivative 2020-09-07 16:14:46 +01:00
Jakob Bornecrantz 4f94ee0c91 u/render_timing: Improve debug printing 2020-09-04 13:48:40 +01:00
Jakob Bornecrantz 328f5d5315 m/base: Add math_quat_invert 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 511a51b283 m/3dof: Rename to timestamp 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 8cdfe0e694 m/fifo: Add f64 filter fifo 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 991c9029c7 m/3dof: Tweak values 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 736fa81349 m/3dof: Add vars tracking helper function 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 33f05c7bea m/vec3: Add C++ operators 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz d396117a39 m/vec2: Add C++ operators 2020-09-02 22:07:35 +01:00
Pete Black 3f197eeffd t/psmv: Use the same filtering as in PSVR tracker 2020-08-28 11:38:03 +00:00
Pete Black 76a439bd59 t/psvr: Add a functional PSVR tracker 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz b3c5bf1517 math: Add a permutation library 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz d3b224275c u/logging: Fix return of debug_get_log_option_SUFFIX 2020-08-28 11:38:03 +00:00
Pete Black 751fdb2884 u/render_timing: Paranoia 2020-08-28 11:38:03 +00:00
Ryan Pavlik 9d19ab2755 u/misc: Improve docs of calloc macros. 2020-08-26 11:26:46 -05:00
Ryan Pavlik 581f59a2eb vk: Add an Android function to the vk_bundle 2020-08-26 16:31:38 +01:00
Jakob Bornecrantz 62fd80ff8d aux/vk: Print a little bit more when failing on usage 2020-08-26 14:28:10 +00:00
Christoph Haag 6dc4a1f237 aux/vk: Report appropriate errors on unsupported image usage flags 2020-08-24 10:18:12 +02:00
Christoph Haag 370f6820aa m: Generalize math_matrix_4x4_quad_model, making scaling a vec3 2020-08-21 02:11:03 +02:00
Christoph Haag fbe390813c vk: Add update_buffer helper function 2020-08-21 02:11:03 +02:00
Christoph Haag cf5596adba comp: Use CLAMP_TO_EDGE for swapchains
Avoids sampling black at the edges of layers.
2020-08-21 02:09:20 +02:00
Ryan Pavlik 3b8c8ddc1a xrt: Move the android globals functionality to the new android aux lib. 2020-08-19 16:07:00 -05:00
Ryan Pavlik a57507518d aux/android: New aux library, add image allocator for Android 2020-08-19 16:06:30 -05:00
Ryan Pavlik fa34c65ed3 xrt: Make xrt_image_native::size optional.
Not all allocators can supply it.
2020-08-19 16:06:30 -05:00
Ryan Pavlik e48f68deb6 aux/ogl: Add helper header for OpenGL. 2020-08-19 16:06:30 -05:00
Ryan Pavlik 430f79a7ca aux/util: Add u_android for global state. 2020-08-19 11:01:10 -05:00
Ryan Pavlik e092345292 aux/vk: Port to using u_handles 2020-08-13 17:34:05 -05:00
Ryan Pavlik 129c1a9ac4 a/util: Add u_handles module. 2020-08-13 17:34:05 -05:00
Ryan Pavlik e52539d1a3 aux/vk: Fix compile time conditionals 2020-08-13 17:34:05 -05:00
Ryan Pavlik 9087d1c7a9 xrt: Use our generic graphics buffer typedefs all over.
This adds some Android support in composition clients,
and fixes the breakage from 2 commits ago.

Thanks to Jakob for finding my error in an earlier version.
2020-08-13 17:34:05 -05:00
Ryan Pavlik 475192ec73 xrt: Rename "fd" references to "handle"
This breaks some Android pieces, which will be fixed shortly.
2020-08-12 17:11:42 -05: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 cd9da1c1e1 aux/vk: Make xrt_swapchain_create_info const 2020-08-07 17:00:10 +01:00
Christoph Haag e48c748a57 xrt: suggest correct GPU in xrGetVulkanGraphicsDevice()
As before, on the service side the GPU index the compositor runs on can be selected with
* XRT_COMPOSITOR_FORCE_GPU_INDEX=INDEX1

By default xrGetVulkanGraphicsDevice() will suggest the same GPU the compositor runs on.

It is also possible to override the GPU index suggested to applications with
* XRT_COMPOSITOR_FORCE_CLIENT_GPU_INDEX=INDEX2

The reason this is both done on the service side is that if compositor and client run
on different GPUs, the swapchains use linear tiling instead of optimal tiling.

To make chosen GPUs comparable across the compositor's and the client's vulkan instance,
VkPhysicalDeviceIDProperties.deviceUUID is used.
2020-08-07 17:01:13 +02:00
Jakob Bornecrantz 3a7a86aafc vk: Refactor VkImageUsageFlags code into helper function 2020-08-06 14:28:23 +00:00
Jakob Bornecrantz ce7da3941c vk: Add support for XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT 2020-08-06 14:28:23 +00:00
Ryan Pavlik 07f2e62e76 aux/vk: vk_create_semaphore_from_fd -> vk_create_semaphore_from_native 2020-08-05 20:50:00 +00:00
Ryan Pavlik d8ad620bd2 xrt: Update GLAD again, to a "merged" distribution.
This merges the OpenGL and OpenGL-ES code.
2020-08-05 20:50:00 +00:00
Lubosz Sarnecki 87a5c425cf a/math: Add math_vec3_normalize. 2020-07-31 12:45:47 +02:00
Lubosz Sarnecki 7c8febd03d u/logging: Add U_LOG_IFL. 2020-07-31 12:45:47 +02:00
Jakob Bornecrantz 727e3bc2a6 vk: Add image allocator helper 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz a8a4e80746 vk: Use xrt_swapchain_create_info in vk_create_image_from_native 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz 5a9fa0a7e6 vk: Remove unused vk_image 2020-07-20 13:50:01 +00:00
Ryan Pavlik 47a66e1bdf build: Use OpenGLES CMake module to gate OpenGL|ES support 2020-07-17 15:17:42 -05:00
Ryan Pavlik 6f56d91c05 xrt: Add separate build config for OpenGL ES 2020-07-17 15:17:42 -05:00
Ryan Pavlik 910a3aae75 external: Update GLAD and add missing header 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
Ryan Pavlik 8b954e12c1 build: Add missing jpeg include dir 2020-07-17 13:53:39 -05:00
Ryan Pavlik cb69223532 aux: Move responsibility for clearing image FD to the helper. 2020-07-17 11:46:22 -05:00
Ryan Pavlik 1aa2cdb89a build: Move determination of Vulkan usage to build system.
Vulkan is still required for most actual uses of Monado, but this
makes the coupling weaker.
2020-07-16 10:17:30 +00:00
Ryan Pavlik 54f56716fd xrt: Rename references to compositor/swapchain/image_fd to ..._native.
Reflecting that the native buffer isn't an FD on all platforms.
2020-07-15 09:11:58 -05:00
Lubosz Sarnecki 261facd9f1 u/json: Fix a -Wmaybe-uninitialized on GCC 10.1.0. 2020-07-10 17:18:41 +02:00
Lubosz Sarnecki 8e682fdd1b u_logging: Format logging output.
To be in line with other log prints, put the log level first.
For better readability, put the function in [braces].
Remove ":" as separator between level and function.
2020-07-09 13:38:07 +02:00
Ryan Pavlik b2b2b0f4af u_logging: Fix comments/doxygen 2020-07-08 09:15:51 -05:00
Jakob Bornecrantz 9848f8b4b8 u/var: Add log level tracker 2020-07-03 19:01:55 +01:00
Jakob Bornecrantz be0430a38c u/debug: Add function to get logging level 2020-07-03 18:58:34 +01:00
Jakob Bornecrantz b26c8135ae u/*: Use new logging functions 2020-07-03 14:55:44 +01:00
Jakob Bornecrantz 38685eba38 u/log: Add logging helpers 2020-07-03 14:33:54 +01:00
Lubosz Sarnecki 166346ad6e u/json: Add u_json_get_matrix_3x3.
As seen in Vive driver.
2020-07-02 18:42:37 +02:00
Lubosz Sarnecki a9db6fbd40 u/json: Add fprintf error messages. 2020-07-02 18:42:37 +02:00
Lubosz Sarnecki 0bdd1133e4 u/json: Add u_json_get_vec3_array.
As seen in Vive driver.
2020-07-02 18:42:30 +02:00
Jakob Bornecrantz 5bad87690f ipc: Avoid deadlocks due to render timing helper not getting data in time 2020-07-01 13:22:03 +01:00
Jakob Bornecrantz 83081f9cc1 u/render_timing: Add helper code for frame timing 2020-06-24 00:56:45 +01:00
Jakob Bornecrantz f5359b655e os/threading: Add semaphore 2020-06-23 21:31:03 +01:00
Jakob Bornecrantz ef282c7df2 os/time: Add function to convert to a timespec struct 2020-06-23 21:31:03 +01:00
Jakob Bornecrantz e8d62d948f aux/vk: Add helper to create image view with component swizzles 2020-06-18 13:48:10 +01:00
Christoph Haag 7a1dbbe8a1 st/oxr: Ensure quaternion is normalized in xrLocateViews()
In rare cases the state tracker's pose transformations resulted in a quaternion
that accumulated float precision errors such that the norm of the quaternion was
not within float precision of 1.0 anymore.

Introduce a function math_quat_ensure_normalized() that can be used after multiple
operations have been performed on a quaternion.
2020-06-17 13:03:34 +02:00
Benjamin Saunders f81f568931 aux/vk: Add helper to translate usage bits to Vulkan bits 2020-06-16 00:01:48 +00:00
Benjamin Saunders fe734bb6e2 aux/vk: Add functions to create semaphores from FDs 2020-06-16 00:01:48 +00:00
Benjamin Saunders 3f744331e1 aux/vk: Declare consistent usage for xr swapchain images 2020-06-16 00:01:48 +00:00
Benjamin Saunders 27d2163f37 aux/vk: Delete nonsensical image usage case 2020-06-16 00:01:48 +00:00
Benjamin Saunders f45f482d5e aux/vk: Store Vulkan queue handle directly 2020-06-16 00:01:48 +00:00
Ryan Pavlik 821706e0e4 u/hashmap: Add "empty" function.
Used for cleanup assertions to start with: i.e. at some known point,
the hash map should be empty.
2020-06-15 17:04:00 -05:00
Ryan Pavlik bc6cc85e7d xrt: Improve doxygen documentation. 2020-06-03 16:28:18 -05:00
Lubosz Sarnecki 435d5a9b9e c/comp: Remove internal Vulkan validation init.
Instead of maintaining this chunk of code and build options, the Vulkan
loader can be used to load up validation. This has the advantage that no
layer name needs to be hard coded inside Monado, which was subject of
change recently.

Instead of using our own environment variable we can easily set the one
from the loader, e.g. `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`.
2020-06-03 11:17:51 +00:00
Jakob Bornecrantz ebd5773fb8 util: Add function for u_hashset to allocate a item 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 0d2a24b9a0 util: Add a index fifo 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz ace4d0e825 os/threading: Incude xrt_compiler.h 2020-05-29 23:36:23 +01:00
Lubosz Sarnecki fc271ad5da aux/math: Add function to calculate quad model matrix. 2020-05-28 22:16:57 +00:00
Lubosz Sarnecki 68c5eecb96 aux/vk: Add image helper struct and functions. 2020-05-28 22:16:56 +00:00
Lubosz Sarnecki 589c7e4fef aux/vk: Add buffer helper structs and functions. 2020-05-28 22:16:56 +00:00
Lubosz Sarnecki 905040319a aux/vk: Use optimal tiling in vk_create_image_simple.
Fixes an validation issue on NVIDIA and should bring more performance.
2020-05-28 22:16:56 +00:00
Jakob Bornecrantz 9d791cdfd3 math: Use non-squared 'length' of quat in validation
Correctly validate quaternion using non-squard "length" instead of squard
"length", certain combinations of elements would produce valid regular "length"
but not valid squard ones.
2020-05-28 15:50:47 +01:00
Jakob Bornecrantz ef41cf2088 u/time: Use a very large hammer to "fix" time_state 2020-05-27 17:50:06 +01:00
Jakob Bornecrantz ac38679641 r/debug: Fix ODR rule violation
Closes #79
2020-05-12 22:06:10 +01:00
Ryan Pavlik 4638b0af7b build: Switch all CMake options to XRT_... to match what's used in source.
Also revise other small related parts of the build to make them more clear and consistent.
2020-05-12 11:52:51 -05:00
Lubosz Sarnecki e8d273bc41 aux/vk: Add vkFlushMappedMemoryRanges. 2020-05-11 20:22:51 +01:00
Lubosz Sarnecki 54985b110a aux/vk: Add descriptor set functions. 2020-05-11 20:22:50 +01:00
Lubosz Sarnecki f131739c00 aux/vk: Take VkExtent2D and VkImageUsageFlags in vk_create_image_simple. 2020-05-11 20:21:58 +01:00
Lubosz Sarnecki c09beb9efb aux/vk: Add vk_get_access_flags. 2020-05-11 20:21:58 +01:00
Lubosz Sarnecki 06ce79272d aux/vk: Add vk_check_error macro. 2020-05-11 20:21:58 +01:00
Lubosz Sarnecki 6aa1b4e571 aux/math: Add function to calculate view matrix from pose. 2020-05-11 20:21:58 +01:00
Lubosz Sarnecki 0b6d97ec8f aux/math: Add matrix_4x4 identity and matrix_4x4_muliply. 2020-05-11 20:21:58 +01:00
Jakob Bornecrantz 1744715a5d u/file: Do not print errors 2020-05-07 22:25:44 +00:00
Christoph Haag 344846b3e2 aux/vk: Print available GPUs with XRT_COMPOSITOR_PRINT_DEBUG
Useful for finding out a gpu index to use for XRT_COMPOSITOR_FORCE_GPU_INDEX.
2020-05-05 15:12:08 +02:00
Ryan Pavlik 974c68dead xrt: Re-arrange build to avoid unnecessary includes.
Avoid unintentionally including cJSON from the source tree when using system,
etc. This adds granularity to the usage of "external" sources.
2020-04-28 21:36:46 +00:00
Jakob Bornecrantz c7903e2d5e u/sink: Add support for XRT_FORMAT_UYVY422 2020-04-28 11:46:31 +00:00
Jakob Bornecrantz 1de7eb7cc9 t/calibration: Add support for XRT_FORMAT_UYVY422 2020-04-28 11:46:31 +00:00
Jakob Bornecrantz 7602e555b0 xrt: Add the format XRT_FORMAT_UYVY422 2020-04-28 11:46:31 +00:00
Jakob Bornecrantz 59b7794172 xrt: Rename XRT_FORMAT_YUV422 to XRT_FORMAT_YUYV422 2020-04-28 11:46:31 +00:00
Christoph Haag 74a328e909 u/json: Add json getter
u_json_get() is much, much shorter than cJSON_GetObjectItemCaseSensitive().
2020-04-28 10:22:42 +00:00
Ryan Pavlik 75d5e5b9f2 t/psmv: Fix FTBFS on PPC.
Apparently EIGEN_PI isn't a double by default.
2020-04-27 20:18:31 +00:00
Ryan Pavlik 7fab448cf0 build: Support building with system cJSON.
Fixes #62.
2020-04-24 20:34:53 +00:00
Jakob Bornecrantz 0ad9a7406c os/threading: Add #pragma once 2020-04-22 21:59:20 +01:00
Jakob Bornecrantz e37d8f4cf5 xrt: Remove timestate from xrt_device interface 2020-04-16 17:29:34 +01:00
Jakob Bornecrantz 48957b97c2 os/time: Fix warnings on C++ 2020-04-16 14:51:08 +01:00
Jakob Bornecrantz 76f83364e3 os/ble_dbus: Check if bluetooth is available
Closes #65
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz 530cbf0d6c os/ble: Detect errors better 2020-04-16 13:48:34 +00:00
Jakob Bornecrantz ded6a8a4b9 os/ble_dbus: Fix return check 2020-04-16 13:48:34 +00:00
Jakob Bornecrantz 061dbefbd0 u/threading: Add a new higher level threading helpers 2020-04-15 17:33:35 +00:00
Lubosz Sarnecki 8d3a0938fa aux/vk: Add vkResetFences. 2020-04-15 16:43:57 +02:00
Jakob Bornecrantz 231d39185e t/file: Remove hacky file handling functions 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz 7b049a9d65 t/file: Expose non-hack version of the calibration data save function 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz f47c384b79 u/json: Add bool getter function 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz b5dd07f2fa u/file: Add file helpers 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz 817ec2f2bc u/hashset: Fix ISO C++ warning 2020-04-07 16:19:55 +01:00
Jakob Bornecrantz 46f51e8139 os/ble: Fix memory leak if we fail to find a device 2020-04-03 17:21:55 +01:00
Lubosz Sarnecki 1b7b8c163f comp: Further remove unused struct field initializers. 2020-04-01 12:50:10 +00:00
Lubosz Sarnecki b6d8d4b458 comp: Don't initialize unused fields in Vulkan structs.
In order to save redundancy with initializing empty fields with NULL / 0
values and improve readability of the Vulkan code.

This patch also uses struct initializers where possible.

This essentially reverts 1eae45212e.
2020-04-01 12:50:10 +00:00
Ryan Pavlik bc53be8562 t/imu_fusion: Clean up and improve comments 2020-03-26 12:00:26 +00:00
Ryan Pavlik 86b3d9f587 t/calibration: Provide read-only access to size as cv::Size in calibration wrapper 2020-03-26 12:00:26 +00:00
Ryan Pavlik 4f5e2aea4e aux/tracking: Fix the API that led to the error I hit. 2020-03-26 12:00:26 +00:00
Ryan Pavlik c6a574191d aux/tracking: Add image undistort/normalize cache mechanism 2020-03-26 12:00:26 +00:00
Ryan Pavlik cf883817c2 t/psmv: Retrieve more data from camera calib. 2020-03-26 12:00:26 +00:00
Ryan Pavlik d198e93fcb external: Update flexkalman 2020-03-26 12:00:26 +00:00
Jakob Bornecrantz 622c848fa2 t/calib: Silence missing reference warning 2020-03-25 16:32:16 +00:00
Jakob Bornecrantz 3e5da414f7 aux/math: Add 3DOF imu fusion 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz f2ebe74748 aux/math: Add a simple imu pre-filter 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 23a66eb031 aux/math: Add math_matrix_3x3_rotate_vec3 function 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 18373730a8 aux/math: Expand the vec3 functions 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 21e77b85d7 aux/math: Add quat from angle vector function 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz e3516061bb u/var: Add expand RO values 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz f8847912a7 os/ble: Fix error on not finding any device 2020-03-13 11:07:32 +00:00
Jakob Bornecrantz 6ecc1e30f3 xrt: Make stereo_camera_calibration refcounted
This allows the data to be safely shared and passed around, even allowing us
to tag frames with the data and passed around that way instead.

Since it now can be passed around more safely make the prober call the save
function instead of the calibration code. This then forms a basis for further
work where we can hook this up into a more proper configuration file.
2020-03-11 22:00:54 +00:00
Pete Black 6b4ec70d14 aux/os: Add D-Bus based BLE code 2020-03-11 21:36:49 +00:00
Pete Black 8597ad5ee8 u/bitwise: Add bitwise manipulator functions 2020-03-11 21:36:49 +00:00
Jakob Bornecrantz 0b63cb2da3 aux/math: Add vec2 squared length function 2020-03-11 20:37:20 +00:00
Jakob Bornecrantz 119dc283af u/mesh: Fix file brief 2020-03-11 20:37:20 +00:00
Jakob Bornecrantz 622320904a xrt: Misc tidy of u_var_timing 2020-03-09 20:01:38 +00:00
Christoph Haag e8ccb07db7 st/gui: Add compositor frame timing graph to debug ui 2020-03-09 12:59:12 +01:00
Jakob Bornecrantz 59f0d0ff0a u/time: Use smaller xrt_config_os.h instead of xrt_config.h 2020-03-05 11:25:50 +00:00
Ryan Pavlik 46c9fa7c2b build: aux_util depends on aux_math. 2020-03-04 17:25:27 -06:00
Ryan Pavlik 92205ab5be build: Refactor CMake build to use static libraries instead of object bundles.
This allows transitive dependencies to work easier and improves compatibility.
It takes a little bit more storage at build time, and possibly a little extra time.
2020-03-04 11:15:35 +00:00
Ryan Pavlik f3eac87504 xrt: Correct usage of XRT_MAYBE_UNUSED on functions.
It shouldn't be used on a function marked "static inline" - that's
sufficient to avoid the warning. So, it should almost never be in
a header.
2020-03-04 11:15:35 +00:00
Ryan Pavlik 5a633905de t/psvr: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 2aa3b27695 aux/vk: Fix 32-bit warning 2020-03-03 10:50:41 +00:00
Ryan Pavlik 4d7a8d819c util/hashset: Add missing include. 2020-03-03 10:33:14 +00:00
Jakob Bornecrantz 0619190d2b build: Refactor how config defines are handled
With loads of changes from Ryan.
2020-03-03 10:33:14 +00:00
Ryan Pavlik 807438bb69 os/time: Remove XRT_MAYBE_UNUSED usages.
static inline is sufficient to avoid warnings about unused functions.
2020-03-02 14:01:18 -06:00
Ryan Pavlik 31ee6a1966 os/time: Documentation. 2020-03-02 13:59:06 -06:00
Ryan Pavlik fca21e83b0 aux/util: Provide a conversion function from CLOCK_MONOTONIC nanoseconds to adjusted time. 2020-03-02 12:34:19 -06:00
Ryan Pavlik 227e53d030 os/time: Clean up comments and ifdefs. 2020-03-02 12:24:49 -06:00
Jakob Bornecrantz 09aa8794b2 aux/vk: Refactor out helper code into own library 2020-03-02 11:58:40 +00:00
Jakob Bornecrantz 63ca028b83 t/hsv: Improve latency when debugging by pushing debug frame after all other frames 2020-02-29 16:20:41 +00:00
Jakob Bornecrantz d375843b65 os/time: Add time getting and conversion functions
For Linux it is based on CLOCK_MONOTONIC.
2020-02-27 13:55:57 +00:00
Jakob Bornecrantz 039e29e7ad u/time: Tidy 2020-02-27 13:55:48 +00:00
Jakob Bornecrantz 7207c50992 math: Add filter fifo helper 2020-02-18 13:33:22 +00:00
Nova d48022d55d u/json: Add a lot more helper functions 2020-02-09 21:06:47 +00:00
Nova 4cfd4c4657 math: Added vec3 math functions 2020-02-09 21:06:47 +00:00
Ryan Pavlik f3803f7365 t/imu: Update docs to specify units for gyro. 2020-01-31 17:19:54 +01:00
Ryan Pavlik afd5328bd6 t/imu: Add optional debug prints to simple IMU fusion.
By request of @pblack.
2020-01-31 17:19:48 +01:00
Ryan Pavlik a11ba04b96 aux/tracking: handle loading into empty mat 2020-01-31 17:19:48 +01:00
Ryan Pavlik 85761db12c aux/math: Update comment 2020-01-31 17:19:48 +01:00
Ryan Pavlik eaf834249b t/calib: Verify that storage location doesn't move for wrappers. 2020-01-31 10:47:52 +01:00
Jakob Bornecrantz 8aee77401b t/calib: Tweak printing and move assert to after printing 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz be75fe823a t/calib: Fix default asymmetrical circles rows values 2020-01-26 19:37:37 +00:00
Pete Black a80ef43339 t/calib: Also accept L8 frames 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz c14d709a85 u/sink: Better error printing in converters 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz 405f68c98a u/sink: Convert handle YUV888 to RGB888 as well 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz 50b3794816 u/sink: Add quirk support for Leap Motion Conrtoller 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz 16eb05e089 u/sink: Make quirk sink creation parameters into a struct. 2020-01-26 19:37:37 +00:00
Jakob Bornecrantz f16230a2d5 u/sink: Add a converter sink that accepts yuv, yuyv or l8 2020-01-26 19:37:36 +00:00
Pete Black f45f69c9f2 u/sink: Add a deinterleaver sink 2020-01-26 19:37:36 +00:00
Jakob Bornecrantz 1bcf13ba7e u/mesh: Refactor and document 2020-01-26 16:00:14 +00:00
Jakob Bornecrantz ef4798ab1c u/var: Add pose tracking 2020-01-25 16:37:46 +00:00
Jakob Bornecrantz 38fbb1d7ad u/var: Use a macro to only write list once 2020-01-25 14:54:44 +00:00
Ryan Pavlik 798fa623ea u_json: Add array helper. 2020-01-24 21:42:43 +00:00
Jakob Bornecrantz c2560ae6d2 xrt: Switch to new quirking sink
This is done in one commit as split out they would leave the code
in a fairly broken state.
2020-01-17 14:31:50 +00:00
Jakob Bornecrantz 6603882a2d u/sink: Add new quirking sink 2020-01-17 14:31:45 +00:00
Jakob Bornecrantz 30e9338aba t/calib: Don't lose any pixels in stereo rectification 2020-01-17 14:01:52 +00:00
Jakob Bornecrantz 1085db150b t/calib: Fix rectify for stereo fisheye camera 2020-01-17 14:00:22 +00:00
Jakob Bornecrantz ba10152765 t/calib: Print out rectify matricies 2020-01-17 14:00:22 +00:00
Jakob Bornecrantz 67d33550cf t/calib: Change how default arguments are applied 2020-01-17 12:09:08 +00:00
Jakob Bornecrantz d1af0b7f15 t/calib: Play around with mono calibration a bit 2020-01-16 22:34:04 +00:00
Jakob Bornecrantz 62013c142b t/helper: Introduce a small debug frame helper 2020-01-16 18:15:21 +00:00
Jakob Bornecrantz 50eda5a262 t/hsv: Copy stereo format to result frame 2020-01-16 17:47:08 +00:00
Jakob Bornecrantz 5d6ed6973c u/sink: Copy stereo format to result frame 2020-01-16 17:47:08 +00:00
Ryan Pavlik c957072dfc t/calib: Remove references to left and right from new structs 2020-01-16 09:14:07 -06:00
Ryan Pavlik 81acc290cb t/calib: Clean up emplace_back calls. 2020-01-16 09:14:07 -06:00
Ryan Pavlik 2d20f2066a t/psmv: Update existing blob tracker to work with simpler input 2020-01-16 09:12:50 -06:00
Ryan Pavlik 91fdfd0c94 t/file: Have matrix reader be more careful about loading, and optionally transpose
The, actually consistently use result of matrix read and built-in transpose to simplify code
2020-01-16 09:08:32 -06:00
Ryan Pavlik bc49fd4803 t/calib: Use cv::Mat_<> for wrappers since the element type is known 2020-01-16 09:08:32 -06:00
Ryan Pavlik fcdebc6e9d aux/tracking: Re-organize structs related to camera calibration.
Removes the "raw" data structures for camera calibration, not needed.
The only thing they contained beyond the revised regular structures
was derived data that the consumer might parameterize differently.

Renames t_settings_stereo to t_stereo_camera_calibration.
The calibration info is data (that could be stored on the device, etc),
not settings.
2020-01-16 09:07:52 -06:00
Jakob Bornecrantz 771006f97b t/calib: Fix OpenCV type-related assertions and some perf enhancments
Pre-reserve, use emplace to avoid copies.
This is a combination of Ryan's patches and mine.

t/calib: performance improvements
t/calib: Fix doxygen warning
t/calib: Fix asserts and some perf enhancments
2020-01-16 00:02:56 +00:00
Ryan Pavlik 9790ca7602 t/calib: Add interface for getting some status info on calib process. 2020-01-14 15:55:50 -06:00
Ryan Pavlik 47f704277a xrt: Let BUILD_TRACKING mean you need more than just the IMU fusion.
This is required to build anything that uses the IMU fusion module
without OpenCV.
2020-01-14 11:51:12 -06:00
Jakob Bornecrantz 5bf65b41fa math: Add some more functions 2020-01-14 15:59:41 +00:00
Jakob Bornecrantz 796d9c49ec t/calib: Support stereo fisheye in the config file 2020-01-14 15:42:31 +00:00
Jakob Bornecrantz 4ae650a006 t/calib: Support stereo fisheye in stereo calibration 2020-01-14 15:42:31 +00:00
Jakob Bornecrantz 0e6b908f80 t/callib: Move stereo calibration to new interaction 2020-01-14 15:42:31 +00:00
Jakob Bornecrantz 7082a599c7 xrt: Make it possible for the device set active status on inputs 2020-01-13 21:59:37 +00:00
Jakob Bornecrantz 998b198b44 math: Fix math_pose_invert 2020-01-13 10:37:14 +00:00
Jakob Bornecrantz 7618f4c5a4 math: Make it possible to get a rotation from a rotation matrix 2020-01-09 15:22:14 +00:00
Jakob Bornecrantz eda46d3bea util: Add some wrapper files around cJSON
This makes cJSON files be accessible from everywhere in Monado,
and adds a nice place to add common helpers.
2020-01-09 15:21:04 +00:00
Ryan Pavlik 56f8e3272e a/tracking: clang-tidy 2019-12-07 18:25:36 +00:00
Ryan Pavlik ceb600167c u/var: Clang tidy and make param names consistent/expressive 2019-12-07 18:25:34 +00:00
Ryan Pavlik 4f6b4761cb aux/util: Add U_ARRAY_REALLOC_OR_FREE to safely wrap realloc. 2019-12-03 09:39:06 -06:00
Jakob Bornecrantz ba9fd61bb8 u/sink: Reject frames that don't have a valid JPEG header 2019-11-23 00:01:05 +00:00
Jakob Bornecrantz cdec2ca367 t/calib: Add resolution size to image name 2019-11-22 23:59:35 +00:00
Jakob Bornecrantz ab0d94201a t/calib: s/grey/gray/g 2019-11-22 15:53:17 +00:00
Jakob Bornecrantz 6cba920668 t/calib: Force the principal point to the center of the image 2019-11-22 15:51:58 +00:00
Jakob Bornecrantz 9b60bd7c77 t/calib: Add support to load images 2019-11-22 14:20:56 +00:00
Jakob Bornecrantz 0cbd3e8601 t/calib: Do not fix principal point and tweak balance 2019-11-22 14:19:22 +00:00
Jakob Bornecrantz 392b42e900 t/calib: Don't double wait for frame after finding a measurement 2019-11-22 14:09:29 +00:00
Jakob Bornecrantz 3f202d0d6f t/calib: Make cooldown period separate from wait period 2019-11-22 12:36:23 +00:00
Jakob Bornecrantz 86dc9e1a6b t/calib: Re-organize parameters and make it possible to select board type 2019-11-22 12:36:23 +00:00
Jakob Bornecrantz de67590bbf t/calib: Tweak defaults 2019-11-21 22:43:04 +00:00
Jakob Bornecrantz 504a34bc95 t/calib: Tidy messages 2019-11-21 22:43:04 +00:00
Jakob Bornecrantz 276e81c373 t/calib: Add option to mirror RGB image 2019-11-21 22:40:00 +00:00
Jakob Bornecrantz 94c55fc206 t/calib: Ensure that camera is still before taking measurment 2019-11-21 22:40:00 +00:00
Jakob Bornecrantz 50d28369c4 m/headers: Rename C++ headers to hpp and tidy headers 2019-11-21 14:54:17 +00:00
Jakob Bornecrantz 54f7c2ed1d t/headers: Rename C++ headers to hpp and tidy headers 2019-11-21 13:00:52 +00:00
Jakob Bornecrantz d6317b2a14 st/gui: Expose new parameters to calibration 2019-11-20 23:50:42 +00:00
Jakob Bornecrantz 587c71182b t/calib: Make it possible to use fisheye functions (mono only) 2019-11-20 23:50:26 +00:00
Jakob Bornecrantz a36af4227f t/calib: Make it possible to save images used during calibration (mono only) 2019-11-20 23:49:56 +00:00
Jakob Bornecrantz 26d7e91615 t/calib: Even more docs 2019-11-20 22:05:23 +00:00
Jakob Bornecrantz 4925ea657f t/calib: Add support for [asym]circles grid, not active right now 2019-11-20 22:05:23 +00:00
Jakob Bornecrantz bd02e47078 t/calib: Add mono calibration 2019-11-20 22:05:16 +00:00
Jakob Bornecrantz 49f9a1a46f t/calib: Add stub for hacking in measurments 2019-11-20 22:03:20 +00:00
Jakob Bornecrantz 6bc617b8e3 t/calib: Tidy TermCriteria 2019-11-20 22:03:20 +00:00
Jakob Bornecrantz 645a45c167 t/calib: Tweak default params 2019-11-20 22:03:20 +00:00
Jakob Bornecrantz c16756c330 t/calib: Ensure everything have initializers 2019-11-20 22:03:20 +00:00
Jakob Bornecrantz ebb41601ed t/calib: Some doc-comments and typedefs to clarify code 2019-11-20 22:03:20 +00:00
Jakob Bornecrantz 79b7d2504a t/calib: Expand mono calibration a bit 2019-11-18 19:14:02 +00:00
Jakob Bornecrantz b358e22fd7 t/calib: Stub in support for mono calibration 2019-11-17 22:11:41 +00:00
Jakob Bornecrantz ad45aeb0a7 t/calib: Refactor loading a bit more 2019-11-17 22:09:01 +00:00
Jakob Bornecrantz 2ad2243fe7 t/doc: Do not put directory in aux_tracking group 2019-11-16 23:29:29 +00:00
Jakob Bornecrantz 38ec113c04 t/calib: Add comments to sizes 2019-11-16 23:29:10 +00:00
Jakob Bornecrantz 8917607a49 t/calib: Also expose disparity_to_depth on both raw and refined settings 2019-11-16 23:27:32 +00:00
Jakob Bornecrantz 6d8abd87a8 t/calib: Tidy and rename calibration data to settings 2019-11-16 23:17:11 +00:00
Jakob Bornecrantz f364b7a45b t/calib: Make prober load calibration data instead of trackers 2019-11-16 12:17:07 +00:00
Jakob Bornecrantz 5a600ffbcf t/calib: Make destroy funcitons take pointer to pointer 2019-11-16 11:42:33 +00:00
Jakob Bornecrantz ee3d9d08f6 u/time: Send in a pointer to pointer to the timekeeping destroy function 2019-11-15 20:30:01 +00:00
Jakob Bornecrantz 786e67f189 u/time: Mark exported functions as C to get even better errors 2019-11-15 20:28:24 +00:00
Jakob Bornecrantz 419f038017 t/calib: Also save the fisheye distortion always 2019-11-14 17:05:16 +00:00
Jakob Bornecrantz f9599a6763 t/imu: Make sure imu_fusion is aligned 2019-11-14 16:35:56 +00:00
Ryan Pavlik e01cf5efd3 t_imu: Actually return non-zero leftover acceleration data. 2019-11-14 12:14:58 +00:00
Ryan Pavlik 2823193302 t_imu_fusion: Add capability to get world non-gravity acceleration 2019-11-14 12:14:58 +00:00
Ryan Pavlik 21352ca338 t_imu: Add param for accelerometer output 2019-11-14 12:14:58 +00:00
Ryan Pavlik a17413744b t_calibration: clang-tidy 2019-11-14 12:14:58 +00:00
Ryan Pavlik 4d411723a1 t/psvr: Fix parameter names 2019-11-14 12:14:58 +00:00
Ryan Pavlik e9d64c4c41 a/math: Clang-tidy 2019-11-14 12:14:58 +00:00
Ryan Pavlik 0a9efbf443 t_imu: Comments 2019-11-14 12:14:58 +00:00
Ryan Pavlik 958c1b7df9 t_imu_fusion: Perform some filtering of accelerometer signal 2019-11-14 12:14:58 +00:00
Ryan Pavlik 29c630cec8 d/psvr: Port PSVR to use timestamps 2019-11-14 12:14:58 +00:00
Ryan Pavlik 194938c405 d/psmv: Port positional tracking to use t_imu_fusion with timestamps 2019-11-14 12:14:58 +00:00
Ryan Pavlik 7bb9fad5e6 t_imu_fusion: adjust to use timepoints directly 2019-11-14 12:14:58 +00:00
Ryan Pavlik 7314bd75b7 t_imu: Change C API to take timestamps instead of dt 2019-11-14 12:14:58 +00:00
Ryan Pavlik 1440c95f78 t/psmv: Angular rate limit. 2019-11-14 12:14:58 +00:00
Ryan Pavlik 83f652bda1 aux/tracking: Add low-pass IIR filter 2019-11-14 12:14:58 +00:00
Ryan Pavlik af0515232f t_imu_fusion: Fix initialization of orientation from accelerometer. 2019-11-11 18:14:44 -06:00
Ryan Pavlik 08903e67b3 u_var: Update comments/prototypes. 2019-11-11 18:14:14 -06:00
Ryan Pavlik 355476d6b7 aux/tracking: Remove accidentally-left-in parameters from t_imu 2019-11-11 17:57:40 -06:00
Ryan Pavlik 5eaced0e4d aux/tracking: Use define for standard gravity 2019-11-11 17:57:40 -06:00
Ryan Pavlik 8a0ab71c09 t_imu: Comments. 2019-11-11 17:57:40 -06:00
Jakob Bornecrantz c6e6ba7485 t/psmv: Expose ball last position to debug gui 2019-11-10 01:36:44 +00:00
Jakob Bornecrantz 47bc4de56d t/doc: Fallout from latest codespell version 2019-11-09 12:53:42 +00:00
Jakob Bornecrantz 072e9afb54 t/psvr: Counter tracking origin offset
At least until we have proper tracking for the PSVR.
2019-11-03 14:23:03 +00:00
Ryan Pavlik e8660a18bd build: Use CMAKE_POSITION_INDEPENDENT_CODE instead of target props.
Reduces repetitive code.
2019-11-01 16:51:54 -05:00
Jakob Bornecrantz 46b9d28e8d t/imu: No fancy new c++ syntax until clang-format-8 is used on CI
Go to your room clang-format and think about what you have done.
2019-10-29 20:08:59 +00:00
Jakob Bornecrantz ef6931b7f9 aux/util: Refactor mesh generation 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz b403da22eb aux/util: Add distortion mesh generation 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz b67d65b4a5 aux/util: Add function to free device and stuff hanging off it 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz cdafcda626 math: Add some vec2 functions 2019-10-25 13:05:54 +00:00
Ryan Pavlik 6b0f18bf6e tracking: Build kalman things as a single TU 2019-10-24 18:51:21 +02:00
Ryan Pavlik 1ce0124d5c t/psmv: Simple two-state machine for tracking. 2019-10-24 15:45:41 +01:00
Ryan Pavlik af85f6af6b t/psmv: Reset filter if we get non-finite 2019-10-24 15:44:01 +01:00
Ryan Pavlik 28abcf7ce6 t/psmv: Filter the blobs selected 2019-10-24 15:44:01 +01:00
Ryan Pavlik c713ca61f2 t/psmv: Rotate IMU into something like camera space 2019-10-24 15:44:01 +01:00
Lubosz Sarnecki a1d729af8f os/hid: Add os_hid_get_feature_timeout. 2019-10-22 19:18:47 +02:00
Jakob Bornecrantz 24bc8135e0 t/hsv: Add a debug sink 2019-10-19 23:15:51 +01:00
Jakob Bornecrantz f38f631fe8 aux/util: Add special r8g8b8x8 or l8 converter 2019-10-19 23:15:48 +01:00
Ryan Pavlik f4f07da0c2 t/file: Comment matrix sizes since entirely generic matrix types used. 2019-10-15 20:50:32 +02:00
Ryan Pavlik bc081bee80 t/psmv: cleanup/comments 2019-10-15 20:50:32 +02:00
Jakob Bornecrantz f8ee9281f8 t/calibration: Move more data storage to C portion 2019-10-13 10:48:07 +01:00
Jakob Bornecrantz 43c366ad41 t/file: Save more calibration data 2019-10-12 22:07:49 +01:00
Jakob Bornecrantz 9ec1205f37 t/api: Add comments and put all files in tracking group 2019-10-12 12:24:19 +01:00
Jakob Bornecrantz a435817a6f t/file: Add comments and restyle (NFC) 2019-10-12 12:23:42 +01:00
Jakob Bornecrantz fece0458b6 t/psmv: Make it possible to get the tracked ball pose 2019-10-11 15:40:42 +01:00
Drew DeVault bca5899fcc meson: fix build with 0.52+ 2019-10-10 23:21:27 +00:00
Jakob Bornecrantz bffe802449 t/psmv: Adjust room position in prober instead 2019-10-10 23:47:51 +01:00
Ryan Pavlik 3630dae537 t/psmv: FindLowestScore template param renames
Less terse
2019-10-10 21:48:09 +00:00