OpenVINS includes a full visual-inertial simulator that generates synthetic camera and IMU measurements from a real recorded pose trajectory. Rather than replaying recorded sensor data, the simulator uses a smooth mathematical representation of the trajectory — a cubic SE(3) B-spline — to analytically compute true angular velocity, linear acceleration, and camera observations at any point in time. Gaussian noise and random-walk biases are then injected to model realistic sensor behavior. This makes the simulator a controlled environment for evaluating estimator consistency, testing calibration, and running Monte Carlo experiments without collecting new hardware data.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rpng/open_vins/llms.txt
Use this file to discover all available pages before exploring further.
SE(3) B-Spline Trajectory Representation
At the core of the simulator is a cumulative cubic B-spline on SE(3) following the formulation of Mueggler et al. and Patron et al. A set of uniformly distributed control point poses sampled from a recorded trajectory defines the spline. The pose at any query timet_s is computed by interpolating between the four nearest control points:
exp(·) and log(·) are the SE(3) matrix exponential and logarithm (see ov_core::BsplineSE3). The spline is C²-continuous, meaning the first and second derivatives (velocity and acceleration) exist and are smooth everywhere. This smoothness is what makes it suitable for generating physically plausible IMU readings.
The only required input to the simulator is a plain-text pose trajectory file. The simulator uniformly samples this trajectory to build the spline control points, then uses the spline for both inertial measurement generation and visual feature projection throughout the simulation.
Inertial Measurement Generation
The C²-continuity of the B-spline allows the simulator to compute the true angular velocity and linear acceleration of the IMU body frame analytically at each timestep. The true quantities are extracted as:vee(·) extracts the vector part of a skew-symmetric matrix. These true values are then corrupted with the IMU noise model used throughout OpenVINS:
Noise model (per scalar, per axis):
| Symbol | Parameter | YAML key |
|---|---|---|
| σ_g | Gyroscope white noise density | gyroscope_noise_density |
| σ_bg | Gyroscope random walk | gyroscope_random_walk |
| σ_a | Accelerometer white noise density | accelerometer_noise_density |
| σ_ba | Accelerometer random walk | accelerometer_random_walk |
sim_seed_measurements configuration value for full reproducibility.
Visual Feature Map and Bearing Measurements
Before generating frame-by-frame measurements, the simulator builds a 3D point feature map of the environment:- The simulator steps along the spline at a fixed interval.
- At each step, it checks how many existing map features project into each camera’s field of view.
- If there are not enough visible features, it generates new ones by shooting random rays from the camera center and assigning random depths uniformly in
[sim_min_feature_gen_dist, sim_max_feature_gen_dist]meters. - New features are added to the global map so they can be re-observed in future frames.
- Within the camera’s field of view (image bounds after distortion)
- In front of the camera (positive depth)
- Within the maximum scene distance threshold
Running the Simulator
The simulator is launched via thesimulation.launch file in the ov_msckf package. All standard OpenVINS estimator parameters apply, plus a set of simulation-specific parameters in config/rpng_sim/estimator_config.yaml.
Run with online calibration
Enable online calibration of camera extrinsics and time offset to test calibration performance:
Simulation Configuration Options
The simulation-specific parameters live at the bottom ofconfig/rpng_sim/estimator_config.yaml:
The simulation also uses all standard estimator calibration flags. For calibration Monte Carlo studies, set
calib_cam_extrinsics: true, calib_cam_intrinsics: true, and calib_cam_timeoffset: true along with sim_do_perturbation: true to perturb the initial calibration guess away from the true values.Key Source Files
ov_core::BsplineSE3
The SE(3) B-spline implementation. Handles control point construction, pose interpolation, and derivative computation for velocity and acceleration.
ov_msckf::Simulator
The master simulator class. Wraps BsplineSE3 to generate IMU measurements, build the feature map, and produce camera projections with noise.