ProjekinAja. Robotics Stage 5 · Perception SLAM Lesson 5.10
● Stage 5 · Lesson 5.10

Production SLAM Systems: Cartographer, SLAM Toolbox, and Choosing Wisely

The choice of SLAM system is not a personal preference — it is a constraint satisfaction problem between your sensor suite, compute budget, and environment type.

⏱ ~28 min read 🗺 Systems comparison 🤖 FollowBot milestone

🎯 By the end you'll understand

What distinguishes Cartographer, SLAM Toolbox, LIO-SAM, and ORB-SLAM3 at the algorithmic level — not just a feature comparison table but the structural reason each one exists. When to choose each and when explicitly NOT to. Why indoor SLAM systems fail outdoors in a specific and predictable way. How to run SLAM Toolbox on FollowBot in Gazebo and what parameters actually matter. And how to use a decision-tree framework to turn your sensor suite, compute budget, and environment type into a defensible system choice.

KEY INSIGHTSLAM system selection is constraint satisfaction, not preference

Picking the "best" SLAM library is a category error. Picking the SLAM library whose assumptions match your robot, environment, and compute budget is an engineering decision.

Every SLAM algorithm is a bag of assumptions: about sensor modalities, about how often the robot closes a loop, about how large the map gets, about how much compute you can afford between scans. When the environment violates those assumptions — and it always eventually does — the map corrupts, the localization diverges, or the system crashes. The practitioner's job is not to find the best SLAM system; it is to find the system whose assumption set overlaps most completely with the robot's actual operating conditions.

🔑 The three governing constraints

Three variables dominate SLAM system selection: sensor suite (what observables you have — laser range, dense point cloud, camera images, IMU, GPS); environment type (indoor corridors with dense features and short loop closures vs. outdoor landscapes with sparse features and km-scale loops); and compute budget (embedded ARM SBC vs. full workstation). A system optimized for one combination fails characteristically — not randomly — when moved to another.

CORE CONCEPTThe four production systems: what problem each one solves

Four SLAM libraries dominate production ROS deployments. They were each built to solve a specific, different problem. Understanding the original problem is the fastest path to understanding the system's assumption set — and therefore its failure modes.

System Original problem Core algorithm Sensor requirement Loop-closure scale
CartographerGoogle Street View building mapping (2016)Graph SLAM + scan matching + branch-and-bound2D or 3D LIDAR only10–500 m loops
SLAM ToolboxLifelong indoor mapping for service robotsGraph SLAM + Karto scan matcher + plugin architecture2D LIDAR; ROS 2 native5–200 m loops
LIO-SAMOutdoor autonomous vehicles, UAVsFactor graph + LIDAR-inertial odometry + IMU preintegration3D LIDAR + IMU (tight coupling)100 m–km loops
ORB-SLAM3Monocular/stereo MAV indoor navigationFeature-based visual SLAM + multi-map + IMU fusionCamera (mono/stereo/RGB-D) + optional IMU5–100 m loops

The table above is a starting point. What matters is understanding why each one was built the way it was — because the architectural decisions that make a system excellent in its intended context are exactly what make it brittle in a different one.

HOW IT WORKSCartographer: graph SLAM with strong loop closure

Cartographer (Hess et al., Google, 2016) solved a specific production problem: mapping large buildings for Street View using a 2D or 3D LIDAR mounted on a backpack. The algorithm needed to handle long corridors, revisit areas after 10–15 minutes, and produce globally consistent maps without GPS indoors.

Cartographer's architecture has two separable threads running in parallel: local SLAM (scan-to-submap matching using a real-time correlative scan matcher and Ceres-based optimization) and global SLAM (a pose graph optimizer that detects loop closures using a branch-and-bound scan matcher and then corrects the entire map). This separation is architecturally significant: local SLAM runs at sensor rate and is allowed to accumulate small drift; global SLAM corrects it by finding loop closures and optimizing the full pose graph.

LIDAR scan 10–20 Hz LOCAL SLAM (fast) Correlative matcher Ceres optimizer → submap GLOBAL SLAM (slower) Branch-and-bound LC Pose-graph optimizer → global correction submaps loop-closure correction Occupancy grid .pgm + .yaml
Cartographer's two-thread design: local SLAM (Ceres optimizer) runs at scan rate and builds submaps; global SLAM (branch-and-bound + pose graph) runs asynchronously and corrects for loop closures. The correction flows back to the local thread's trajectory.

