Skip to main content

Cartographer

Source: https://google-cartographer.readthedocs.io/en/latest/#

Cartographer is a system that provides 2D and 3D real-time simultaneous localization and mapping (SLAM) across multiple platforms and sensor configurations.

Technical

  • Cartographer high-level system overview

_images/High-Level System Overview.png

Cartographer is a standalone C++ library. To get started quickly, use our ROS integration.

ROS integration is provided by the Cartographer ROS codebase. You can find complete documentation on how to use Cartographer to integrate with ROS at the Cartographer ROS Read the Docs website.

Please refer to our ROS Integration as a starting point for integrating your system with the standalone library. Currently, this is the best reference.

On Ubuntu 18.04 (Bionic):

# Install the required libraries that are available as debs.
sudo apt-get update
sudo apt-get install -y \
clang \
cmake \
g++ \
git \
google-mock \
libboost-all-dev \
libcairo2-dev \
libceres-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libgflags-dev \
libgoogle-glog-dev \
liblua5.2-dev \
libsuitesparse-dev \
lsb-release \
ninja-build \
python3-sphinx \
stow
# Install Protocol Buffers and Abseil if available.
# No need to build it ourselves.
case "$(lsb_release -sc)" in
jammy|bullseye)
sudo apt-get install -y libgmock-dev protobuf-compiler libabsl-dev ;;
focal|buster)
sudo apt-get install -y libgmock-dev protobuf-compiler ;;
bionic)
;;
esac

git clone https://github.com/abseil/abseil-cpp.git
cd abseil-cpp
git checkout 215105818dfde3174fe799600bb0f3cae233d0bf # 20211102.0
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl \
..
ninja
sudo ninja install
cd /usr/local/stow
sudo stow absl

VERSION="v3.4.1"
# Build and install proto3.
git clone https://github.com/google/protobuf.git
cd protobuf
git checkout tags/${VERSION}
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-Dprotobuf_BUILD_TESTS=OFF \
../cmake
ninja
sudo ninja install
# Build and install Cartographer.
cd cartographer
mkdir build
cd build
cmake .. -G Ninja
ninja
CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install

System

While Cartographer may run on other systems, it is confirmed to run on systems that meet the following requirements:

  • A modern 64-bit CPU (e.g. 3rd generation i7)
  • 16 GB RAM
  • Ubuntu 18.04(Bionic)、20.04(Focal)、22.04(Jammy)
  • gcc versions 7.5.0, 8.3.0, 9.3.0, 10.2.1, 11.2.0

Known

  • The 32-bit version has libeigen alignment issues that can cause crashes and/or memory corruption.

How to cite

For background information on the algorithms developed for Cartographer, please see the following publications. If you use Cartographer for research, we would be grateful if you could cite our paper.

W. Hess, D. Kohler, H. Rapp, and D. Andor, “Real-time loop closure in 2D LIDAR SLAM,” in Robotics and Automation (ICRA), 2016 IEEE International Conference on Robotics and Automation. IEEE, 2016, pp. 1271–1278.

More information

  1. Cartographer pure positioning + Movebase navigation
  2. Cartographer's pure positioning system replaces AMCL