Troubleshooting · SLAM and localization
Localization covariance grows unexpectedly
Covariance grows when predictions run without corrections. Find out why the corrections are missing or rejected.
1. Symptoms
- The pose covariance keeps increasing over minutes.
- The robot slows or stops because localisation uncertainty is too high.
- Absolute sensors appear to be active but have no effect.
2. Possible causes
- No absolute measurement source is fused (GNSS, LiDAR pose, markers).
- Corrections are rejected by tight gates.
- Measurement covariances are too large.
- Time stamps too old or future, so measurements are dropped.
- Process noise Q too large.
- A sensor timed out.
3. Measurements to collect
- Covariance over time next to the measurement arrival times.
- Counts of accepted and rejected measurements.
- The sensor timeout events.
4. Diagnostic commands
Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).
ros2 topic echo /odometry/filtered --field pose.covariance
ros2 topic hz /odometry/filtered
ros2 topic echo /diagnostics5. Step-by-step investigation
- Check which sensors are fused and whether any provides absolute information.
- Check rejections and thresholds.
- Check measurement covariances and time stamps.
- Check Q, including dynamic process noise.
- Check timeouts.
6. Corrective actions
- Add an absolute source or place landmarks.
- Loosen gates or fix covariances.
- Fix time stamps.
- Tune Q (dynamic process noise stops growth at rest).
7. Validation after the fix
- Covariance stays bounded over a full mission with the absolute sources active.
References
- robot_localization documentation (ros2 branch): state_estimation_nodes.rst and params/ekf.yaml, read 2026-11-06.