When to use Cartographer: you have a 2D or 3D LIDAR, you operate in a structured environment with revisit opportunities (corridors, offices, warehouses), and you need a globally consistent map for subsequent localization runs. Cartographer's loop closure detection is reliable and well-tested at scales up to several hundred meters.

When NOT to use Cartographer: you have a camera but no LIDAR; you need lifelong re-use of an existing map (Cartographer always builds a new map, it does not support map reuse); your environment has very few repeating features for scan matching (outdoor sparse vegetation). Also: the ROS 2 port of Cartographer has historically lagged behind the ROS 1 version and had maintenance gaps; check the current state of cartographer_ros before committing. SLAM Toolbox is frequently the better choice for ROS 2 native projects.

Key Cartographer parameters that matter in practice:

cartographer_config.luatuning the loop closure budget
-- How often to search for loop closures (higher = more CPU)
POSE_GRAPH.optimize_every_n_nodes = 90   -- default 90; lower for tighter LC

-- Minimum score for a loop closure match to be accepted
POSE_GRAPH.constraint_builder.min_score = 0.55  -- lower = more LC; more false pos

-- Max range of LIDAR to use for scan matching (outdoor: increase)
TRAJECTORY_BUILDER_2D.max_range = 20.
TRAJECTORY_BUILDER_2D.min_range = 0.2

-- Submap size: smaller = more loop closure candidates, more memory
TRAJECTORY_BUILDER_2D.submaps.num_range_data = 90

HOW IT WORKSSLAM Toolbox: lifelong mapping and ROS 2 native design

SLAM Toolbox (Macenski et al., 2019–) was designed to solve a problem Cartographer explicitly does not address: lifelong mapping. A service robot that cleans an office every day should not rebuild the map from scratch each session. It should localize in the existing map, extend it if areas changed, and merge new observations into the prior map. Cartographer cannot do this. SLAM Toolbox was built specifically to do this.

The algorithm uses the Karto scan matcher for local scan-to-map matching, and a sparse-bundle pose graph for global optimization. These are two separate architectural layers: the front-end (Karto scan matcher) runs at sensor rate and produces successive odometry edges; the back-end (Ceres-based pose graph optimizer, configured via the solver_plugin parameter) runs asynchronously and incorporates loop closure corrections. Tuning the scan matcher and tuning the optimizer are independent tasks. But the key architectural innovations are its three operational modes:

1

Online synchronous SLAM

Standard real-time mapping. Every scan is processed before the next arrives. Equivalent to Cartographer's basic use case. Used for initial map building. The slam_toolbox node runs in mapping mode.

2

Localization-only mode

Load an existing serialized map (.posegraph + .data files) and localize against it without building new map structure. Drop-in replacement for AMCL in ROS 2 Nav2, with the advantage that the full pose graph is retained and loop closures can still fire if the robot revisits a known area.

3

Lifelong / continuous mapping mode

Load an existing map and continue extending it. New observations are added to the graph; old nodes are marginalized out to keep memory bounded. Dynamic environments can be handled by a configurable change-detection layer. This is the mode that makes SLAM Toolbox unique. No other mainstream ROS 2 SLAM library offers this.

Why SLAM Toolbox is the default for FollowBot: FollowBot is a ROS 2 native project running in indoor environments. SLAM Toolbox is the Nav2 project's officially recommended SLAM backend. Its ROS 2 integration is first-class; it publishes the map, odom, and relevant TF frames in the correct Nav2-expected topology. Starting from SLAM Toolbox and switching to Cartographer if needed is far less disruptive than the reverse.

SLAM Toolbox launch configuration for ROS 2 Humble:

slam_toolbox_params.yamlonline async config for FollowBot
slam_toolbox:
  ros__parameters:
    # Scan topic from RPLIDAR A2
    odom_frame: odom
    map_frame: map
    base_frame: base_link
    scan_topic: /scan

    # Mode: mapping | localization | lifelong
    mode: mapping

    # Scan matching parameters
    minimum_travel_distance: 0.5    # add node if moved > 0.5 m
    minimum_travel_heading: 0.5    # or turned > ~28 deg
    scan_buffer_size: 10
    link_match_minimum_response_fine: 0.45

    # Loop closure budget
    loop_search_maximum_distance: 3.0
    do_loop_closing: true
    loop_match_minimum_chain_size: 10
    loop_match_maximum_variance_coarse: 3.0

When NOT to use SLAM Toolbox: outdoors. The Karto scan matcher depends on dense, repeating LIDAR structure (walls, doorframes) for match scores. In an outdoor field with sparse vegetation, match scores collapse. Loop closure distances in outdoor environments (50–500 m) exceed the scan matcher's reliable range. The pose graph accumulates uncorrected drift until it diverges catastrophically. You will not see a gradual degradation; you will see the map fold onto itself at the first attempted loop closure.

HOW IT WORKSLIO-SAM: LIDAR-inertial for outdoor environments

LIO-SAM (Shan et al., 2020) was designed for the problem Cartographer and SLAM Toolbox explicitly avoid: outdoor environments at large scale, with fast motion and sparse geometric features. It solves this by tightly coupling a 3D LIDAR with an IMU using IMU preintegration, which allows scan-to-scan matching to remain accurate even when the robot is moving fast enough that point clouds are significantly motion-distorted.

LIO-SAM uses a factor graph (iSAM2 via GTSAM) with three factor types: IMU preintegration factors (high-frequency motion prior from the IMU), LIDAR odometry factors (scan-to-submap matching using feature extraction of edge and planar points from a VLP-16 or Ouster-style 3D scanner), and loop closure factors from an ICP-based place-recognition module. GPS factors can also be fused if available, giving a fourth anchor for outdoor drift correction.

When to use LIO-SAM: 3D LIDAR available, IMU available, outdoor or large-scale indoor environment (warehouse with 50+ m corridors), fast platform (UGV or UAV), GPS optionally available. LIO-SAM genuinely outperforms Cartographer and SLAM Toolbox in these conditions because scan-to-scan ICP on structured 3D point clouds is more robust to feature sparsity than 2D scan matching.

When NOT to use LIO-SAM: you have only a 2D LIDAR (LIO-SAM requires a spinning 3D LIDAR with a ring structure for feature extraction). It also requires a calibrated IMU with a known extrinsic transform to the LIDAR (more setup than purely 2D systems). And critically: if your indoor environment is small (a single room or a 20 m corridor), LIO-SAM is serious overkill — SLAM Toolbox will outperform it on a constrained compute budget.

💡 The motion distortion problem LIO-SAM solves

A spinning 3D LIDAR (e.g., Velodyne VLP-16) takes ~100 ms to complete one full rotation. During that time, a fast-moving robot moves. The front of the scan was taken when the robot was at position A; the back was taken when the robot was at position B. Without IMU-based de-distortion, the resulting point cloud is geometrically inconsistent — walls curve, ground planes tilt. At 0.5 m/s this error is small. At 5 m/s (a UGV in outdoor terrain) it is large enough to make scan matching fail. LIO-SAM uses the IMU to interpolate the robot's pose during each scan rotation and correct each point to a common reference time, producing a geometrically consistent cloud for matching.

HOW IT WORKSORB-SLAM3: visual-inertial for camera-primary platforms

ORB-SLAM3 (Campos et al., 2021) is the mature production version of the ORB-SLAM line, now supporting monocular, stereo, RGB-D, and monocular/stereo + IMU configurations. It was designed for platforms where a LIDAR is too heavy (MAVs) or too expensive, and a camera is the primary ranging sensor.

ORB-SLAM3's core loop is: extract ORB (Oriented FAST and Rotated BRIEF) feature keypoints from each frame; match against the current local map and recent keyframes using a vocabulary tree (DBoW2); estimate camera pose via EPnP; detect loop closures via DBoW2 bag-of-words retrieval; optimize via pose graph; optionally fuse IMU using the visual-inertial initialization procedure from Mur-Artal and Tardos (2017). The multi-map system allows the algorithm to seamlessly continue mapping after a period of tracking loss, rather than failing.

When to use ORB-SLAM3: camera-primary platform (no LIDAR budget), good lighting conditions, textured environments (indoor offices, corridors with posters or furniture). ORB-SLAM3 with an RGB-D camera (like FollowBot's RealSense D435) can produce dense-ish maps if you bolt on OctoMap or a dense reconstruction pipeline. For a handheld device or lightweight drone, ORB-SLAM3 is often the only viable option.

When NOT to use ORB-SLAM3: low-texture environments (white corridors, dark warehouses), rapidly changing lighting (greenhouse, outdoor at dawn/dusk), fast rotational motion without IMU. Monocular ORB-SLAM3 has no absolute scale; it will give a structurally consistent map with an unknown scale factor, which is useless for navigation without careful initialization. RGB-D mode on a RealSense D435 has reliable depth only to about 4 m, which limits the loop-closure search radius in large spaces.

📖 Why ORB features are special

ORB (Oriented FAST and Rotated BRIEF) was designed to be fast enough for real-time SLAM without GPU acceleration. FAST detects keypoints in ~2 ms per image. BRIEF builds a binary descriptor by comparing pairs of pixel intensities at pre-computed locations around each keypoint. ORB adds rotation invariance by computing the keypoint's dominant orientation first. The result: a 256-bit descriptor that can be matched in microseconds using XOR and popcount operations. DBoW2 builds a vocabulary tree from ORB descriptors offline, then uses it for sub-linear retrieval of candidate loop-closure frames at runtime. This bag-of-words retrieval is what makes ORB-SLAM3's loop detection scale — it does not need to compare the current frame against every previous keyframe linearly.

SEE ITSLAM system decision tree — force the tradeoff

Configure FollowBot's (or your own) sensor suite, environment type, and compute budget below. The decision tree evaluates your combination against each system's assumption set and surfaces the recommended choice with its known failure modes and critical parameter notes. There is no "always correct" answer — pay attention to the failure mode column as much as the recommendation itself.

⚙ Interactive · SLAM System Selector

Toggle sensors, environment, and compute. The recommendation updates instantly. Every configuration has at least one critical failure mode — the widget reveals what it is.

Sensor suite
2D LIDAR
3D LIDAR
Camera
IMU
GPS
Environment type
Compute budget
Expected map accuracy for FollowBot's sensor suite (2D LIDAR + camera + IMU, indoor)

Accuracy = estimated mean position error after a complete loop in a 15×10 m test room. Numbers represent real-world ballpark values from published evaluations; your mileage will vary with scan rate, environment density, and tuning.

The worst decision a learner makes with this tool is choosing a system that checks all the "yes" boxes and ignoring the failure mode. Run the widget with FollowBot's default sensor suite (2D LIDAR + camera + IMU, no GPS, indoor, embedded) — notice that SLAM Toolbox is recommended but its critical failure is already documented: move this robot outdoors, and the map will fold.

FOLLOWBOTRunning SLAM Toolbox in Gazebo: the stage milestone

At this stage of the FollowBot build, all upstream milestones are complete: camera intrinsics are calibrated (reprojection error < 0.5 px), LIDAR-camera extrinsic calibration is validated, YOLOv8 person detection is integrated in ROS 2, and LIDAR cluster + camera bbox fusion produces a stable 3D person position at 10 Hz. The final milestone is SLAM Toolbox building an occupancy map, with the grid inflated and ready for Nav2.

The launch sequence for SLAM Toolbox online synchronous SLAM on FollowBot:

followbot_slam.launch.pyROS 2 Humble · Gazebo sim
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
import os
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
    slam_params = os.path.join(
        get_package_share_directory('followbot_navigation'),
        'config', 'slam_toolbox_params.yaml'
    )

    slam_node = Node(
        package='slam_toolbox',
        executable='async_slam_toolbox_node',   # asynchronous: drops scans if busy
        name='slam_toolbox',
        parameters=[slam_params],
        output='screen'
    )

    # Costmap inflation — radius 0.20 m for FollowBot chassis width
    costmap_node = Node(
        package='nav2_costmap_2d',
        executable='nav2_costmap_2d',
        name='global_costmap',
        parameters=[{'inflation_radius': 0.20}]
    )

    return LaunchDescription([slam_node, costmap_node])

Three verification steps that determine whether the SLAM milestone is truly complete:

1

Verify TF tree is correct before starting SLAM

SLAM Toolbox publishes the map → odom transform. The odom → base_link transform must already exist (from wheel encoders + IMU via the EKF node). Check with ros2 run tf2_tools view_frames and confirm the chain is: map → odom → base_link → laser. A broken TF chain is the most common reason SLAM Toolbox silently fails to produce a map — it receives no error, it simply publishes nothing useful.

2

Drive a full loop and check map consistency

In Gazebo, drive FollowBot around the simulated test room in a closed loop. On return to the start position, the map should show a single consistent room outline with less than ~5 cm misalignment at the junction. If the loop is visibly misaligned by more than ~10 cm, the scan matcher parameters need tightening (link_match_minimum_response_fine too low, or minimum_travel_distance too large — too few nodes in the graph means fewer loop closure opportunities).

3

Serialize and reload the map

Save the completed map: call the /slam_toolbox/serialize_map service with a file path. This writes the .posegraph and .data files. Then restart the node in localization mode and verify that the robot localizes correctly in the saved map. This is the milestone state for Stage 6 navigation: a serialized, inflated occupancy grid ready to serve as the navigation map.

🔑 Stage 5 milestone: what "done" looks like

Camera intrinsics calibrated (reprojection < 0.5 px) ✓. LIDAR-camera extrinsic calibrated with validated residual ✓. YOLOv8 person detection in ROS 2 ✓. LIDAR + camera bbox fusion at 10 Hz ✓. SLAM Toolbox building a consistent occupancy map in Gazebo ✓. Occupancy grid inflated at 0.20 m radius and available on /map topic. When all six are green, Stage 6 (planning and deployment) can begin.

One thing to get right early: the async_slam_toolbox_node vs. sync_slam_toolbox_node choice. The synchronous node blocks on every scan and processes them in order — never drops a scan. On an embedded compute (Jetson Nano), this can cause the node to run behind real time, causing the map to lag the robot. The asynchronous node drops scans when it cannot keep up but stays on the real-time wall clock. For Gazebo simulation on a laptop, either works. For hardware deployment on embedded compute, start with async.

WEAKNESSWhere this bites: the three worst SLAM deployment mistakes

✗ Taking an indoor SLAM system outdoors

This is the most common and most catastrophic SLAM failure in field deployments. SLAM Toolbox and Cartographer are tuned for indoor structural geometry: walls at 1–5 m, clear planar returns, loop-closure distances of 5–50 m. Move the robot outdoors to a parking lot or field, and three things happen simultaneously: (1) the scan matcher receives sparse, non-planar LIDAR returns from vegetation and ground; match scores drop below the acceptance threshold; local drift accumulates uncorrected; (2) loop-closure distances grow to 100+ m, far beyond the scan matcher's reliable range; no loop closures fire; pose graph accumulates uncorrected drift; (3) when the robot finally returns close to its start and a loop closure does fire on noisy data, the correction is large and abrupt — the map folds. The symptom is a "map explosion" — walls appear to duplicate and rotate. The fix is LIO-SAM or a GPS-aided SLAM system, not parameter tuning of SLAM Toolbox.

✗ Choosing a SLAM system before verifying the TF tree

Every SLAM library documents required transforms, but this is almost never checked systematically in early integration. SLAM Toolbox requires a valid odom → base_link transform at startup; if it is missing, publishing, or has a stale timestamp, the node starts, receives scans, and publishes nothing — silently. The map topic exists but is empty. The most common diagnosis is "SLAM Toolbox is broken," followed by two hours of parameter tuning, followed by discovering that the EKF node was not started. Protocol: run ros2 run tf2_tools view_frames and verify the complete TF chain before starting any SLAM node. This should be a launch-file pre-condition check, not a debugging step.

✗ Using ORB-SLAM3 monocular without solving the scale problem

Monocular ORB-SLAM3 produces a metrically consistent map — up to an unknown scale factor. The map is correct in structure (corridors are corridors, rooms are rooms) but every distance is multiplied by an unknown constant. If you initialize by moving forward 1 m (knowing the true distance), you can lock the scale early, but it will drift over time unless IMU is fused. Navigation algorithms that use metric distances (obstacle inflation radius, goal tolerance, safety stops) will receive the wrong numbers and behave unpredictably. Use RGB-D mode (with a RealSense D435 at < 4 m) or stereo mode (known baseline = known scale) for any navigation application. Monocular is fine for structure-from-motion mapping where you post-process with a known ground truth to recover scale.

KEY INSIGHTHow it connects

  • 5.9 · SLAM: Simultaneous Localization and Mapping — the algorithmic foundations underlying all four systems here: the pose graph, the scan matching objective, and the probabilistic formulation of loop closure. The current lesson is the applied selection and deployment layer on top of those foundations. If the pose graph formulation is unclear, return to 5.9 before tuning Cartographer or SLAM Toolbox parameters.
  • 4.9 · Multi-Sensor Fusion on FollowBot: Architecture and Covariance Design — the EKF that produces the odom → base_link transform that every SLAM system here depends on. A misconfigured EKF covariance will cause SLAM scan matching to be overconfident or underconfident, directly affecting map quality. The covariance design choices made in 4.9 have load-bearing consequences for SLAM Toolbox's loop closure acceptance threshold.
  • 1.5 · TF2: The Transform Tree at Runtime — the TF2 chain (map → odom → base_link → laser) that SLAM systems publish and consume. Every SLAM failure described in the Weakness section is ultimately a TF failure at some level: wrong frame, stale timestamp, broken chain. The correct mental model for debugging SLAM is: TF first, algorithm second.
  • 6.1 · Configuration Space: The Correct Abstraction for Planning → — the next stage begins with the occupancy map that SLAM Toolbox just produced. Stage 6 consumes the inflated costmap as the configuration space for motion planning. The inflation radius chosen for the SLAM Toolbox costmap here is a direct input to the C-space obstacle representation in 6.1.

GLOSSARYKey terms

Graph SLAM
A SLAM formulation that represents the robot's trajectory as a graph of pose nodes connected by edge constraints (odometry between adjacent nodes, scan-matching loop closures between non-adjacent nodes). Solving SLAM = finding the node positions that minimize the total error over all edge constraints. Used by Cartographer, SLAM Toolbox, and LIO-SAM.
Scan matching
The process of estimating the rigid transform between two LIDAR scans (or a scan and a submap) that aligns them best. Algorithms include ICP (iterative closest point), NDT (normal distributions transform), and correlative scan matching (used in Cartographer). The quality of scan matching is the primary determinant of local SLAM accuracy.
Loop closure
The detection that the robot has returned to a previously visited location, followed by the insertion of a constraint into the pose graph between the current pose and the prior pose at that location. Loop closures correct accumulated drift but can corrupt the map if the closure is incorrect (a false positive from feature ambiguity).
IMU preintegration
A technique for combining a sequence of high-frequency IMU measurements into a single integrated motion prior between two keyframe timestamps. Used in LIO-SAM and ORB-SLAM3 IMU fusion. Avoids reintegrating the full IMU sequence when the pose graph is optimized — only the preintegrated constraint needs to change.
Lifelong mapping
A SLAM operational mode (unique to SLAM Toolbox among mainstream ROS 2 systems) in which the robot loads a prior map from a previous session and continues extending and updating it, rather than rebuilding from scratch. Enables incremental map maintenance in dynamic environments over days or weeks.
ORB (Oriented FAST and Rotated BRIEF)
A visual feature descriptor combining FAST keypoint detection with BRIEF binary descriptors, augmented with rotation invariance. Designed for real-time operation without GPU. Used in ORB-SLAM3 for keyframe matching and loop closure via DBoW2 vocabulary tree retrieval.
Costmap inflation
The process of expanding obstacle regions in the occupancy grid by the robot's footprint radius plus a safety margin. The inflated costmap is the configuration space used by Nav2 planners: any path in the inflated-free space is guaranteed to keep the robot's body clear of obstacles. The inflation radius must be tuned per robot chassis width.
Submap (Cartographer)
A local occupancy grid built from a fixed number of consecutive LIDAR scans in Cartographer. Submaps are the unit of global SLAM: loop closures are detected between the current scan and existing submaps, and the pose graph is defined over submap poses rather than individual scan poses.

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1What is the structural reason that SLAM Toolbox fails outdoors, and why is this failure non-obvious until it occurs?›

SLAM Toolbox's scan matcher (Karto) depends on dense, repeating planar LIDAR returns — the kind produced by indoor walls, doorframes, and furniture. Outdoors, vegetation produces sparse, non-planar returns; match scores fall below the acceptance threshold; and loop closures stop firing. The accumulated drift in the pose graph grows uncorrected. The failure is non-obvious because it happens gradually: the map looks plausible for the first 20–30 m, and only when the robot attempts a loop closure at large distance does the abrupt graph correction reveal the total accumulated error — often as a dramatic "map fold" where walls appear to duplicate. Until that moment, nothing in the ROS logs indicates a problem; the node is healthy and publishing normally. The fix is not parameter tuning (lowering the match score threshold would cause false positives, not better matches); the fix is using a SLAM system designed for outdoor feature sparsity, such as LIO-SAM.

2FollowBot has a 2D LIDAR, an RGB-D camera, and an IMU. Which SLAM system would you choose, and what is the one critical failure mode to monitor?›

For indoor operation with this sensor suite, SLAM Toolbox is the correct choice. It natively consumes 2D LIDAR, is ROS 2 native and integrated with Nav2, runs on embedded compute (Jetson Nano can handle the Karto scan matcher at 10 Hz), and supports lifelong mapping for multi-session use. The critical failure mode to monitor is the TF chain: SLAM Toolbox requires a valid, non-stale odom → base_link transform from the EKF node. If the EKF is not running or is misconfigured, SLAM Toolbox receives scans but cannot produce a map — it fails silently. The second critical failure mode is the match quality metric: if link_match_minimum_response_fine is set too low, false scan-match acceptances accumulate and distort the map. Monitor the /slam_toolbox/scan_matching_score topic; scores below 0.3 consistently indicate that the environment is not producing reliable matches.

3What does LIO-SAM's IMU preintegration factor actually do that scan matching alone cannot?›

IMU preintegration solves the motion distortion problem in spinning 3D LIDARs. A VLP-16 takes ~100 ms per rotation; during that time a fast-moving robot has translated and rotated significantly. Without preintegration, the front-half points and back-half points of the cloud were captured at different robot positions, producing a geometrically inconsistent cloud — walls curve, ground planes tilt — which defeats ICP-based scan matching. IMU preintegration uses the IMU's high-frequency (100–400 Hz) measurements to interpolate the robot's pose at every point's capture time and correct each point to a common reference time, producing a de-distorted, geometrically consistent cloud. It also provides a motion prior between scans that helps ICP converge from a better initial estimate. These two effects together are what allow LIO-SAM to handle fast motion in outdoor environments where SLAM Toolbox fails.

4Why does monocular ORB-SLAM3 produce a map that is useless for metric navigation, and what sensor addition resolves this?›

Monocular SLAM has a fundamental scale ambiguity: a camera image of a 2 m corridor is geometrically identical to an image of a 4 m corridor at twice the distance. Without absolute metric scale information (from a baseline between two cameras, from known object sizes, or from IMU gravity initialization), the map is internally consistent but metrically unconstrained — every distance is correct only up to an unknown scale factor. Nav2's obstacle inflation, goal tolerance, and safety stop distances all depend on metric distances; if they receive values scaled by an unknown constant, the robot's navigation behavior is unpredictable and potentially dangerous (it may stop too early or collide). The resolution is to use either: (1) stereo ORB-SLAM3 (known baseline = known scale), (2) RGB-D ORB-SLAM3 (depth values from the structured-light or Time-of-Flight sensor provide metric scale directly), or (3) visual-inertial ORB-SLAM3 (IMU gravity initialization provides metric scale). For FollowBot with a RealSense D435, RGB-D mode is the natural choice, with the caveat that depth is reliable only to ~4 m.

Next: Stage 6 — planning, deployment, and getting FollowBot into the real world →