Atlas Robotics
SLAMAdvanced

Cartographer: Google's SLAM based on submaps and pose graphs

Atlasbot · 17/8/2026 · 11 min read

Cartographer: Google's SLAM based on submaps and pose graphs
Local submap spliced into a global map via pose-graph optimization

The article slam_toolbox presented a flexible SLAM option. Cartographer— developed by Google — is the most popular remaining option in ROS2, with a distinctly different internal architecture: splitting the map into multiple submap, rather than matching directly into a single global map.

Key concepts

Instead: each new scan matches directly into a gigantic global map
Cartographer grouping a sequence of consecutive scans into a small local submap
              When enough scans are done, close the submap, start a new submap

Scanning fitting into a small, recently updated submap is much more accurate and faster than fitting into a giant map that has accumulated errors over long periods of time — this is the main benefit of this split architecture.

How it works

Each submap is an independent — "island" that needs a separate step to cluster them into a consistent global map. Cartographer constructs a pose-graph: each submap is a node, the constraints between them — from both continuous motion and loop closure (the problem SLAM ) — are edges. The optimizer Ceres Solver (Google's nonlinear optimisation library) finds the place of each submap so that the total deviation between all constraints is the smallest.

Front - end: match scan to current submap (fast, local)
Back - end: Ceres Solver optimizes location of all submap at the same time (periodic, global)

What is the Front-end/Back-end framework as learned in SLAM?, except that the processing unit is the submap instead of the individual scans.

In summary: Splitting into submaps makes the front-end always fit into "fresh" data, with less cumulative error — but in return requires a more complicated pos-graph optimization step to ensure that the submaps match on a global scale. This is the core architecture trade-off that distinguishes Cartographer from directly matched SLAM systems into a single map.

Technical details

Formulas

The submap size (the combined number of scans per submap) is the direct trade - off parameter between local accuracy and the number of back - end constraints to be handled:

Small submaps (few scans/submap):
  + more accurate front-end (very fresh data)
  − more submaps → larger pose graph → more back-end resource use

Large submaps (many scans/submap):
  + fewer submaps → smaller pose graph, lighter back-end
  − less accurate front-end (older data within a long submap)

Parameters

CriterionCartographerslam_toolbox
ArchitectureSubmap + pose-graph (Ceres Solver)Pose - straight (non-divisible submap)
Parametric complexityHigh, needs fine tuning.Lower, more accessible
Lifelong mappingNot availableYes
Private Localization ModeNoYes
MatchingPrecision needed, fine - tuning accustomed.Fast - growing, flexible loops

Practical applications

Compared to slam_toolbox, Cartographer exposed more configurational parameters (submap size, constraint acceptance threshold, weights in Ceres optimal function...) — that are robust when properly fine-tuned for a particular sensor/environment type, but require deeper understanding to achieve good results than using slam_toolbox that is almost "gated is run" with default parameter. For research projects that need the highest possible map accuracy and sufficient time for parameter refinement, Cartographer is often the better choice; for projects that need rapid development loops or frequently changing environments (requiring lifelong mapping), slam_toolbox is more suitable.

Practical example

# Extract the typical Cartographer configuration (.lua config)
TRAJECTORY_BUILDER_2D.submaps.num_range_data = 90  # number of scans per submap
POSE_GRAPH.optimize_every_n_nodes = 90              # frequency run back-end
POSE_GRAPH.constraint_builder.min_score = 0.65       # acceptance of loop closure
Increase num_range_data from 90 to 180:
  → denser submaps, fewer submaps for the same distance
  → lighter back-end (fewer nodes in the pose graph)
  → but the front-end data becomes less fresh near the end of each submap

Lower min_score (for example, 0.65 → 0.55):
  → accepts loop closures more readily (lower matching threshold)
  → greater risk of accepting a FALSE loop closure (confusing 2 similar locations)

This is a specific example of the "more parameters = stronger but deeper understanding" stated in the Real - world Application — where each parameter has a two - way trade - off, with no "always best" value.

Common mistakes

  • Reduction of the min_score threshold is too low to be "easy to have loop closure"— as the above example, increasing the risk of false loop closure acceptance, causing much more severe map distortion than without loop closure.
  • Using Cartographer's default parameter for environments/sensors that are greatly different from the original configuration designed— Cartographer requires closer refinement slam_toolbox, the default parameter does not guarantee fit in all cases.
  • To select Cartographer when truly requiring lifelong mapping — as a comparator, Cartographer does not support this feature readily, considering slam_toolbox if this is an important requirement.
  • Setting submap size too large for environments with many rapidly changing features — "older" submap causes less accurate front-ends to be true in areas where maximum accuracy is required.

Conclusion

Cartographer trade-offs of configurational complexity for deep refinement and high accuracy when properly configuring — submap architecture + pose-graph optimization over Ceres Solver are core differences from slam_toolbox. Choosing between the two is not "which is better than the absolute" but "which fits the available fine - tuning time and feature - specific requirements (lifelong mapping, maximum accuracy)". The next article in this special issue opens the scanning matching mechanism at the more specific algorithmic cascade —LiDAR SLAM.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

Cartographer: Google's SLAM based on submaps and pose graphs — Atlas Robotics