Troubleshooting · SLAM and localization
LiDAR localization becomes unstable
A map-based localiser holds when scans match the map. Find out why they stop matching.
1. Symptoms
- The pose jumps or oscillates indoors.
- Particles spread and split.
- Localisation holds in some rooms and fails in others.
2. Possible causes
- The environment differs from the map (moved furniture, new objects).
- Symmetric or featureless places (corridors, halls).
- Motion distortion in the scans while turning.
- Wrong sensor frame, range limits or scan rate.
- Odometry noise parameters too small or too large.
- Poor initial pose.
3. Measurements to collect
- Particle spread or covariance over time.
- Match score against the map if available.
- Scan overlaid on the map at the time of failure.
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 /particle_cloud --once
ros2 topic echo /amcl_pose --field pose.covariance
ros2 topic hz /scan5. Step-by-step investigation
- Overlay the scan on the map at the failure.
- Check the places where it fails for symmetry or change.
- Check scan frame, range and deskew.
- Check odometry noise parameters and the update thresholds.
- Check the initial pose handling.
6. Corrective actions
- Update the map or add landmarks.
- Add constraints (markers, other sensors) in symmetric places.
- Deskew scans and fix frames.
- Tune odometry and update parameters.
7. Validation after the fix
- Localisation stays within the reported covariance over repeated runs through the problem places.
References
- Nav2 AMCL README and default parameters (jazzy): nav2_amcl, nav2_params.yaml, read 2026-11-06.