This repository is a fork of Cartographer ROS.
It has been adapted specifically for ROS 2 Humble running on JetPack 5 Docker containers.
Follow the official Cartographer installation guide to install all required libraries (e.g., Ceres Solver, Eigen3, Lua, glog, protobuf, etc.).
mkdir -p <workspace-dir>/src
cd <workspace-dir>cd src
git clone https://github.com/ros2/cartographer_ros.git
git clone https://github.com/leidZhang/cartographer_ros.git
If needed, also clone perception_pcl (use the humble branch):
git clone -b humble https://github.com/ros-perception/perception_pcl.git
sudo rosdep init # (skip if already initialized)
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
If FindGlog.cmake or other CMake files are missing, build glog v0.6.0 from source:
wget https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz
tar -xvzf v0.6.0.tar.gz
cd glog-0.6.0
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install
Or run the scripts/prepare_glog_cmake.sh if you already have glog installed.
Build Ceres Solver 1.14.x from source for compatibility:
git clone -b 1.14.x https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver && mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install
Ensure the perception_pcl repository is checked out to the humble branch: