Map merging

Map merging is the process of aligning submaps built by different robots (or different sessions of the same robot) into a single consistent global map. Each robot starts SLAM in its own arbitrary coordinate frame; merging turns a collection of disconnected local maps into one shared representation.

The standard pipeline

  1. Find an anchor. Inter-robot loop closures (place recognition + geometric verification) provide relative pose constraints between keyframes of different maps. One verified closure is enough to relate two frames; several make the alignment well-conditioned.
  2. Estimate the inter-map transform. From the matched keyframes, compute the transform between the two map frames — SE(3)\mathrm{SE}(3) when both maps are metric (stereo, RGB-D, VIO), or Sim(3)\mathrm{Sim}(3) (adding scale) when merging monocular maps whose scales differ. Estimation uses PnP or essential-matrix methods over matched features, or 3D-3D alignment of shared landmarks.
  3. Fuse the data. Transform one map into the other’s frame, then merge duplicate content: co-visible landmarks observed by both robots are unified, keyframe databases and covisibility/pose graphs are joined, and the loop-closure edges become ordinary graph edges.
  4. Jointly optimize. Run pose-graph optimization or bundle adjustment over the merged graph so that the alignment error is distributed through both trajectories rather than concentrated at the seam. In decentralized systems this step is a distributed optimization; in centralized ones the server runs global BA.

The alignment math

Given NN pairs of corresponding 3D points {piqi}\{\mathbf{p}_i \leftrightarrow \mathbf{q}_i\} (shared landmarks seen by both maps), the inter-map transform is the closed-form least-squares alignment

mins,R,tipi(sRqi+t)2,\min_{s,\,\mathbf{R},\,\mathbf{t}} \sum_i \left\| \mathbf{p}_i - (s\,\mathbf{R}\,\mathbf{q}_i + \mathbf{t}) \right\|^2,

solved by the Horn/Umeyama method: subtract centroids, take the SVD of the correlation matrix to get R\mathbf{R}, recover ss from the variance ratio (s1s \equiv 1 for the SE(3)\mathrm{SE}(3) case), then t\mathbf{t} from the centroids. Wrapped in RANSAC over the correspondences, this is the workhorse of step 2. When only 2D observations are available (monocular), PnP of one map’s landmarks against the other’s keyframe, or an essential-matrix decomposition, plays the same role.

One map frame must be chosen as the reference (the gauge): typically the older map, the larger map, or the server’s canonical frame keeps its coordinates, and the other map is transformed into it.

Fusing duplicates properly

After alignment the overlap region exists twice. Merging it well matters:

Design considerations and pitfalls

Why it matters for SLAM

Map merging is where collaboration actually pays off: it converts NN partial, drifting maps into one map with more coverage and more loop closures than any single robot could achieve. The same concepts — inter-map transforms, duplicate landmark fusion, joint optimization — recur in multi-session mapping, relocalization into prior maps, and crowd-sourced mapping for AR and autonomous driving.