The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

h/mercury: Add debug instrumentation header

So that we can run automated tests on our hand tracking

+57 -25
+55
src/xrt/tracking/hand/mercury/hg_debug_instrumentation.hpp
··· 1 + // Copyright 2023, Collabora, Ltd. 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Debug instrumentation for mercury_train or others to control hand tracking. 6 + * @author Moses Turner <moses@collabora.com> 7 + * @ingroup tracking 8 + */ 9 + 10 + #pragma once 11 + 12 + #include "hg_interface.h" 13 + 14 + #include "util/u_var.h" 15 + 16 + 17 + #ifdef __cplusplus 18 + namespace xrt::tracking::hand::mercury { 19 + extern "C" { 20 + #endif 21 + 22 + struct hg_tuneable_values 23 + { 24 + bool new_user_event = false; 25 + struct u_var_draggable_f32 after_detection_fac; 26 + struct u_var_draggable_f32 dyn_radii_fac; 27 + struct u_var_draggable_f32 dyn_joint_y_angle_error; 28 + struct u_var_draggable_f32 amount_to_lerp_prediction; 29 + struct u_var_draggable_f32 amt_use_depth; 30 + struct u_var_draggable_f32 mpiou_any; 31 + struct u_var_draggable_f32 mpiou_single_detection; 32 + struct u_var_draggable_f32 mpiou_double_detection; 33 + struct u_var_draggable_f32 max_reprojection_error; 34 + struct u_var_draggable_f32 opt_smooth_factor; 35 + struct u_var_draggable_f32 max_hand_dist; 36 + bool scribble_predictions_into_next_frame = false; 37 + bool scribble_keypoint_model_outputs = false; 38 + bool scribble_optimizer_outputs = true; 39 + bool always_run_detection_model = false; 40 + bool optimize_hand_size = true; 41 + int max_num_outside_view = 6; 42 + bool enable_pose_predicted_input = true; 43 + bool enable_framerate_based_smoothing = false; 44 + 45 + // Stuff that's only really useful for dataset playback: 46 + bool detection_model_in_both_views = false; 47 + }; 48 + 49 + struct hg_tuneable_values * 50 + t_hand_tracking_sync_mercury_get_tuneable_values_pointer(struct t_hand_tracking_sync *ht_sync); 51 + 52 + #ifdef __cplusplus 53 + } 54 + } // namespace xrt::tracking::hand::mercury 55 + #endif
+2 -25
src/xrt/tracking/hand/mercury/hg_sync.hpp
··· 11 11 #pragma once 12 12 13 13 #include "hg_interface.h" 14 - 14 + #include "hg_debug_instrumentation.hpp" 15 15 16 16 #include "tracking/t_hand_tracking.h" 17 17 #include "tracking/t_camera_models.h" ··· 332 332 333 333 u_frame_times_widget ft_widget = {}; 334 334 335 - struct 336 - { 337 - bool new_user_event = false; 338 - struct u_var_draggable_f32 after_detection_fac; 339 - struct u_var_draggable_f32 dyn_radii_fac; 340 - struct u_var_draggable_f32 dyn_joint_y_angle_error; 341 - struct u_var_draggable_f32 amount_to_lerp_prediction; 342 - struct u_var_draggable_f32 amt_use_depth; 343 - struct u_var_draggable_f32 mpiou_any; 344 - struct u_var_draggable_f32 mpiou_single_detection; 345 - struct u_var_draggable_f32 mpiou_double_detection; 346 - struct u_var_draggable_f32 max_reprojection_error; 347 - struct u_var_draggable_f32 opt_smooth_factor; 348 - struct u_var_draggable_f32 max_hand_dist; 349 - bool scribble_predictions_into_next_frame = false; 350 - bool scribble_keypoint_model_outputs = false; 351 - bool scribble_optimizer_outputs = true; 352 - bool always_run_detection_model = false; // true 353 - bool optimize_hand_size = true; 354 - int max_num_outside_view = 6; 355 - bool enable_pose_predicted_input = true; 356 - bool enable_framerate_based_smoothing = false; 357 - } tuneable_values; 358 - 335 + struct hg_tuneable_values tuneable_values; 359 336 360 337 public: 361 338 explicit HandTracking();