VOXL OpenVINS Server 1.0
Visual Inertial Odometry Server for VOXL Platform
Loading...
Searching...
No Matches
VoxlConfigure.h
Go to the documentation of this file.
1/**
2 * @file VoxlConfigure.h
3 * @brief Configuration management for VOXL OpenVINS server
4 * @author Zauberflote
5 * @date 2025
6 * @version 1.0
7 *
8 * This header defines the configuration management system for the VOXL OpenVINS
9 * server. It provides functions for reading server configuration files and
10 * synchronizing camera configurations with the system.
11 *
12 * The configuration system handles:
13 * - Server configuration file parsing and validation
14 * - Camera configuration synchronization with system services
15 * - Lens intrinsics and distortion model management
16 * - Extrinsic calibration support (planned)
17 */
18
19#ifndef VOXL_CONFIGURE_H
20#define VOXL_CONFIGURE_H
21#pragma once
22
23// Standard includes
24#include <yaml-cpp/yaml.h>
25#include <fstream>
26#include <iostream>
27#include <string>
28
29// Third-party includes
30#include <modal_json.h>
31#include <voxl_common_config.h>
32#include <Eigen/Geometry>
33#include <opencv2/opencv.hpp>
34
35// Local includes
36#include "VoxlVars.h"
37
38// ============================================================================
39// CONSTANTS AND MACROS
40// ============================================================================
41
42/**
43 * @brief Default configuration file path
44 *
45 * Path to the main configuration file for the VOXL OpenVINS server.
46 * This file contains all server-specific configuration parameters.
47 */
48#define CONFIG_FILE "/etc/modalai/voxl-open-vins-server.conf"
49
50/**
51 * @brief Configuration file header comment
52 *
53 * Standard header comment that is written to configuration files
54 * to provide context and usage information.
55 */
56#ifndef CONFIG_FILE_HEADER
57#define CONFIG_FILE_HEADER \
58 "\
59/**\n\
60 * This file contains configuration that's specific to voxl-open-vins-server.\n\
61 * \n\
62 * *NOTE*: all time variables are measured in seconds\n\
63 */\n"
64#endif
65
66// ============================================================================
67// NAMESPACE DECLARATIONS
68// ============================================================================
69
70/**
71 * @namespace voxl
72 * @brief Main namespace for VOXL OpenVINS server components
73 *
74 * This namespace contains all the core functionality for the VOXL OpenVINS
75 * server, including configuration management, camera handling, and IMU
76 * processing.
77 */
78namespace voxl
79{
80
81 // ============================================================================
82 // CONFIGURATION FUNCTIONS
83 // ============================================================================
84
85 /**
86 * @brief Synchronize camera configuration with system services
87 *
88 * This function reads camera configuration from system services and
89 * synchronizes the lens intrinsics and distortion model parameters
90 * with the VIO system. It ensures that the camera calibration data
91 * used by the VIO system matches the current system configuration.
92 *
93 * The function performs the following operations:
94 * - Reads camera configuration from system services
95 * - Updates lens intrinsics parameters
96 * - Updates distortion model parameters
97 * - Validates configuration consistency
98 *
99 * TODO: Add support for extrinsic calibration parameters
100 *
101 * @return 0 on success, non-zero on failure
102 * @see read_server_config()
103 */
104 int sync_cam_config(void);
105
106 /**
107 * @brief Read and parse server configuration file
108 *
109 * This function reads the main server configuration file and parses
110 * all the parameters needed for VIO operation. It handles JSON format
111 * configuration files and validates the parameters.
112 *
113 * The function reads configuration for:
114 * - VIO algorithm parameters
115
116 *
117 * @return 0 on success, non-zero on failure
118 * @see sync_cam_config()
119 */
120 int read_server_config(void);
121
122} // namespace voxl
123
124#endif // VOXL_CONFIGURE_H
Global variable declarations and constants for VOXL OpenVINS server.
Main namespace for VOXL OpenVINS server components.
int sync_cam_config(void)
Synchronize camera configuration with system services.
int read_server_config(void)
Read and parse server configuration file.