Python package for the evaluation of odometry and SLAM
Linux / macOS / Windows / ROS / ROS2
This package provides executables and a small library for handling, evaluating and comparing the trajectory output of odometry and SLAM algorithms.
Supported trajectory formats:
'TUM' trajectory files
'KITTI' pose files
'EuRoC MAV' (.csv groundtruth and TUM trajectory file)
ROS and ROS2 bagfile with geometry_msgs/PoseStamped, geometry_msgs/TransformStamped, geometry_msgs/PoseWithCovarianceStamped, geometry_msgs/PointStamped or nav_msgs/Odometry topics or TF messages
Please use pip only in a proper environment (e.g. uv/uvx, pipx, venv, Pixi or a classic virtual environment).
⚠️ ☠️☠️☠️ ⚠️
Whatever you do, don't use: pip install --user / anything with --break-system-packages / or worst: sudo pip install
From PyPi
If you just want to use the executables of the latest release version, the easiest way is to run:
pip install evo
This will download the package and its dependencies from PyPI and install or upgrade them. If you want, you can subscribe to new releases via https://libraries.io/pypi/evo.
To upgrade to a newer version: pip install --upgrade evo
From Source
Run this in the repository's base folder:
pip install --editable .
Pixi
Pixi is an easy-to-use alternative if you want to have an isolated development environment. Run pixi add evo if you have an existing environment, or clone this repository and run pixi shell to open a dev shell.
Tab completion
Tab completion is supported via the argcomplete package. Run activate-global-python-argcomplete after the installation to use it.
Dependencies
Python packages
evo has some required dependencies that are automatically resolved during installation with pip.
See the pyproject.toml file for all details.
PyQt6 (optional)
PyQt6 will give you the enhanced GUI for plot figures from the "qtagg" matplotlib backend (otherwise: "TkAgg"). If PyQt6 is already installed when installing this package, it will be used as a default (see evo_config show). To change the plot backend afterwards, run evo_config set plot_backend qtagg.
If you run into issues with installing tkinter, trying PyQt6 is a good idea.
ROS (optional)
Some ROS-related features require a ROS installation, see here. We are testing this package with ROS Lyrical.
Reading ROS bag files works also without a ROS installation thanks to the great rosbags package that is installed together with evo. This allows you also to read ROS 1 & 2 bags even if you don't have one of those ROS distros installed. (except for reading /tf topics, because there we need the buffer implementation from ROS)
There are some example trajectories in the source folder in test/data.
1.) Plot multiple trajectories
Here, we plot two KITTI pose files and the ground truth using evo_traj:
cd test/data
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
2.) Run a metric on trajectories
For example, here we calculate the absolute pose error for two trajectories from ORB-SLAM and S-PTAM using evo_ape (KITTI_00_gt.txt is the reference (ground truth)) and plot and save the individual results to .zip files for evo_res:
For an interactive source code documentation, open the Jupyter notebookmetrics_tutorial.ipynb in the notebooks folder of the repository. More infos on Jupyter notebooks: see here
If you have IPython installed, you can launch an IPython shell with a custom evo profile with the command evo_ipython.
Contributing Utilities
A few "inoffical" scripts for special use-cases are collected in the contrib/ directory of the repository. They are inofficial in the sense that they don't ship with the package distribution and thus aren't regularly tested in continuous integration.
Trouble
"😱, this piece of 💩 software doesn't do what I want!!1!1!!"
If you use this package for your research, a footnote with the link to this repository is appreciated: github.com/MichaelGrupp/evo.
...or, for citation with BibTeX:
@misc{grupp2017evo,
title={evo: Python package for the evaluation of odometry and SLAM.},
author={Grupp, Michael},
howpublished={\url{https://github.com/MichaelGrupp/evo}},
year={2017}
}
Works well with
Use together with evo: extensions, drivers, servers and companion tools.
numpyPythie’s Index: 92Fundamental package for array computing in Python1.2B downloads/mo
scipyPythie’s Index: 86Fundamental algorithms for scientific computing in Python423.2M downloads/mo