Visual-Inertial Odometry vs SLAM

Visual-inertial odometry estimates continuous motion from cameras and an IMU, usually with a bounded recent state or local landmarks. SLAM adds persistent environmental state, place recognition, loop closure or relocalization so the system can manage long-term spatial consistency.

The terms overlap in real products: a visual-inertial system may retain landmarks, and a SLAM system may use VIO as its front end. The engineering question is which state persists, which frame can jump, how drift is corrected and what happens after tracking loss or restart.

Use this guide with the robot SLAM architecture guide and sensor-fusion guide. Define output contracts before connecting an estimator to robot control.

Separate local motion estimation from persistent mapping

VIO fuses inertial propagation with visual constraints to estimate pose, velocity and IMU biases. It may use a filter or nonlinear optimization over a sliding window. Old states are marginalized so compute remains bounded, allowing drift to accumulate over long trajectories.

SLAM maintains map variables or a pose graph that can connect a current observation with a distant past observation. Place recognition and loop closure add constraints that may revise the global trajectory. Persistence across sessions and relocalization are product choices, not automatic consequences of the word SLAM.

Write a state inventory: local pose, global pose, velocity, biases, landmarks, place descriptors, map identity and calibration.

VIO local state connected to a persistent SLAM map and relocalization backend
Keep the low-latency local control frame distinct from globally corrected map state. Source: Physical AI Lab.

Cameras and IMUs contribute complementary constraints

Cameras constrain motion through feature reprojection, optical flow or direct intensity relationships. An IMU supplies high-rate angular velocity and specific force between images. The inertial model predicts short-term motion while visual evidence corrects drift where the scene is observable.

Blur, low texture, repeated patterns and lighting change weaken vision. Bias, vibration and saturation weaken inertial propagation. Fusion succeeds only when timestamps, coordinate transforms and noise models match the physical sensors.

FunctionVIO responsibilitySLAM additionInterface question
Short-term motionPose, velocity and biasMay consume VIO stateWhat is latency?
Recent featuresWindow constraintsMay promote landmarksWhat is marginalized?
Long-term memoryUsually limitedPersistent map or graphHow is map versioned?
RevisitMay continue locallyLoop closureCan output jump?
RestartReinitialize stateRelocalize in mapWhat is failure state?

Initialization needs observable motion and conditions

Initialization may need to estimate gravity direction, velocity, metric scale, biases and camera-IMU transform assumptions. Monocular vision alone lacks metric scale, while inertial excitation can make scale observable. Weak motion can leave coupled quantities poorly determined.

Test static startup, deliberate excitation, moving startup and invalid motion. The OpenVINS documentation describes static and dynamic initialization support in a research VIO platform; deployed acceptance must still match the chosen configuration.

A sliding window supports bounded local estimation

Optimization-based VIO retains recent camera states, features and inertial factors, while filter-based methods can retain cloned poses for multi-state constraints. Marginalization compresses old information so runtime does not grow with the route.

Window length trades compute and delay against geometric context. Aggressive marginalization can lose useful constraints, while an oversized window can miss real-time deadlines. Measure state age and deadline margin under worst visual load.

Loop closure revises global consistency

A SLAM backend recognizes a revisited place, geometrically verifies it and adds a constraint between distant states. Graph optimization can distribute accumulated error through the trajectory. A false loop can corrupt the map more severely than gradual drift.

Expose candidate score, geometric inliers, correction magnitude and optimization status. Never treat appearance similarity alone as proof of a place, especially in repeated corridors or racks.

Five-stage visual inertial odometry and SLAM validation
Average trajectory error alone hides failures during loss, loop closure and relocalization. Source: Physical AI Lab.

Relocalization is distinct from continuous tracking

Relocalization estimates the current camera pose against a stored map after startup or tracking loss. It requires a compatible map, sufficient current visual evidence and a verified match. Recovery time and false relocalization matter as much as success rate.

Define the robot state while relocalization is uncertain. Continuing autonomous motion with an unverified global pose can be worse than stopping or using a restricted local mode.

Failure eventExpected local outputExpected global outputRequired test
Short visual outageIMU propagation with growing uncertaintyMap unchangedTimed occlusion
Tracking lossInvalid or reset local stateAwait relocalizationTexture and blur loss
Loop acceptedLocal continuity preservedGlobal correctionKnown revisited route
False loop candidateNo map updateRejected hypothesisRepeated-place dataset
RestartNew local origin or aligned stateMap identity checkedCold and warm reboot

Drift and correction belong to different frames

A locally smooth odometry frame is useful for control, even though it drifts globally. A map frame can correct accumulated error after loop closure. The transform between map and odometry can change while the odometry-to-base relationship remains continuous.

Connect this design to the TF2 coordinate-frame guide. Document which frame each covariance refers to and whether pose history is revised.

Protect controllers from global pose jumps

A sudden global correction can look like impossible velocity if fed directly into a local controller. Use a continuous local state for high-rate control and apply global corrections through the intended navigation interface. Planner and controller consumers may need different state products.

Test loop corrections during motion, docking and manipulation. Measure command continuity, obstacle-layer alignment and goal handling before and after the correction.

Calibrate spatial and temporal relationships together

Camera intrinsics, lens distortion, camera-to-IMU extrinsics and time offset affect every fused residual. An offset during rotation can masquerade as an extrinsic error or gyro bias. Online calibration can improve estimates only when motion makes parameters observable.

OpenVINS lists camera-IMU transform, time offset and inertial intrinsic calibration capabilities. Use the time-synchronization guide to validate the acquisition path independently.

Evaluate consistency, not only trajectory error

Absolute trajectory error and relative pose error summarize aspects of accuracy but can hide covariance inconsistency, delay and discrete failure events. Evaluate normalized residuals or consistency metrics, tracking-loss duration, loop precision and relocalization time.

The ORB-SLAM3 paper presents a visual, visual-inertial and multi-map SLAM system, while the OpenVINS paper presents a visual-inertial research platform. Compare systems by the features actually enabled and tested.

Test data loss, reboot and map lifecycle

Drop images, delay IMU packets, change exposure, occlude the camera and interrupt compute. Verify invalid-state signaling, estimator reset and downstream behavior. A numerical pose should not remain marked valid after its supporting stream has failed.

Version maps with calibration and environment identity. Test cold boot, warm restart, wrong-map loading and map update rollback. Persistent state is an operational asset with lifecycle responsibilities.

Choose the minimum architecture that meets recovery needs

Use local VIO where continuous short-horizon state is sufficient and long-term global consistency comes from another source. Add mapping, loop closure and relocalization when revisits, persistent navigation or restart alignment require them. Each addition must earn its compute and failure complexity.

Release with a concise checklist.

  • List local, global and persistent states.
  • Validate initialization observability and calibration.
  • Separate continuous control pose from map corrections.
  • Measure drift, loop precision and relocalization time.
  • Test loss, reboot, map identity and downstream recovery.

Frequently asked questions

Does VIO create a map?

It may retain local landmarks or a recent window, but persistent maps, loop closure and multi-session behavior are separate architecture choices.

Does visual-inertial SLAM eliminate drift?

No. Loop closures can correct some accumulated error, but missed or false associations, calibration and unobservability remain.

Can monocular VIO estimate metric scale?

With suitable inertial excitation and calibration it can make scale observable, but weak motion can leave initialization unreliable.

Should the robot control pose jump after loop closure?

Normally a continuous local frame is kept for control while the map-to-local transform absorbs global correction.

Can camera and IMU rates differ?

Yes, if acquisition times, interpolation and noise models are handled correctly and the estimator supports the configuration.

Local Continuity and Global Map Boundary

A pose estimate is not valid merely because it is numeric. Expose initialization, tracking, map identity, latency and uncertainty states to every consumer.