# Cartographer Documentation Welcome! This site contains unofficial, 3rd-party, LLM-generated documentation for the [cartographer_ros](https://github.com/ros2/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](https://github.com/google-cartographer/google-cartographer.github.io/compare). ## Repositories ```{toctree} :maxdepth: 2 :caption: Repositories cartographer/overview cartographer_ros/cartographer_ros/overview ``` ## 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/overview.md) ### 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 →](cartographer_ros/cartographer_ros/overview.md) ## Quick Navigation | Area | Entry Point | |------|-------------| | Core SLAM Algorithm | [Cartographer Overview](cartographer/overview.md) | | Building & Running | [Cartographer Quickstart](cartographer/quickstart.md) | | ROS 2 Integration | [cartographer_ros Overview](cartographer_ros/cartographer_ros/overview.md) | | ROS 2 Quickstart | [cartographer_ros Quickstart](cartographer_ros/cartographer_ros/quickstart.md) | | Message Definitions | [cartographer_ros_msgs](cartographer_ros/cartographer_ros_msgs/index.md) | | RViz Visualization | [cartographer_rviz](cartographer_ros/cartographer_rviz/index.md) | ## 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.