VOXL OpenVINS Server 0.7.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  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 > &q0, const Eigen::Matrix< double, 4, 1 > &q1, double dt)
 Calculate angular velocity from consecutive quaternions.
 
const Eigen::Matrix3d & R_OV_FRD ()
 Get OpenVINS to FRD coordinate frame transformation matrix.
 
void release_frame_handles (const ov_core::CameraData &msg)
 Release any external (cl_mem) image handles carried by this frame (idempotent per frame: handles are zeroed after release so a double call cannot double-free)
 
void register_vio_camera_callback (ov_msckf::VioManager &vm)
 Install the per-frame hook on a VioManager (call once per instance, right after construction)
 

Detailed Description

Main namespace for VOXL OpenVINS server components.

VoxlVioIngest.h – wires the server's per-frame post-processing into VioManager's async ingest.

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

Author
Joao Leonardo Silva Cotta (@zauberflote1)

Since the lock-free camera ingest lives inside ov_msckf (AsyncCameraBuffer), the server no longer loops over camera batches: cameras push frames straight into the VioManager from their pipe threads, and the IMU feed releases them in global timestamp order on the VIO thread. This hook runs after each released frame (processed=true) or for every frame the ingest drops (processed=false): it releases external cl_mem image handles exactly once, and publishes the updated state. Returning false pauses draining while a reset is pending.

Register on EVERY VioManager instance right after construction (boot + hard-reset swap).

Author: Joao Leonardo Silva Cotta (@zauberflote1)

Enumeration Type Documentation

◆ 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 > &  q0,
const Eigen::Matrix< double, 4, 1 > &  q1,
double  dt 
)
inline

Calculate angular velocity from consecutive quaternions.

Computes angular velocity via axis-angle extraction from the relative rotation dq = q1 * inv(q0). Falls back to a small-angle approximation when the rotation is near-identity (degenerate case).

Parameters
q0Previous quaternion (4x1, JPL convention)
q1Current quaternion (4x1, JPL convention)
dtTime difference in nanoseconds
Returns
Angular velocity vector (3x1) in rad/s

Definition at line 63 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 105 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 521 of file VoxlConfigure.cpp.

References 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_imu_body, fast_yaw_thresh, fast_yaw_timeout_s, folder_base, imu_init_max_gravity_angle_deg, 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, stereo_z_max, stereo_z_min, sync_config, takeoff_alt_threshold, and using_stereo.

Referenced by main().

Here is the caller graph for this function:

◆ register_vio_camera_callback()

void voxl::register_vio_camera_callback ( ov_msckf::VioManager &  vm)
inline

Install the per-frame hook on a VioManager (call once per instance, right after construction)

Definition at line 50 of file VoxlVioIngest.h.

References voxl::Publisher::getInstance(), is_resetting, voxl::Publisher::publish(), release_frame_handles(), vio_error_codes, and vio_manager.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release_frame_handles()

void voxl::release_frame_handles ( const ov_core::CameraData &  msg)
inline

Release any external (cl_mem) image handles carried by this frame (idempotent per frame: handles are zeroed after release so a double call cannot double-free)

Definition at line 32 of file VoxlVioIngest.h.

Referenced by register_vio_camera_callback().

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
Returns
0 on success, non-zero on failure
See also
read_server_config()

Definition at line 88 of file VoxlConfigure.cpp.

References cam_info::cam_id, cam_info_vec, en_imu_body, en_verbose, folder_base, g_stereo_calib, imu_model, imu_name, cam_info::is_occluded_on_takeoff, MAX_CAM_CNT, cam_info::mode, MONO, cam_info::name, STEREO, stereo_z_max, stereo_z_min, sync_config, cam_info::tracking_name, and using_stereo.

Referenced by main().

Here is the caller graph for this function: