VOXL OpenVINS Server 0.7.0
Visual Inertial Odometry Server for VOXL Platform
Loading...
Searching...
No Matches
VoxlVars.h
Go to the documentation of this file.
1/**
2 * @file VoxlVars.h
3 * @brief Global variable declarations and constants for VOXL OpenVINS server
4 * @author Joao Leonardo Silva Cotta (@zauberflote1)
5 * @date 2025
6 * @version 1.0
7 *
8 * This header file declares all global variables, constants, and configuration
9 * parameters used throughout the VOXL OpenVINS server. It provides centralized
10 * management of system state, configuration, and operational parameters.
11 *
12 * The file contains:
13 * - Pipe channel definitions and constants
14 * - Global state variables for VIO operation
15 * - Configuration parameters for auto-reset and error handling
16 * - Sensor-specific variables and synchronization primitives
17 * - Image processing and camera management variables
18 */
19
20#ifndef VOXL_VARS_H
21#define VOXL_VARS_H
22
23#pragma once
24
25// Standard includes
26#include <memory>
27#include <atomic>
28#include <string>
29#include <vector>
30#include <mutex>
31#include <cstdint>
32#include <condition_variable>
33
34// Third-party includes
35#include <core/VioManager.h>
36#include <modal_flow/StereoMatcher.hpp>
37#include <core/VioManagerOptions.h>
38#include <modal_pipe.h>
39#include <modal_json.h>
40#include <voxl_common_config.h>
41
42// Local includes
43#include "VoxlCommon.h"
44// FOR NOW WE FORCE TO SUBSAMPLE IT ALWAYS TO CHECK THE EFFECTS OF IT
45#define GYRO_VAR_THRESHOLD 0.09f ///< Gyro variance threshold for motion detection
46#define ACC_VAR_THRESHOLD 0.09f ///< Accelerometer variance threshold for motion detection
47
48// ============================================================================
49// DATA STRUCTURES
50// ============================================================================
51namespace voxl
52{
53 /**
54 * @struct img_ringbuf_packet
55 * @brief Structure to hold image data packet for the ring buffer
56 *
57 * This structure encapsulates all the data needed for a single image frame,
58 * including camera ID, metadata, and the actual pixel data.
59 */
60 typedef struct img_ringbuf_packet
61 {
62 int camid; ///< Camera identifier
63 camera_image_metadata_t metadata; ///< Image metadata (timestamp, format, etc.)
64 uint8_t image_pixels[MAX_IMAGE_SIZE]; ///< Raw image pixel data
66
67 enum class ImageType
68 {
69 CV_MAT,
70 CL_MEM
71 };
72
73 /**
74 * @struct FrameTransform
75 * @brief Structure for handling IMU frame transformations
76 *
77 * This structure handles the transformation of IMU data to accommodate
78 * different IMU mounting orientations. It automatically detects the gravity
79 * axis and direction to compute the appropriate correction matrix.
80 */
82 {
83 // WE NEED TO FIND THE AXIS WHERE GRAVITY IS MOST PREDOMINANT AND ITS DIRECTION
84 // THEN WE CAN COMPUTE THE CORRECTION MATRIX
85 enum class Axis
86 {
87 X,
88 Y,
89 Z
90 };
91 enum class Direction
92 {
93 POSITIVE,
94 NEGATIVE
95 };
96
97 enum class JerkOption
98 {
99 ACCEL_ONLY,
100 GYRO_ONLY,
101 ACCEL_AND_GYRO,
102 NONE
103 };
104
105 // ASSUME IMU IS MOUNTED ALIGNED WITH THE BODY FRAME
106 Axis gravity_axis{Axis::Z};
107 Direction gravity_direction{Direction::NEGATIVE};
108 bool is_initialized{false};
109 // JERK DETECTION
110 Eigen::Matrix3d correction_matrix{Eigen::Matrix3d::Identity()};
111 Eigen::Vector3d avg_acc_1t0{Eigen::Vector3d::Zero()};
112 Eigen::Vector3d avg_gyro_1t0{Eigen::Vector3d::Zero()};
113 Eigen::Vector3d avg_acc_2t1{Eigen::Vector3d::Zero()};
114 Eigen::Vector3d avg_gyro_2t1{Eigen::Vector3d::Zero()};
115 float expected_total_samples{1024.0f};
116 float current_total_samples{0.0f};
117 std::deque<Eigen::Vector3d> acc1t0_samples;
118 std::deque<Eigen::Vector3d> gyro1t0_samples;
119 std::deque<Eigen::Vector3d> acc2t1_samples;
120 std::deque<Eigen::Vector3d> gyro2t1_samples;
121 JerkOption jerk_opt{JerkOption::ACCEL_ONLY}; // FOR NOW WE FORCE TO USE ACCELEROMETER ONLY TO CHECK THE EFFECTS OF IT
122 // PROVE THE ASSUMPTION
123 void update(const imu_data_t &data);
124
125 void detectJerk(const imu_data_t &data);
126
127 void resetJerkDetection();
128
129 Eigen::Vector3d transform(const Eigen::Vector3d &v) const
130 {
131 return correction_matrix * v;
132 }
133 };
134}
135
136// ============================================================================
137// SERVER CHANNEL DEFINITIONS
138// ============================================================================
139
140/**
141 * @brief MPA server channel for extended VIO data output
142 *
143 * Channel used for publishing comprehensive VIO data including
144 * full state information, covariance matrices, and detailed tracking data.
145 */
146#define EXTENDED_CH 0
147
148/**
149 * @brief MPA server channel for simple VIO data output
150 *
151 * Channel used for publishing simplified VIO data with essential
152 * pose and velocity information for basic applications.
153 */
154#define SIMPLE_CH 1
155
156/**
157 * @brief MPA server channel for status information
158 *
159 * Channel used for publishing system status, health information,
160 * and operational state data.
161 */
162#define OVSTATUS_CH 3
163
164// ============================================================================
165// CLIENT CHANNEL DEFINITIONS
166// ============================================================================
167
168/**
169 * @brief MPA client channel for IMU data input
170 *
171 * Channel used for receiving inertial measurement unit data
172 * from the IMU service.
173 */
174#define IMU_CH 0
175
176// ============================================================================
177// PIPE NAMES AND LOCATIONS
178// ============================================================================
179
180/**
181 * @brief Control commands available for VIO system
182 *
183 * Comma-separated list of control commands that can be sent
184 * to the VIO system for operational control.
185 */
186#define OV_VIO_CONTROL_COMMANDS (RESET_VIO_SOFT "," RESET_VIO_HARD)
187
188/**
189 * @brief Name for extended VIO data pipe
190 *
191 * Pipe name for publishing comprehensive VIO data including
192 * full state information and covariance matrices.
193 */
194#define OV_VIO_EXTENDED_NAME "ov_extended"
195
196/**
197 * @brief Location for extended VIO data pipe
198 *
199 * Full path location for the extended VIO data pipe.
200 */
201#define OV_VIO_EXTENDED_LOCATION MODAL_PIPE_DEFAULT_BASE_DIR OV_VIO_EXTENDED_NAME "/"
202
203/**
204 * @brief Name for simple VIO data pipe
205 *
206 * Pipe name for publishing simplified VIO data with essential
207 * pose and velocity information.
208 */
209#define OV_VIO_SIMPLE_NAME "ov"
210
211/**
212 * @brief Location for simple VIO data pipe
213 *
214 * Full path location for the simple VIO data pipe.
215 */
216#define OV_VIO_SIMPLE_LOCATION MODAL_PIPE_DEFAULT_BASE_DIR OV_VIO_SIMPLE_NAME "/"
217
218/**
219 * @brief Name for status information pipe
220 *
221 * Pipe name for publishing system status and health information.
222 */
223#define OV_STATUS_NAME "ov_status"
224
225/**
226 * @brief Location for status information pipe
227 *
228 * Full path location for the status information pipe.
229 */
230#define OV_STATUS_LOCATION MODAL_PIPE_DEFAULT_BASE_DIR OV_STATUS_NAME "/"
231
232// ============================================================================
233// SYSTEM CONSTANTS
234// ============================================================================
235
236/**
237 * @brief Process name for the VOXL OpenVINS server
238 *
239 * Used for process identification, logging, and system integration.
240 */
241#define PROCESS_NAME "voxl-open-vins-server"
242
243/**
244 * @brief Maximum number of cameras supported by VOXL2
245 *
246 * Hardware limitation for the number of cameras that can be
247 * simultaneously processed by the VOXL2 platform.
248 */
249#define MAX_CAM_CNT 6
250
251/**
252 * @brief Standard character buffer size
253 *
254 * Default buffer size for string operations and name storage.
255 */
256#define CHAR_BUF_SIZE 128
257
258// ============================================================================
259// CORE VIO MANAGER
260// ============================================================================
261
262/** @brief VIO manager options
263 *
264 * Options for configuring the VIO manager instance.
265 * This includes settings for state initialization, estimator options,
266 * and other operational parameters.
267 */
268extern ov_msckf::VioManagerOptions vio_manager_options;
269
270/**
271 * @brief Global VIO manager instance
272 *
273 * Main VIO manager that handles the complete visual-inertial
274 * odometry pipeline. This is the central component that processes
275 * camera and IMU data to estimate pose and velocity.
276 */
277extern std::unique_ptr<ov_msckf::VioManager> vio_manager;
278
279// ============================================================================
280// ATOMIC STATE VARIABLES
281// ============================================================================
282
283/**
284 * @brief Main server running state
285 *
286 * Volatile flag indicating whether the main server loop is running.
287 * Used for graceful shutdown and state management.
288 */
289extern volatile int main_running;
290
291/**
292 * @brief Current VIO system state
293 *
294 * Atomic variable representing the current operational state
295 * of the VIO system (initializing, running, error, etc.).
296 */
297extern std::atomic<uint8_t> vio_state;
298
299/**
300 * @brief VIO error codes
301 *
302 * Atomic variable containing error codes and flags for
303 * various VIO system errors and warnings.
304 * Uses uint32_t to accommodate all error codes (up to bit 21).
305 */
306extern std::atomic<uint32_t> vio_error_codes;
307
308/** @brief Should reset floag
309 *
310 * Flag indicating that system should reset
311 */
312extern std::atomic<bool> reset_requested;
313
314/** Flag indicating that a front-end-preserving SOFT reset was requested */
315extern std::atomic<bool> soft_reset_requested;
316
317/**
318 * @brief VIO reset state flag
319 *
320 * Atomic flag indicating whether the VIO system is currently
321 * undergoing a reset operation.
322 */
323extern std::atomic<bool> is_resetting;
324
325/**
326 * @brief Counter which increments on resets
327 *
328 * The counter is used to track the number of resets that have occurred.
329 * This can be useful for debugging, logging, and ensuring that
330 * reset operations are being performed as expected.
331 */
332extern std::atomic<uint32_t> reset_num_counter;
333
334/**
335 * @brief Counter which increments only on SOFT (front-end-preserving) resets.
336 *
337 * Lets field logs distinguish soft resets from hard ones (hard count =
338 * reset_num_counter - soft_reset_num_counter) without a packet-ABI change.
339 */
340extern std::atomic<uint32_t> soft_reset_num_counter;
341
342/**
343 * @brief Number of callbacks inside the system
344 *
345 * Atomic counter for tracking the number of in-flight
346 * callbacks or operations currently being processed that need
347 * to be accounted for during reset.
348 */
349extern std::atomic<uint32_t> active_callbacks;
350
351/**
352 * @brief Mutex for reset
353 *
354 * Synchronisation mutex used *only* for the reset hand-off
355 */
356extern std::mutex reset_mtx;
357
358/**
359 * @brief Reset conditional variable
360 *
361 * Condition variable used to synchronize reset operations,
362 * the reset thread will wait on active_callbacks to reach zero before proceeding.
363 * */
364extern std::condition_variable reset_cv;
365
366/**
367 * @brief Camera connection state
368 *
369 * Atomic flag indicating whether camera services are connected
370 * and providing data.
371 */
372extern std::atomic<bool> is_cam_connected;
373
374/**
375 * @brief IMU connection state
376 *
377 * Atomic flag indicating whether the IMU service is connected
378 * and providing data.
379 */
380extern std::atomic<bool> is_imu_connected;
381
382// ============================================================================
383// AUTO-RESET CONFIGURATION VARIABLES
384// ============================================================================
385
386/**
387 * @brief Enable automatic VIO reset
388 *
389 * Flag to enable automatic reset of the VIO system when
390 * certain error conditions are detected.
391 */
392extern int en_auto_reset;
393
394/**
395 * @brief Maximum velocity threshold for auto-reset
396 *
397 * Velocity threshold above which the system will trigger
398 * an automatic reset if other conditions are met.
399 */
400extern float auto_reset_max_velocity;
401
402/**
403 * @brief Timeout for velocity covariance auto-reset
404 *
405 * Duration in seconds that the velocity covariance must exceed
406 * the threshold before triggering an auto-reset.
407 */
409
410/**
411 * @brief Minimum number of features for auto-reset
412 *
413 * Minimum number of tracked features required to avoid
414 * triggering an automatic reset.
415 */
416extern int auto_reset_min_features;
417
418/**
419 * @brief Timeout for minimum features auto-reset
420 *
421 * Duration in seconds that the feature count must be below
422 * the minimum before triggering an auto-reset.
423 */
425
426/**
427 * @brief Grace period timeout after entering OK state
428 *
429 * Duration in seconds after entering the OK state during which
430 * quality is held low to avoid bad initialization.
431 */
432extern float ok_state_grace_timeout_s;
433
434/**
435 * @brief Fast yaw threshold
436 *
437 * Threshold for detecting rapid yaw changes that
438 * may indicate tracking issues.
439 */
440extern float fast_yaw_thresh;
441
442/**
443 * @brief Fast yaw timeout
444 *
445 * Duration in seconds for fast yaw change detection
446 * before triggering corrective actions.
447 */
448extern float fast_yaw_timeout_s;
449
450// ============================================================================
451// QUALITY HYSTERESIS THRESHOLD CONFIGURATION
452// ============================================================================
453
454/**
455 * @brief Quality low threshold for INITIAL state
456 *
457 * Quality threshold below which degradation is detected in INITIAL state.
458 * When quality drops to or below this value, consecutive sample counter increments.
459 */
461
462/**
463 * @brief Quality low threshold for GOOD state
464 *
465 * Quality threshold below which degradation is detected in GOOD state.
466 * When quality drops to or below this value, consecutive sample counter increments.
467 */
468extern int quality_low_thresh_good;
469
470/**
471 * @brief Quality high threshold for recovery
472 *
473 * Quality threshold above which recovery is detected.
474 * Used for transitions from INITIAL→GOOD and BAD→GOOD states.
475 */
476extern int quality_high_thresh;
477
478/**
479 * @brief Consecutive samples for INITIAL→BAD transition
480 *
481 * Number of consecutive samples with quality below low threshold
482 * required to transition from INITIAL to BAD state.
483 */
485
486/**
487 * @brief Consecutive samples for INITIAL→GOOD transition
488 *
489 * Number of consecutive samples with quality above high threshold
490 * required to transition from INITIAL to GOOD state.
491 */
493
494/**
495 * @brief Consecutive samples for BAD→GOOD transition
496 *
497 * Number of consecutive samples with quality above high threshold
498 * required to transition from BAD to GOOD state.
499 */
501
502/**
503 * @brief Consecutive samples for GOOD→BAD transition
504 *
505 * Number of consecutive samples with quality below low threshold
506 * required to transition from GOOD to BAD state.
507 */
509
510/**
511 * @brief Using stereo camera configuration
512 *
513 * Flag to indicate whether the system is configured
514 * to use stereo cameras for depth estimation.
515 */
516
517extern int using_stereo;
518
519/**
520 * @brief Base folder for yaml configuration files
521 *
522 * Base folder for storing YAML configuration files
523 * for the VINS.
524 */
525extern char folder_base[CHAR_BUF_SIZE];
526/**
527 * @brief Enable debug output
528 *
529 * Flag to enable detailed debug output and logging
530 * for development and troubleshooting.
531 */
532extern int en_debug;
533
534/**
535 * @brief Enable verbose output
536 *
537 * Flag to enable verbose logging and detailed status information
538 * for monitoring and debugging purposes.
539 */
540extern int en_verbose;
541
542/**
543 * @brief Configuration only mode
544 *
545 * Flag to enable configuration-only mode where the server
546 * only loads and validates configuration without starting
547 * the main processing loop.
548 */
549extern int config_only;
550
551/**
552 * @brief Enable IMU body measurements
553 *
554 * Flag to enable the use of IMU body measurements in
555 * the VIO system for enhanced state estimation.
556 */
557extern bool en_imu_body;
558
559// ============================================================================
560// SENSOR CONFIGURATION VARIABLES
561// ============================================================================
562
563/**
564 * @brief IMU service name
565 *
566 * Name of the IMU service to connect to for
567 * inertial measurement data.
568 */
569extern char imu_name[64];
570
571/**
572 * @brief Enumeration of supported IMU models
573 */
575 IMU_MODEL_UNKNOWN = 0,
576 IMU_MODEL_ICM42688,
577 IMU_MODEL_BMI270,
578};
579
580/**
581 * @brief Active IMU model detected from pipe info JSON
582 */
584
585/**
586 * @brief Camera information vector
587 *
588 * Vector containing configuration and calibration information
589 * for all cameras in the system.
590 */
591extern std::vector<cam_info> cam_info_vec;
592
593// ============================================================================
594// IMU-SPECIFIC VARIABLES
595// ============================================================================
596
597/**
598 * @brief Last IMU timestamp in nanoseconds
599 *
600 * Timestamp of the most recent IMU measurement.
601 * Used for synchronization and timing validation.
602 */
603extern volatile int64_t last_imu_timestamp_ns;
604
605/**
606 * @brief Mutex for IMU data access synchronization
607 *
608 * Mutex used to synchronize access to IMU data
609 * between multiple threads.
610 */
611extern std::mutex imu_lock_mutex;
612
613/**
614 * @brief Server-side IMU frame-transform bring-up gravity gate (degrees)
615 *
616 * If >= 0, the server holds the sensor feed to the estimator until the measured gravity tilt is within
617 * this angle (opt-in "must be level" boot gate). Default -1 => any attitude (feed immediately), which is
618 * required for the ceres-free S2 dynamic initializer to (re)init/reset at any attitude. Keep in sync with
619 * (and generally >=) the estimator's init_gravity_max_angle.
620 */
622
623/**
624 * @brief Global frame transform instance
625 *
626 * Global instance of the frame transform structure used for
627 * handling IMU frame transformations across the system.
628 */
630
631/**
632 * @brief Flag indicating if accelerometer jerk is detected
633 */
634extern std::atomic<bool> has_acc_jerk;
635
636/**
637 * @brief Non-static flag for jerk detection
638 */
639extern std::atomic<bool> non_static;
640
641// ============================================================================
642// CAMERA-SPECIFIC VARIABLES
643// ============================================================================
644
645/**
646 * @brief Last camera timestamp
647 *
648 * Timestamp of the most recent camera measurement.
649 * Used for synchronization and timing validation.
650 */
651extern volatile int64_t last_cam_time;
652
653/**
654 * @brief Number of cameras currently in use
655 *
656 * Count of cameras that are currently active
657 * and providing data to the VIO system.
658 */
659extern int cameras_used;
660
661/**
662 * @brief Altitude z
663 *
664 * Atomic variable for the altitude z
665 */
666extern std::atomic<float> alt_z;
667
668/** @brief Takeoff altitude threshold */
669extern float takeoff_alt_threshold;
670
671/** @brief Occlude stereo left */
672extern bool occlude_stereo_left;
673
674/** @brief Occlude stereo right */
675extern bool occlude_stereo_right;
676
677// ============================================================================
678// PIPE CHANNEL VARIABLES
679// ============================================================================
680
681/**
682 * @brief Camera pipe channel array
683 *
684 * Array containing the pipe channel numbers for each camera.
685 * Used for managing camera data connections.
686 */
688
689// ============================================================================
690// IMAGE PROCESSING VARIABLES
691// ============================================================================
692
693// ============================================================================
694// SETUP EXPERIMENTAL VARIABLES
695// ============================================================================
696
697extern bool sync_config; ///< Flag to indicate if configuration synchronization is enabled
698
699// ---- stereo-matcher config (read by VoxlConfigure, applied in VoxlSpinner) ----
700// IMPORTANT: VoxlSpinner does `vio_manager_options = VioManagerOptions()` after
701// VoxlConfigure runs, which wipes any direct stash into vio_manager_options.
702// So we keep the packed calib here in VoxlVars (survives the reset) and copy
703// it into vio_manager_options after the reset+YAML load -- see VoxlSpinner.cpp.
704extern float stereo_z_min; ///< near depth bound for epipolar search (m)
705extern float stereo_z_max; ///< far depth bound for epipolar search (m)
706extern modal_flow::StereoCalib g_stereo_calib; ///< composed by VoxlConfigure
707extern bool g_stereo_calib_valid;
708
709#endif // VOXL_VARS_H
Common definitions and utilities for the VOXL OpenVINS server.
constexpr size_t MAX_IMAGE_SIZE
Maximum size for image data buffer.
Definition VoxlCommon.h:75
int en_verbose
Enable verbose output.
Definition VoxlVars.cpp:152
bool occlude_stereo_right
Occlude stereo right.
Definition VoxlVars.cpp:203
int cameras_used
Number of cameras currently in use.
Definition VoxlVars.cpp:191
volatile int64_t last_cam_time
Last camera timestamp.
Definition VoxlVars.cpp:188
std::atomic< bool > non_static
Non-static flag for jerk detection.
volatile int64_t last_imu_timestamp_ns
Last IMU timestamp in nanoseconds.
Definition VoxlVars.cpp:178
int camera_pipe_channels[MAX_CAM_CNT]
Camera pipe channel array.
Definition VoxlVars.cpp:212
volatile int main_running
Main server running state.
Definition VoxlVars.cpp:38
char folder_base[CHAR_BUF_SIZE]
Base folder for yaml configuration files.
Definition VoxlVars.cpp:146
std::atomic< uint32_t > active_callbacks
Number of callbacks inside the system.
Definition VoxlVars.cpp:63
ov_msckf::VioManagerOptions vio_manager_options
VIO manager options.
Definition VoxlVars.cpp:28
int quality_initial_to_bad_count
Consecutive samples for INITIAL→BAD transition.
Definition VoxlVars.cpp:131
std::atomic< bool > is_resetting
VIO reset state flag.
int quality_low_thresh_initial
Quality low threshold for INITIAL state.
Definition VoxlVars.cpp:122
int quality_bad_to_good_count
Consecutive samples for BAD→GOOD transition.
Definition VoxlVars.cpp:137
float fast_yaw_thresh
Fast yaw threshold.
Definition VoxlVars.cpp:112
int en_auto_reset
Enable automatic VIO reset.
Definition VoxlVars.cpp:84
float auto_reset_max_velocity
Maximum velocity threshold for auto-reset.
Definition VoxlVars.cpp:87
std::atomic< uint8_t > vio_state
Current VIO system state.
float stereo_z_max
far depth bound for epipolar search (m)
Definition VoxlVars.cpp:222
char imu_name[64]
IMU service name.
Definition VoxlVars.cpp:165
voxl::FrameTransform frame_transform
Global frame transform instance.
Definition VoxlVars.cpp:181
std::atomic< float > alt_z
Altitude z.
modal_flow::StereoCalib g_stereo_calib
composed by VoxlConfigure
Definition VoxlVars.cpp:223
std::atomic< bool > has_acc_jerk
Flag indicating if accelerometer jerk is detected.
bool occlude_stereo_left
Occlude stereo left.
Definition VoxlVars.cpp:200
int quality_good_to_bad_count
Consecutive samples for GOOD→BAD transition.
Definition VoxlVars.cpp:140
std::atomic< uint32_t > vio_error_codes
VIO error codes.
float auto_reset_max_v_cov_timeout_s
Timeout for velocity covariance auto-reset.
Definition VoxlVars.cpp:94
float stereo_z_min
near depth bound for epipolar search (m)
Definition VoxlVars.cpp:221
std::mutex reset_mtx
Mutex for reset.
Definition VoxlVars.cpp:66
int using_stereo
Using stereo camera configuration.
Definition VoxlVars.cpp:143
float imu_init_max_gravity_angle_deg
Server-side IMU frame-transform bring-up gravity gate (degrees)
Definition VoxlVars.cpp:230
float ok_state_grace_timeout_s
Grace period timeout after entering OK state.
Definition VoxlVars.cpp:103
bool en_imu_body
Enable IMU body measurements.
Definition VoxlVars.cpp:158
float auto_reset_min_feature_timeout_s
Timeout for minimum features auto-reset.
Definition VoxlVars.cpp:100
imu_model_t
Enumeration of supported IMU models.
Definition VoxlVars.h:574
std::atomic< bool > is_imu_connected
IMU connection state.
std::atomic< bool > reset_requested
Should reset floag.
float takeoff_alt_threshold
Takeoff altitude threshold.
Definition VoxlVars.cpp:197
imu_model_t imu_model
Active IMU model detected from pipe info JSON.
Definition VoxlVars.cpp:168
std::atomic< uint32_t > soft_reset_num_counter
Counter which increments only on SOFT (front-end-preserving) resets.
Definition VoxlVars.cpp:60
std::atomic< bool > soft_reset_requested
Flag indicating that a front-end-preserving SOFT reset was requested.
std::atomic< uint32_t > reset_num_counter
Counter which increments on resets.
Definition VoxlVars.cpp:56
float fast_yaw_timeout_s
Fast yaw timeout.
Definition VoxlVars.cpp:115
int auto_reset_min_features
Minimum number of features for auto-reset.
Definition VoxlVars.cpp:97
std::unique_ptr< ov_msckf::VioManager > vio_manager
Global VIO manager instance.
Definition VoxlVars.cpp:31
std::atomic< bool > is_cam_connected
Camera connection state.
int quality_high_thresh
Quality high threshold for recovery.
Definition VoxlVars.cpp:128
#define CHAR_BUF_SIZE
Standard character buffer size.
Definition VoxlVars.h:256
std::mutex imu_lock_mutex
Mutex for IMU data access synchronization.
int en_debug
Enable debug output.
Definition VoxlVars.cpp:149
std::vector< cam_info > cam_info_vec
Camera information vector.
Definition VoxlVars.cpp:171
int quality_low_thresh_good
Quality low threshold for GOOD state.
Definition VoxlVars.cpp:125
int quality_initial_to_good_count
Consecutive samples for INITIAL→GOOD transition.
Definition VoxlVars.cpp:134
int config_only
Configuration only mode.
Definition VoxlVars.cpp:155
#define MAX_CAM_CNT
Maximum number of cameras supported by VOXL2.
Definition VoxlVars.h:249
std::condition_variable reset_cv
Reset conditional variable.
Definition VoxlVars.cpp:69
bool sync_config
Flag to indicate if configuration synchronization is enabled.
Definition VoxlVars.cpp:218
Main namespace for VOXL OpenVINS server components.
Structure for handling IMU frame transformations.
Definition VoxlVars.h:82
Structure to hold image data packet for the ring buffer.
Definition VoxlVars.h:61
uint8_t image_pixels[MAX_IMAGE_SIZE]
Raw image pixel data.
Definition VoxlVars.h:64
camera_image_metadata_t metadata
Image metadata (timestamp, format, etc.)
Definition VoxlVars.h:63
int camid
Camera identifier.
Definition VoxlVars.h:62