TL;DR Sensor fusion in robotics combines IMU, wheel odometry, cameras, LiDAR and GNSS/RTK into one state estimate with an honest uncertainty. Start with an EKF, and move to a UKF for strong nonlinearities, a particle filter for global localization on a known map, or a factor graph for loop closures and delayed data. Most failures come from frames, timestamps, calibration and covariances rather than the filter. In ROS 2, the robot_localization docs suggest fusing RTK GNSS in a separate map-frame filter, because GNSS fixes can jump.
What Sensor Fusion in Robotics Means
In robotics, sensor fusion means combining measurements from several sensors, together with motion models, to estimate a robot's state (pose, velocity and sensor biases). The goal is lower uncertainty and higher availability than any single sensor can give. Each sensor fails in its own way: an IMU drifts as its bias integrates, wheels slip, and cameras struggle in glare or low light. LiDAR can struggle with glass and rain, and GNSS suffers from multipath and blocked sky.
Fusion is not averaging. It computes a best estimate and an uncertainty that reflects real sensor behavior and failure modes. Formally, state estimation recovers a hidden state xt (for example position, orientation, velocity and IMU biases) from noisy measurements zt, using a motion model and measurement models. The result is a best estimate plus a covariance.
Here is a classic example. Wheel odometry gives smooth short-term velocity on good traction, while the IMU captures fast attitude changes but drifts over time. Fuse them, and you get a stable pose even when one sensor is briefly wrong, as long as covariances and timing match reality. That uncertainty also matters downstream, because planners can slow down, widen safety margins or trigger re-localization when it grows.
Sensor Fusion in Robotics: Goals and Metrics
Good sensor fusion in robotics produces a state estimate you can control with, and it tells you how wrong that estimate might be. Before choosing sensors or an estimator, agree on what "better" means.
Metrics to Define First
- ATE and RPE: the TUM benchmark defines absolute trajectory error as the difference between the true and estimated trajectory, and relative pose error as a measure of drift, for example per second.
- Drift rate: how fast error grows, per distance or per minute, when absolute updates disappear.
- Heading error: yaw accuracy at operating speed, which matters most for path tracking.
- Update latency: the delay between a measurement and the estimate that uses it.
- Availability: the share of time the estimate stays within your specification.
If the same stack also handles perception, track detection quality and track stability separately. One common mistake is to expect fusion to reduce compute. Adding sensors usually increases bandwidth and processing, unless you fuse at feature or decision level or downsample.
What Teams Commonly Fuse
| Sensor | What it gives | Where it struggles |
|---|---|---|
| IMU | High-rate motion and attitude | Bias causes drift unless the filter estimates it |
| Wheel encoders | Smooth short-term velocity on good traction | Wheel slip on uneven ground or under hard braking |
| Cameras | Rich features and semantics | Glare, blur, darkness or low texture |
| LiDAR | Longer-range geometry | Glass and rain |
| ToF depth cameras | Short-range depth | Limited range |
| Radar | Keeps working in dust and fog | Lower angular resolution than LiDAR |
| GNSS RTK | Absolute outdoor position, at centimeter level when fixed | Multipath and blocked sky |
| UWB | Absolute ranging indoors | Needs installed and surveyed anchors |
| Magnetometer, barometer, ultrasonic | Extra constraints | Magnetic interference for magnetometers, reflections for ultrasonic sensors |
Common Misconceptions Explained
- Redundancy improves availability, not accuracy by itself. You still need fault detection and outlier rejection, or two bad sensors can agree on the wrong answer.
- Calibration and time synchronization dominate. A wrong extrinsic calibration or timestamp can ruin a "correct" filter.
- SLAM is not the same as sensor fusion. SLAM builds a map and localizes in it; it often uses fusion internally.
Sensor Fusion Architecture: Early vs Late Fusion
Your fusion architecture decides what information you keep, what you throw away and how failures spread. The same sensors can behave very differently with early, mid-level or late fusion.
- Early fusion (measurement level): sensor measurements go directly into one estimator, for example IMU, LiDAR features and GNSS in a single filter or graph. This tight coupling models correlations between sensors. LIO-SAM, for example, optimizes lidar odometry and GPS factors in a factor graph.
- Mid-level fusion (feature level): each sensor produces features, such as visual keypoints or LiDAR planes, and the fusion step combines them. You keep more structure than late fusion, but the raw data is already compressed.
- Late fusion (decision level): separate modules output decisions, such as object tracks or pose hypotheses, and a higher layer merges or gates them. This suits independent safety checks.
Choosing an Architecture
The tradeoffs show up quickly in field logs:
- Accuracy: early fusion can be the most accurate, because it models cross-sensor correlations.
- Complexity: early fusion needs tight calibration, consistent timing and realistic noise models.
- Fault isolation: late fusion isolates failures better, so a bad camera classifier shouldn't destabilize odometry.
- Latency: early fusion may need buffering to align measurements in time, while late fusion is quicker to wire up.
A simple selection rule holds up in real programs. When you need drift correction and smooth control, couple IMU and wheel odometry at measurement level, so the controller gets a continuous, low-latency state. Asynchronous sensors without clean shared timing call for feature or decision fusion with explicit gating. For safety-critical redundancy, add a late-fusion safety layer even if localization uses early fusion.
Homogeneous vs Heterogeneous Fusion
- Homogeneous: camera plus camera (stereo), or LiDAR plus LiDAR for redundancy. Watch for correlated failures, such as the same lighting, rain or dirt affecting both.
- Heterogeneous: camera plus radar, or LiDAR plus IMU. Complementary failure modes reduce risk and improve availability.
If your sensor fusion in robotics needs a global reference outdoors, plan for RTK GNSS updates and verify correction coverage early. RTKdata's NTRIP network has 20,000+ reference stations in 140+ countries, so you can check your operating regions before committing to a design.
Estimators Compared: Kalman Filter, EKF, UKF, Particle Filters and Factor Graphs
Almost every estimator used for sensor fusion in robotics approximates Bayesian estimation. A Bayes filter alternates two steps: predict the state with a motion model, then update it with a measurement model. Motion models create drift, measurements correct it, and covariances express how much you trust each source. In practice, the IMU predicts fast motion, and an RTK GNSS update corrects position when it's available and passes a consistency check.
Kalman-Family Filters
- Kalman filter: exact for linear models with Gaussian noise. Real robot kinematics and sensor models are rarely linear end to end.
- Extended Kalman filter (EKF): linearizes nonlinear models around the current estimate using Jacobians. It is widely used in robotics, but it can become fragile when uncertainty grows large or covariances are overconfident.
- Unscented Kalman filter (UKF): propagates a small set of sigma points instead of computing Jacobians. Its authors, Wan and van der Merwe, show it is accurate to third order for Gaussian inputs, against first order for the EKF, at the same order of computational complexity. In practice, the robot_localization documentation notes that its UKF node is more stable but more computationally taxing than its EKF node.
Particle Filters and Factor Graphs
- Particle filter: represents the belief with many samples, so it can model multi-modal uncertainty, such as a robot that doesn't yet know where it is on a map. The best-known example is AMCL in Nav2, which estimates a robot's pose in a known map using a 2D laser scanner.
- Factor graph: GTSAM describes it as a bipartite graph of factors connected to variables. The variables are the unknowns, such as poses, landmarks and biases, and the factors are probabilistic constraints from measurements or prior knowledge.
Factor graphs win when you need loop closures, global consistency or measurements that arrive late or out of order. Many lidar-inertial and visual-inertial pipelines are built on graph optimization or tightly coupled filters.
Which Estimator to Choose
| Estimator | Use it when | Watch out for | ROS 2 example |
|---|---|---|---|
| EKF | Real-time odometry fusion (the usual default) | Large uncertainty or overconfident covariances | robot_localization EKF node |
| UKF | Dynamics or measurement models are strongly nonlinear | More computation than the EKF node | robot_localization UKF node |
| Particle filter | Global localization on a known map | Compute grows with the number of particles | Nav2 AMCL (2D laser) |
| Factor graph | Loop closures, or delayed and out-of-order measurements | Solves an optimization over many states | GTSAM-based pipelines such as LIO-SAM |
ROS 2 Localization Stack and Debugging
Sensor fusion in robotics on ROS 2 depends less on the estimator and more on the plumbing: frames, timestamps, calibration and covariances. Keep the pipeline simple and observable: drivers, time alignment, tf2 transforms, preprocessing, estimator, then monitoring.
- Frames: REP-105 defines map, odom and base_link. The odom frame is continuous but drifts over time, while the map frame doesn't drift but can jump. Local motion is therefore planned in odom, and global position comes from map.
- Conventions: robot_localization follows the East-North-Up (ENU) convention of REP-103 and assumes ENU for all IMU data. Its documentation notes that most IMUs natively report orientation in North-East-Down, so convert before fusing.
- Timestamps: each message stamp must represent measurement time, not the time it reached the CPU. For lagged sources such as scan matchers, robot_localization can rewind to the last state before the lagged measurement and re-process (smooth_lagged_data).
Calibration, Timing and Covariances
Extrinsic calibration is one of the most common silent failure sources. It is the rigid transform from each sensor frame to base_link, and it includes GNSS antenna lever arms. A common bug: the IMU is mounted rotated, but the static transform doesn't reflect it. The filter then applies the IMU's rotation rates to the wrong axes, the heading walks, and you chase "bad GNSS" for a week. Before you touch estimator gains, validate each transform with the robot standing still.
For time synchronization, there are three practical options. Hardware triggers typically give the lowest jitter where sensors support them. Next, PTP (IEEE 1588) synchronizes clocks across compute, sensors and GNSS receivers. Finally, software timestamping works only if you stamp at acquisition and understand driver buffering.
Covariances decide what the filter believes. The robot_localization guide stresses that covariance values matter, and that you should disable a variable in the configuration rather than inflate its variance to make the filter ignore it. Start from datasheets, record innovations, and adjust until residuals are roughly zero-mean and consistent. Also set outlier gates: robot_localization expresses its rejection thresholds as Mahalanobis distances, and by default it rejects nothing.
Fusing RTK GNSS in ROS 2
Because GNSS fixes can jump, the robot_localization GPS tutorial suggests two filter instances. The first fuses only continuous data, such as odometry and IMU, in the odom frame for local motion. The second fuses everything, including GNSS, in the map frame. Between them, navsat_transform_node converts the receiver's fix into the robot's world frame, using an earth-referenced heading from the IMU.
For the corrections themselves, our ROS 2 NTRIP client guide shows the ntrip_client setup, and our robotics docs cover robot platforms. The client forwards the receiver's GGA position to the caster and publishes RTCM corrections on a ROS topic, which your GNSS driver writes to the receiver. Then gate RTK updates on fix status and covariance, and test what happens when the fix drops.
Fast Debugging Checklist
- Verify tf with a static robot: no motion should appear anywhere in the tf tree.
- Check timestamps: monotonic, consistent and close across sensors, with no long driver queues.
- Plot innovations: residual spikes often reveal wheel slip, IMU bias growth or GNSS multipath.
- Replay bag logs to regression-test every tuning change.
- Tighten data association and gating before blaming the filter.
Treat RTK as a Gated Constraint
Reliable deployments come from the fundamentals: correct frames, extrinsic calibration, time synchronization and covariance tuning. For field robots that work outdoors, RTK GNSS supplies an absolute global reference that odometry can't provide, and it ties SLAM maps to real-world coordinates. Treat it as a measured, gated constraint, not a perfect input. Plan coverage and connectivity, and test how your stack behaves during RTK dropouts and multipath.
FAQ
What is sensor fusion in robotics?
Sensor fusion in robotics combines measurements from several sensors, plus motion models, to estimate a robot's state or environment with lower uncertainty than any single sensor. It covers localization (pose and velocity) and perception (detection and tracking). Filters and SLAM are common ways to implement it.
Why is sensor fusion important for robot localization?
Encoders and IMUs measure relative motion, so their error accumulates over time. Absolute references such as RTK GNSS or map-based localization pull the estimate back to the correct global pose. The payoff is availability: the robot keeps operating through partial sensor failures instead of stopping.
What's the difference between SLAM and sensor fusion?
SLAM (simultaneous localization and mapping) estimates both the robot's trajectory and a map. Sensor fusion is broader and can work without building a map, for example IMU plus GNSS. Visual-inertial odometry fuses a camera and an IMU to estimate motion, and that odometry can feed SLAM.
When should I use EKF vs UKF vs particle filter?
The EKF is the efficient default for real-time state estimation, but it relies on linearization. The UKF avoids Jacobians and handles stronger nonlinearities better; robot_localization notes its UKF node needs more computation. A particle filter suits global localization on a known map, and factor graphs suit loop closures and delayed measurements.
What are early, mid-level, and late sensor fusion?
Early fusion feeds sensor measurements directly into one estimator, for example IMU and GNSS in an EKF. Mid-level fusion combines features such as visual keypoints or LiDAR planes. Late fusion combines decisions, such as object tracks or pose hypotheses, using voting or gating for fault tolerance.
How do I add RTK GNSS to robot_localization in ROS 2?
The robot_localization GPS tutorial suggests two filters: one fusing odometry and IMU in the odom frame, and one fusing everything, including GNSS, in the map frame. navsat_transform_node converts the GNSS fix into the robot's world frame. An NTRIP client such as ntrip_client delivers the RTK corrections to the receiver.
What causes sensor fusion to fail in real robots?
Calibration errors, such as a wrong extrinsic transform, can make a correct filter diverge. Timing errors, such as timestamp offsets or out-of-order messages, create impossible motion. Modeling errors, such as wrong covariances or missing outlier rejection, produce overconfident estimates. Inspect innovations, replay logs and verify the tf tree first.
How does GNSS/RTK improve sensor fusion for outdoor robots?
RTK GNSS provides an absolute position constraint that limits long-term drift from IMU, odometry and visual or lidar odometry. Gate RTK updates, degrade gracefully when multipath occurs, and fall back to inertial or SLAM estimates when the fix drops. RTK also needs correction coverage and connectivity, so plan for both early.
For a consumer-facing application of the same fusion principles, our guide on RTK accuracy for robotic mowers shows how RTK + vision stacks behave in real garden environments.

Kevin Grub · Head of IT at RTKdata
Owns infrastructure, security, and integrations at RTKdata.