VOXL OpenVINS Server 1.0
Visual Inertial Odometry Server for VOXL Platform
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
voxl Namespace Reference

Main namespace for VOXL OpenVINS server components. More...

Classes

class  CameraBase
 Base class for all camera implementations. More...
 
class  CameraManager
 Manages all camera instances in the system. More...
 
struct  FrameTransform
 Structure for handling IMU frame transformations. More...
 
class  HealthCheck
 Health monitoring system for VOXL OpenVINS. More...
 
struct  img_ringbuf_packet
 Structure to hold image data packet for the ring buffer. More...
 
class  MonoCamera
 Handles monocular camera input. More...
 
class  Publisher
 Singleton class for publishing VIO data. More...
 
class  StereoCamera
 Handles stereo camera input. More...
 

Typedefs

typedef struct voxl::img_ringbuf_packet img_ringbuf_packet
 

Enumerations

enum class  ANG_VEL_TYPE { QUAT_DIRTY , RPY_DIRTY , IMU_BIAS }
 Types of angular velocity calculations. More...
 
enum class  ImageType { CV_MAT , CL_MEM }
 

Functions

int sync_cam_config (void)
 Synchronize camera configuration with system services.
 
int read_server_config (void)
 Read and parse server configuration file.
 
Eigen::Matrix< double, 3, 1 > dirtyOmega (const Eigen::Matrix< double, 4, 1 > &q_k, const Eigen::Matrix< double, 4, 1 > &q_km1, double dt)
 Calculate dirty angular velocity from quaternions.
 
const Eigen::Matrix3d & R_OV_FRD ()
 Get OpenVINS to FRD coordinate frame transformation matrix.
 

Detailed Description

Main namespace for VOXL OpenVINS server components.

This namespace contains all the core functionality for the VOXL OpenVINS server, including configuration management, camera handling, and IMU processing.

Enumeration Type Documentation

◆ ANG_VEL_TYPE

enum class voxl::ANG_VEL_TYPE
strong

Types of angular velocity calculations.

This enumeration defines the different methods available for calculating angular velocity from quaternion data.

Enumerator
QUAT_DIRTY 

Dirty quaternion-based angular velocity.

RPY_DIRTY 

Dirty roll-pitch-yaw based angular velocity.

IMU_BIAS 

IMU bias-corrected angular velocity.

Definition at line 58 of file VoxlHK.h.

◆ ImageType

enum class voxl::ImageType
strong

Definition at line 67 of file VoxlVars.h.

Function Documentation

◆ dirtyOmega()

Eigen::Matrix< double, 3, 1 > voxl::dirtyOmega ( const Eigen::Matrix< double, 4, 1 > &  q_k,
const Eigen::Matrix< double, 4, 1 > &  q_km1,
double  dt 
)
inline

Calculate dirty angular velocity from quaternions.

This function computes the angular velocity using a "dirty" method that directly differentiates quaternions. It's computationally efficient but may not be as accurate as more sophisticated methods.

Parameters
q_kCurrent quaternion (4x1 vector)
q_km1Previous quaternion (4x1 vector)
dtTime difference in seconds
Returns
Angular velocity vector (3x1) in radians per second

Definition at line 81 of file VoxlHK.h.

Referenced by voxl::Publisher::publish().

Here is the caller graph for this function:

◆ R_OV_FRD()

const Eigen::Matrix3d & voxl::R_OV_FRD ( )
inline

Get OpenVINS to FRD coordinate frame transformation matrix.

This function returns the rotation matrix that transforms from the OpenVINS coordinate frame to the Front-Right-Down (FRD) coordinate frame commonly used in aerospace applications.

TODO: Port this for greater possibility of orientations --> case by case etc

Returns
3x3 rotation matrix from OpenVINS to FRD frame

Definition at line 110 of file VoxlHK.h.

Referenced by voxl::Publisher::publish().

Here is the caller graph for this function:

◆ read_server_config()

int voxl::read_server_config ( void  )

Read and parse server configuration file.

This function reads the main server configuration file and parses all the parameters needed for VIO operation. It handles JSON format configuration files and validates the parameters.

The function reads configuration for:

  • Auto-reset parameters and thresholds
  • Velocity covariance limits and timeouts
  • Feature count requirements and timeouts
  • Auto-fallback mode settings
  • Yaw monitoring and fast yaw detection
  • Debug output settings

The function creates a new configuration file with default values if one doesn't exist, and saves any modifications made during parsing back to disk.

Configuration file location: /etc/modalai/voxl-open-vins-server.conf

Returns
0 on success, -1 on failure
See also
sync_cam_config()

This function reads the main server configuration file and parses all the parameters needed for VIO operation. It handles JSON format configuration files and validates the parameters.

The function reads configuration for:

  • VIO algorithm parameters
Returns
0 on success, non-zero on failure
See also
sync_cam_config()

Definition at line 466 of file VoxlConfigure.cpp.

References auto_fallback_min_v, auto_fallback_timeout_s, auto_reset_max_v_cov, auto_reset_max_v_cov_instant, auto_reset_max_v_cov_timeout_s, auto_reset_max_velocity, auto_reset_min_feature_timeout_s, auto_reset_min_features, CHAR_BUF_SIZE, CONFIG_FILE, CONFIG_FILE_HEADER, en_auto_reset, en_cont_yaw_checks, en_imu_body, fast_yaw_thresh, fast_yaw_timeout_s, folder_base, fusion_rate_dt_ms, occlude_stereo_left, occlude_stereo_right, ok_state_grace_timeout_s, quality_bad_to_good_count, quality_good_to_bad_count, quality_high_thresh, quality_initial_to_bad_count, quality_initial_to_good_count, quality_low_thresh_good, quality_low_thresh_initial, sync_config, takeoff_alt_threshold, and using_stereo.

Referenced by main().

Here is the caller graph for this function:

◆ sync_cam_config()

int voxl::sync_cam_config ( void  )

Synchronize camera configuration with system services.

This function reads camera configuration from system services and synchronizes the lens intrinsics and distortion model parameters with the VIO system. It ensures that the camera calibration data used by the VIO system matches the current system configuration.

The function performs the following operations:

  • Reads camera configuration from VIO camera configuration file
  • Validates extrinsic and calibration data presence
  • Ensures all cameras use the same IMU
  • Updates OpenVINS estimator YAML with camera count
  • Updates camera chain YAML with intrinsic parameters
  • Configures blind takeoff feature based on camera occlusion
  • Populates global camera information vector

The function updates several YAML files:

  • estimator_config.yaml
  • kalibr_imucam_chain.yaml
Returns
0 on success, -1 on failure
See also
read_server_config()

This function reads camera configuration from system services and synchronizes the lens intrinsics and distortion model parameters with the VIO system. It ensures that the camera calibration data used by the VIO system matches the current system configuration.

The function performs the following operations:

  • Reads camera configuration from system services
  • Updates lens intrinsics parameters
  • Updates distortion model parameters
  • Validates configuration consistency

TODO: Add support for extrinsic calibration parameters

Returns
0 on success, non-zero on failure
See also
read_server_config()

Definition at line 87 of file VoxlConfigure.cpp.

References cam_info::cam_calib_intrinsic, cam_info::cam_id, cam_info_vec, en_imu_body, en_verbose, folder_base, cam_info::height, imu_model, imu_name, cam_info::is_fisheye, cam_info::is_occluded_on_takeoff, MAX_CAM_CNT, cam_info::mode, MONO, cam_info::name, cam_info::preview_name, STEREO, sync_config, takeoff_cam, takeoff_cams, cam_info::tracking_name, using_stereo, and cam_info::width.

Referenced by main().

Here is the caller graph for this function: