The open source OpenXR runtime
0
fork

Configure Feed

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

t/slam: Add reset state button

authored by

Mateo de Mayo and committed by
Jakob Bornecrantz
f8932fe8 5fd73ea7

+11
+11
src/xrt/auxiliary/tracking/t_tracker_slam.cpp
··· 357 357 bool submit; //!< Whether to submit data pushed to sinks to the SLAM tracker 358 358 int cam_count; //!< Number of cameras used for tracking 359 359 360 + struct u_var_button reset_state_btn; //!< Reset tracker state button 361 + 360 362 enum u_logging_level log_level; //!< Logging level for the SLAM tracker, set by SLAM_LOG var 361 363 struct os_thread_helper oth; //!< Thread where the external SLAM system runs 362 364 MatFrame *cv_wrapper; //!< Wraps a xrt_frame in a cv::Mat to send to the SLAM system ··· 1084 1086 u_var_add_root(&t, "SLAM Tracker", true); 1085 1087 u_var_add_log_level(&t, &t.log_level, "Log Level"); 1086 1088 u_var_add_bool(&t, &t.submit, "Submit data to SLAM"); 1089 + u_var_button_cb reset_state_cb = [](void *t_ptr) { 1090 + TrackerSlam *t = (TrackerSlam *)t_ptr; 1091 + shared_ptr<void> _; 1092 + t->slam->use_feature(F_RESET_TRACKER_STATE, _, _); 1093 + }; 1094 + t.reset_state_btn.cb = reset_state_cb; 1095 + t.reset_state_btn.ptr = &t; 1096 + u_var_add_button(&t, &t.reset_state_btn, "Reset tracker state"); 1097 + 1087 1098 u_var_add_bool(&t, &t.gt.override_tracking, "Track with ground truth (if available)"); 1088 1099 euroc_recorder_add_ui(t.euroc_recorder, &t, ""); 1089 1100