Cartographer Documentation

Welcome! This site contains unofficial, 3rd-party, LLM-generated documentation for the cartographer_ros repository and its main dependency. This “documentation” covers the core Cartographer SLAM library and its ROS 2 integration.

A few quick notes to get started:

  1. A few artefacts from the generation process may remain. If you see any relative paths pointing to “CARTOGRAPHER/” you may read them as if “CARTOGRAPHER/” were replaced by “https://github.com/ros2/”

  2. If you are in any way affiliated with ROS or the actual people developing or maintaining Cartographer and you want control of this site (or just want me to take it down), I would be more than happy to give it to you! Send an email to google.cartographer [AT] atomicmail.io and we can exchange PGP keys.

  3. Contributions of all kinds (restructuring, edits, corrects, etc.) are very very welcome. You can create a pull request here.

Repositories

Overview

Cartographer Core Library (cartographer/)

The core C++ library providing real-time simultaneous localization and mapping (SLAM) in 2D and 3D. It implements a pose-graph-based SLAM algorithm with local submap construction and global loop closure optimization.

Key components:

  • Mapping (cartographer/mapping) — SLAM algorithm core: MapBuilder, TrajectoryBuilder, PoseGraph, Submaps

  • Sensor (cartographer/sensor) — Sensor data types, collation, filters, and transforms

  • Common (cartographer/common) — Time system, Lua configuration, thread pool, math utilities

Read the Cartographer Overview →

Cartographer ROS 2 Integration (cartographer_ros/)

The ROS 2 package that integrates Cartographer with the Robot Operating System, providing nodes, message bridges, configuration files, launch files, and visualization.

Key packages:

  • cartographer_ros — Main integration: nodes, bridges, configuration, launch files

  • cartographer_ros_msgs — ROS message and service definitions

  • cartographer_rviz — RViz visualization plugin for submaps

Read the cartographer_ros Overview →

Quick Navigation

Area

Entry Point

Core SLAM Algorithm

Cartographer Overview

Building & Running

Cartographer Quickstart

ROS 2 Integration

cartographer_ros Overview

ROS 2 Quickstart

cartographer_ros Quickstart

Message Definitions

cartographer_ros_msgs

RViz Visualization

cartographer_rviz

Cross-Repository Relationships

cartographer (core C++ library)
    │
    ├── mapping/ → MapBuilder, PoseGraph, Submaps, TrajectoryBuilder
    ├── sensor/  → RangeData, PointCloud, ImuData, Collator, Filters
    └── common/  → Time, LuaParameterDictionary, ThreadPool
          │
          ▼
cartographer_ros (ROS 2 integration)
    │
    ├── cartographer_ros/     → Node, MapBuilderBridge, SensorBridge, TfBridge
    ├── cartographer_ros_msgs/ → SubmapList, TrajectoryQuery, StartTrajectory, etc.
    └── cartographer_rviz/    → SubmapsDisplay plugin

The ROS 2 integration wraps the core library:

  • MapBuilderBridge wraps MapBuilderInterface

  • SensorBridge converts ROS messages to cartographer::sensor::* types

  • TfBridge converts ROS TF to cartographer::transform::Rigid3d

  • cartographer_ros_msgs defines the ROS interfaces for control and visualization

  • cartographer_rviz visualizes submaps via the SubmapQuery service

Configuration

Both repositories use Lua configuration files:

  • Cartographer: configuration_files/ — map_builder.lua, trajectory_builder_2d.lua, trajectory_builder_3d.lua, pose_graph.lua

  • cartographer_ros: configuration_files/ — Robot-specific configs (backpack_2d.lua, backpack_3d.lua, mir-100-mapping.lua, etc.)

License

Cartographer is licensed under the Apache License 2.0. The ROS 2 integration (cartographer_ros) was ported by Wyca Robotics and is also licensed under Apache 2.0.