VOXL OpenVINS Server 1.0
Visual Inertial Odometry Server for VOXL Platform
Loading...
Searching...
No Matches
Functions
VoxlSpinner.cpp File Reference

Main server implementation for VOXL OpenVINS. More...

#include <core/VioManager.h>
#include <core/VioManagerOptions.h>
#include "ImuMinimal.h"
#include "CameraManager.h"
#include <modal_pipe.h>
#include <modal_json.h>
#include <modal_flow.h>
#include <voxl_common_config.h>
#include "VoxlCommon.h"
#include "VoxlVars.h"
#include "VoxlConfigure.h"
#include <unistd.h>
#include <signal.h>
#include <sched.h>
#include <getopt.h>
Include dependency graph for VoxlSpinner.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Main entry point for VOXL OpenVINS server.
 

Detailed Description

Main server implementation for VOXL OpenVINS.

Author
Zauberflote
Date
2025
Version
1.0

This file contains the main server implementation for the VOXL OpenVINS system. It handles initialization, pipe management, signal handling, and the main event loop.

The server provides:

The server architecture follows a producer-consumer pattern where:

Definition in file VoxlSpinner.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Main entry point for VOXL OpenVINS server.

This function initializes the VIO system, sets up pipe communications, configures signal handling, and runs the main event loop. It handles the complete lifecycle of the VIO server from startup to shutdown.

The main function performs the following operations:

  • Loads and validates server configuration files
  • Synchronizes camera configurations with system services
  • Creates and configures the VIO manager with OpenVINS
  • Sets up process management (PID file, signal handling)
  • Configures process priority and CPU affinity
  • Creates server pipes for data output
  • Connects to client pipes (IMU and cameras)
  • Runs the main event loop until shutdown is requested

The function implements a robust initialization sequence that ensures all components are properly configured before starting the main loop. It also handles graceful shutdown through signal handling.

Parameters
argcNumber of command line arguments (currently unused)
argvArray of command line argument strings (currently unused)
Returns
0 on successful execution, non-zero on error
Note
The function uses _exit() for termination, so normal return paths are not reached. This ensures immediate process termination.

Definition at line 394 of file VoxlSpinner.cpp.

References config_only, en_debug, en_imu_body, en_verbose, folder_base, voxl::Publisher::getInstance(), main_running, PROCESS_NAME, voxl::read_server_config(), voxl::Publisher::start(), voxl::sync_cam_config(), vio_error_codes, vio_manager, vio_manager_options, and vio_state.

Here is the call graph for this function: