Blog

Robot Localization Outdoors: When to Use AMCL and When You Need SLAM

Tom Cosgrove,

Reading Room: The Fictionlab Blog

TL;DR: Robot localization outdoors comes down to three practical choices: AMCL if you already have a static map and a reliable 2D LiDAR, online SLAM if the environment is unknown or changes often, and GNSS fused with wheel odometry and IMU through an EKF when you operate in open terrain with sky visibility. AMCL is cheap and predictable but assumes a valid prior map. SLAM handles unknown areas at higher CPU cost. GNSS+EKF gives global position without a map, but degrades under trees, near walls, or in urban canyons. Most field deployments on platforms like the Leo Rover combine at least two of these methods.

Why Robot Localization Outdoors Is Harder Than Indoors

Indoor localization benefits from stable geometry, flat floors, and dense wall features. Outdoors, the same algorithms face moving vegetation, uneven ground, sparse landmarks, multipath GNSS signals, and lighting that breaks visual features. Robot localization outdoors therefore rarely relies on a single sensor or a single algorithm. You typically stack a global reference (GNSS or a prior map) with a local one (LiDAR, IMU, wheel encoders) and fuse them.

The three approaches commonly used in ROS 2 field deployments are Adaptive Monte Carlo Localization (AMCL), online SLAM (for example slam_toolbox in localization or mapping mode, or LIO-SAM for 3D LiDAR), and GNSS fused with odometry through robot_localization‘s EKF or UKF nodes. Each answers a different question about your environment.

What AMCL Does and When It Fits

AMCL is a particle filter that tracks a robot’s pose against a known occupancy grid. In ROS 2, nav2_amcl consumes a 2D LiDAR scan and odometry, and it uses a static map commonly published by map_server. Particles are reweighted using the LiDAR sensor model, and the pose estimate converges as long as the map is accurate and the scan has enough geometric structure.

AMCL fits when three conditions hold: the map exists and is stable, the environment has walls or repeatable structures for the LiDAR measurements to lock onto, and the operating area is bounded. A greenhouse aisle, a warehouse yard with fixed racking, or a research plot with fixed markers are typical cases. AMCL will not build a map for you, and it can drift or diverge if large parts of the environment differ from the map.

Practical limits worth noting for outdoor AMCL:

  • 2D LiDAR sees only a horizontal slice. Tall grass, sloped ground, or a robot pitching over a curb can leave too few stable scan features.
  • AMCL assumes that the laser scan is approximately planar in the map frame. Significant roll or pitch can distort the scan relative to the map, so compensate for attitude where possible or use a 3D method.
  • Initial pose must be set within a plausible convergence region. Global localization can be slow or ambiguous outdoors without a GNSS prior or distinctive map features.

When You Actually Need SLAM Instead

SLAM (Simultaneous Localization and Mapping) is the answer when no valid map exists, when the map must be updated between missions, or when the robot must explore. In ROS 2, slam_toolbox is a common choice for 2D LiDAR, offering mapping, localization, and lifelong mapping modes. For 3D LiDAR on rough terrain, LIO-SAM, FAST-LIO2, or KISS-ICP are common choices, although ROS 2 support varies by implementation and port.

Online SLAM costs more CPU and memory than AMCL because it maintains a pose graph and may continuously optimize it. On a Raspberry Pi 4 running the Leo Rover, 2D slam_toolbox can be feasible at modest update rates with an RPLIDAR-class sensor for small maps, depending on scan rate, map size, and parameter settings. Larger maps, or 3D LIO variants, generally need an onboard x86 mini-PC or Jetson-class compute.

Use SLAM when:

  • The site is new every mission (construction, agricultural row scouting, inspection of unknown terrain).
  • The environment shifts enough that a saved map is no longer reliable (moved pallets, harvested crops, seasonal vegetation).
  • You need a map as a deliverable, not just a pose estimate.
  • GNSS is denied or unreliable and no prior map is available.

How GNSS+EKF Fits Into Robot Localization Outdoors

Where the sky is open, GNSS gives you something neither AMCL nor SLAM provides directly: a global reference in a geodetic frame. Standard GNSS typically delivers meter-level position accuracy. RTK-GNSS, using a base station or NTRIP correction stream, can reach centimeter-level accuracy under good sky visibility, according to receiver manufacturer specifications from vendors such as u-blox and Ardusimple.

In ROS 2, the robot_localization package can fuse GNSS with wheel odometry and IMU using an Extended Kalman Filter. A common setup runs two filter instances: a local filter producing continuous odom -> base_link odometry and a global filter that incorporates the GNSS fix, usually converted into a local Cartesian frame through navsat_transform_node. This can provide smooth local odometry plus a globally referenced pose.

GNSS+EKF fits open-field robotics: agricultural monitoring, environmental sampling, solar farm inspection. It breaks down under canopy, near tall buildings, or indoors. In those cases, you can use SLAM or AMCL for the affected segments and design the estimator carefully to manage transitions between global and local references.

Decision Tree: Which Method for Your Site

Before choosing an algorithm, answer three questions about the deployment. The answers usually narrow the choice to one or two viable stacks.

  1. Is the map known and stable? If yes, AMCL is often the lowest-compute path. If no, go to step 2.
  2. Is the terrain open with sky visibility? If yes, GNSS+EKF may be sufficient, possibly with RTK for centimeter-level accuracy. If partially obstructed, plan for a fallback. If no, go to step 3.
  3. Do you need a map as output, or is localization enough? If a map is required, run SLAM. If only localization matters and you can pre-map the site once, build the map with SLAM and switch to AMCL for production.

Comparison Table: AMCL, Online SLAM, GNSS+EKF

The following table summarizes the practical tradeoffs. Accuracy figures are indicative ranges rather than guaranteed performance; your results depend on hardware, calibration, and environment.

  • AMCL (nav2_amcl): Requires a prior 2D map and 2D LiDAR. Accuracy can be on the order of centimeters to decimeters in structured environments, but may degrade substantially outdoors. CPU load is generally low and can run on a Raspberry Pi 4. Cost: LiDAR only, from roughly $100 for an entry-level RPLIDAR upward.
  • Online SLAM (slam_toolbox, LIO-SAM): No prior map needed. Accuracy depends strongly on sensor quality, feature density, loop closures, and trajectory; 2D systems can achieve centimeter-to-decimeter local consistency in structured areas, while 3D LIO can limit drift over long trajectories when well calibrated. CPU load medium to high. Cost: 2D LiDAR from about $100, while 3D LiDAR ranges from several hundred dollars to several thousand dollars depending on the model.
  • GNSS+EKF (robot_localization): No map needed. Standard GNSS is typically meter-level; RTK is commonly specified at approximately 1-3 cm under open sky with correction data and a fixed solution. CPU load minimal. Cost: standard GNSS modules can cost under $50, while RTK hardware and correction infrastructure vary widely in cost.

How the Leo Rover Handles These Three Cases

The Leo Rover supports ROS 2 and accepts modular sensor payloads, so all three localization stacks can be tested on the same chassis. Its differential drive, wheel encoders, and IMU can provide inputs to a robot_localization EKF. Users typically add an RPLIDAR or a small 3D LiDAR for SLAM and AMCL, and a u-blox ZED-F9P or similar receiver for RTK-GNSS work.

In research applications, a common pattern is to prototype with SLAM to characterize the site, then decide whether production runs use AMCL against a saved map or GNSS-driven navigation. For heavier field work or non-standard sensor stacks, Fictionlab’s team supports custom robotics integrations where the localization pipeline is tuned to the specific terrain and mission profile.

Common Failure Modes and How to Mitigate Them

Outdoor localization fails in predictable ways. Knowing the failure mode helps you pick sensors and tune parameters before the field trip, not after.

  • AMCL divergence in feature-poor areas: Open ground with no walls or stable structures provides too little information for scan matching. Add stable landmarks, use 3D LiDAR-based localization, or use GNSS to constrain the initial pose or global estimate.
  • SLAM loop closure failures: Long open loops without revisited landmarks accumulate drift. Plan trajectories that revisit distinctive areas, or add GNSS priors to the pose graph where supported.
  • GNSS multipath near structures: Reflected signals can cause meter-scale errors or jumps. Use receiver-specific solution-quality indicators and measurement covariance or quality filtering to reject unreliable updates.
  • IMU drift on cheap MEMS: Yaw drift dominates dead reckoning error. A magnetometer can help outdoors if it is calibrated and installed away from motor magnetic interference.

FAQ

Can AMCL work outdoors at all?

Yes, in bounded, structured outdoor areas such as walled yards, greenhouses, or plots with fixed reflectors. AMCL needs geometric structure the 2D scan can match. Open fields without landmarks are unsuitable.

Do you need RTK-GNSS or is standard GNSS enough?

Standard GNSS is typically accurate to within a few meters, sufficient for coarse waypoint navigation on open ground. RTK can reach roughly 1-3 cm under open sky with a fixed solution and is often needed for row-following in agriculture or docking tasks. Under trees or near buildings, even RTK can lose its fixed solution.

Can you run SLAM and GNSS together?

Yes. Fusing GNSS as a prior in a pose-graph SLAM stack, where supported by the implementation, reduces drift over long trajectories and anchors the map to a global frame. LIO-SAM includes support for GPS factors. This is a standard pattern in field robotics.

What ROS 2 packages should you start with?

For AMCL use nav2_amcl. For 2D SLAM use slam_toolbox. For 3D LiDAR SLAM look at ROS 2-compatible LIO-SAM or FAST-LIO2 implementations. For sensor fusion use robot_localization with navsat_transform_node.

How much compute do you need on the robot?

AMCL and GNSS+EKF can run on a Raspberry Pi 4. 2D SLAM at low update rates can also run on a Pi 4 for small maps. 3D LIO-SAM or FAST-LIO2 generally need a Jetson Orin, Intel NUC, or comparable compute platform.

How do you handle transitions between GNSS and GNSS-denied zones?

Configure robot_localization to accept GNSS updates only when receiver quality and covariance meet defined thresholds, and let LiDAR-based SLAM or AMCL provide localization through denied segments. When GNSS returns, account for the possibility of a correction in the global map frame while preserving continuous local odom output.

Is visual SLAM a practical alternative outdoors?

Visual SLAM (ORB-SLAM3, RTAB-Map) works in feature-rich environments but suffers from changing lighting, shadows, and low-texture terrain. It is used in research, but LiDAR-based methods are often more robust for production field robotics.

Next Step

If your project needs a localization stack tuned to a specific site, sensor budget, or mission profile, Fictionlab’s team can help scope the integration on Leo Rover or a custom chassis. See Fictionlab’s custom robotics services to discuss your requirements.


Read more