Kalibr can be installed in two ways: using Docker (recommended for most users) or building from source inside a ROS catkin workspace. Docker is simpler because it bundles all dependencies — including the correct ROS distribution, Python version, and native libraries — into a reproducible image.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ethz-asl/kalibr/llms.txt
Use this file to discover all available pages before exploring further.
System requirements
- OS: Ubuntu 16.04, 18.04, or 20.04 (64-bit)
- ROS: ROS 1 (Kinetic, Melodic, or Noetic depending on Ubuntu version)
- Docker: Required for the Docker installation path
- RAM: 8 GB or more recommended for calibration with large datasets
- Docker (recommended)
- Source build
Docker is the easiest way to get a fully working Kalibr environment. The provided Dockerfiles build a self-contained image with all system dependencies, ROS, and the compiled Kalibr workspace.
Install Docker
If Docker is not already installed, follow the official Docker installation guide for your Ubuntu version. After installing, verify it works:
Build the Docker image
Choose the Dockerfile that matches your target Ubuntu version. Ubuntu 20.04 is recommended.This builds from
- Ubuntu 20.04 (recommended)
- Ubuntu 18.04
- Ubuntu 16.04
osrf/ros:noetic-desktop-full and installs:- Python 3 with scipy, matplotlib, and related packages
- Eigen3, Boost, SuiteSparse, OpenCV, TBB, BLAS, LAPACK
python3-catkin-toolsfor the build system- Kalibr compiled in Release mode inside
/catkin_ws
The build compiles all C++ libraries with
-j$(nproc) threads. On a 4-core machine, expect 15–30 minutes for the first build.Run the container
Mount a local directory into the container so you can pass ROS bags in and retrieve calibration results without copying files manually.The container’s
ENTRYPOINT sets KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 and drops you into a shell inside /catkin_ws with the ROS environment ready to use.Troubleshooting
Docker build fails on apt-get install
Docker build fails on apt-get install
Run
docker build --no-cache to force a fresh package list fetch, or check that your host has network access during the build.catkin build fails with 'Could not find package'
catkin build fails with 'Could not find package'
Verify that
catkin config --extend points to the correct ROS installation path and that you sourced the ROS setup script (source /opt/ros/<distro>/setup.bash) before running catkin build.kalibr_calibrate_cameras: command not found
kalibr_calibrate_cameras: command not found
You need to source the workspace before using Kalibr commands. Run
source ~/catkin_ws/devel/setup.bash (source build) or source /catkin_ws/devel/setup.bash (Docker).Focal length initialization fails
Focal length initialization fails
Set
export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 before running any calibration command. The Docker image sets this automatically.Next steps
Quickstart
Run your first end-to-end camera calibration with an AprilGrid target.
Calibration targets
Learn how to generate and print AprilGrid and checkerboard calibration targets.