mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
h/mercury: Add debug instrumentation header
So that we can run automated tests on our hand tracking
This commit is contained in:
parent
a934bf4ae3
commit
84bae0b8ca
55
src/xrt/tracking/hand/mercury/hg_debug_instrumentation.hpp
Normal file
55
src/xrt/tracking/hand/mercury/hg_debug_instrumentation.hpp
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
// Copyright 2023, Collabora, Ltd.
|
||||||
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
|
/*!
|
||||||
|
* @file
|
||||||
|
* @brief Debug instrumentation for mercury_train or others to control hand tracking.
|
||||||
|
* @author Moses Turner <moses@collabora.com>
|
||||||
|
* @ingroup tracking
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "hg_interface.h"
|
||||||
|
|
||||||
|
#include "util/u_var.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace xrt::tracking::hand::mercury {
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct hg_tuneable_values
|
||||||
|
{
|
||||||
|
bool new_user_event = false;
|
||||||
|
struct u_var_draggable_f32 after_detection_fac;
|
||||||
|
struct u_var_draggable_f32 dyn_radii_fac;
|
||||||
|
struct u_var_draggable_f32 dyn_joint_y_angle_error;
|
||||||
|
struct u_var_draggable_f32 amount_to_lerp_prediction;
|
||||||
|
struct u_var_draggable_f32 amt_use_depth;
|
||||||
|
struct u_var_draggable_f32 mpiou_any;
|
||||||
|
struct u_var_draggable_f32 mpiou_single_detection;
|
||||||
|
struct u_var_draggable_f32 mpiou_double_detection;
|
||||||
|
struct u_var_draggable_f32 max_reprojection_error;
|
||||||
|
struct u_var_draggable_f32 opt_smooth_factor;
|
||||||
|
struct u_var_draggable_f32 max_hand_dist;
|
||||||
|
bool scribble_predictions_into_next_frame = false;
|
||||||
|
bool scribble_keypoint_model_outputs = false;
|
||||||
|
bool scribble_optimizer_outputs = true;
|
||||||
|
bool always_run_detection_model = false;
|
||||||
|
bool optimize_hand_size = true;
|
||||||
|
int max_num_outside_view = 6;
|
||||||
|
bool enable_pose_predicted_input = true;
|
||||||
|
bool enable_framerate_based_smoothing = false;
|
||||||
|
|
||||||
|
// Stuff that's only really useful for dataset playback:
|
||||||
|
bool detection_model_in_both_views = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hg_tuneable_values *
|
||||||
|
t_hand_tracking_sync_mercury_get_tuneable_values_pointer(struct t_hand_tracking_sync *ht_sync);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
} // namespace xrt::tracking::hand::mercury
|
||||||
|
#endif
|
|
@ -11,7 +11,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "hg_interface.h"
|
#include "hg_interface.h"
|
||||||
|
#include "hg_debug_instrumentation.hpp"
|
||||||
|
|
||||||
#include "tracking/t_hand_tracking.h"
|
#include "tracking/t_hand_tracking.h"
|
||||||
#include "tracking/t_camera_models.h"
|
#include "tracking/t_camera_models.h"
|
||||||
|
@ -332,30 +332,7 @@ public:
|
||||||
|
|
||||||
u_frame_times_widget ft_widget = {};
|
u_frame_times_widget ft_widget = {};
|
||||||
|
|
||||||
struct
|
struct hg_tuneable_values tuneable_values;
|
||||||
{
|
|
||||||
bool new_user_event = false;
|
|
||||||
struct u_var_draggable_f32 after_detection_fac;
|
|
||||||
struct u_var_draggable_f32 dyn_radii_fac;
|
|
||||||
struct u_var_draggable_f32 dyn_joint_y_angle_error;
|
|
||||||
struct u_var_draggable_f32 amount_to_lerp_prediction;
|
|
||||||
struct u_var_draggable_f32 amt_use_depth;
|
|
||||||
struct u_var_draggable_f32 mpiou_any;
|
|
||||||
struct u_var_draggable_f32 mpiou_single_detection;
|
|
||||||
struct u_var_draggable_f32 mpiou_double_detection;
|
|
||||||
struct u_var_draggable_f32 max_reprojection_error;
|
|
||||||
struct u_var_draggable_f32 opt_smooth_factor;
|
|
||||||
struct u_var_draggable_f32 max_hand_dist;
|
|
||||||
bool scribble_predictions_into_next_frame = false;
|
|
||||||
bool scribble_keypoint_model_outputs = false;
|
|
||||||
bool scribble_optimizer_outputs = true;
|
|
||||||
bool always_run_detection_model = false; // true
|
|
||||||
bool optimize_hand_size = true;
|
|
||||||
int max_num_outside_view = 6;
|
|
||||||
bool enable_pose_predicted_input = true;
|
|
||||||
bool enable_framerate_based_smoothing = false;
|
|
||||||
} tuneable_values;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit HandTracking();
|
explicit HandTracking();
|
||||||
|
|
Loading…
Reference in a new issue