# Visual-Inertial Simulator

## B-Spline Interpolation

At the center of the simulator is an b-spline which allows for the calculation of the pose, velocity, and accelerations at any given timestep along a given trajectory. We follow the work of Mueggler et al. [14] and Patron et al. [15] in which given a series of uniformly distributed "control points" poses the pose at a given timestep can be interpolated by:

where , , are the matrix exponential ov_core::

The only needed input into the simulator is a pose trajectory which we will then uniformly sample to construct control points for this spline. This spline is then used to both generate the inertial measurements while also providing the pose information needed to generate visual-bearing measurements.

## Inertial Measurements

To incorporate inertial measurements from a IMU sensor, we can leverage the continuous nature and -continuity of our cubic B-spline. We can define the sensor measurement from a IMU as follows:

where each measurement is corrupted with some white noise and random-walk bias. To obtain the true measurements from our b-spline we can do the following:

where returns the vector portion of the skew-symmetric matrix (see ov_core::

Note that this is repeated per-scalar value as compared to the vector and identically for the accelerometer readings. The function generates a random scalar float with mean *m* and variance *v*. The is our sensor sampling rate that we advance time forward with.

## Visual-Bearing Measurement

The first step that we perform after creating the b-spline trajectory is the generation of a map of point features. To generate these features, we increment along the spline at a fixed interval and ensure that all cameras see enough features in the map. If there are not enough features in the given frame, we generate new features by sending random rays from the camera out and assigning a random depth. This feature is then added to the map so that it can be projected into future frames.

After the map generation phase, we generate feature measurements by projecting them into the current frame. Projected features are limited to being with-in the field of view of the camera, in front of the camera, and close in distance. Pixel noise can be directly added to the raw pixel values.