Package: evo
evoPython package for the evaluation of odometry and SLAMLinux / macOS / Windows / ROS / ROS2This 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 withgeometry_msgs/PoseStamped,geometry_msgs/TransformStamped,geometry_msgs/PoseWithCovarianceStamped,geometry_msgs/PointStampedornav_msgs/Odometrytopics orTF messagesSeeherefor more infos about the formats.Why?evo has several advantages over other public benchmarking tools:common tools for different formatsalgorithmic options for association, alignment, scale adjustment for monocular SLAM etc.flexible options for output,plottingor export (e.g. LaTeX plots or Excel tables)a powerful, configurable CLI that can cover many use casesmodularcoreandtoolslibraries for custom extensionsfaster than other established Python-based tools (see here)What it's not:a 1-to-1 re-implementation of a particular evaluation protocol tailored to a specific dataset.Installation / UpgradeInstallation is easy-peasy if you're familiar with this:https://xkcd.com/1987/#evo supportsPython 3.8+. The last evo version that supportsPython 2.7is1.12.0.
You might also want to use avirtual environment.From PyPiIf you just want to use the executables of the latest release version, the easiest way is to run:pipinstallevo--upgrade--no-binaryevoThis will download the package and its dependencies fromPyPIand install or upgrade them. Depending on your OS, you might be able to usepip2orpip3to specify the Python version you want. Tab completion for Bash terminals is supported via theargcompletepackage on most UNIX systems - open a new shell after the installation to use it (without--no-binary evothe tab completion might not be installed properly). If you want, you can subscribe to new releases viahttps://libraries.io/pypi/evo.From SourceRun this in the repository's base folder:pipinstall--editable.--upgrade--no-binaryevoDependenciesPython packagesevo has some required dependencies that areautomatically resolvedduring installation with pip.
They are specified in theinstall_requirespart of thesetup.pyfile.PyQt5 (optional)PyQt5 will give you the enhanced GUI for plot figures from the "Qt5Agg" matplotlib backend (otherwise: "TkAgg"). If PyQt5 is already installed when installing this package, it will be used as a default (seeevo_config show). To change the plot backend afterwards, runevo_config set plot_backend Qt5Agg.ROS (optional)Some ROS-related features require a ROS installation, seehere. We are testing this package with ROS Noetic and Iron. Previous versions (<= 1.12.0) work with Melodic, Kinetic and Indigo.Command Line InterfaceAfter installation with setup.py or from pip, the following executables can be called globally from your command-line:Metrics:evo_ape- absolute pose errorevo_rpe- relative pose errorTools:evo_traj- tool for analyzing, plotting or exporting one or more trajectoriesevo_res- tool for comparing one or multiple result files fromevo_apeorevo_rpeevo_fig- (experimental) tool for re-opening serialized plots (saved with--serialize_plot)evo_config- tool for global settings and config file manipulationCall the commands with--helpto see the options, e.g.evo_ape --help. Tab-completion of command line parameters is available on UNIX-like systems.More documentationCheck out theWiki on GitHub.Example WorkflowThere are some example trajectories in the source folder intest/data.1.) Plot multiple trajectoriesHere, we plot two KITTI pose files and the ground truth usingevo_traj:cd test/data
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz2.) Run a metric on trajectoriesFor example, here we calculate the absolute pose error for two trajectories from ORB-SLAM and S-PTAM usingevo_ape(KITTI_00_gt.txtis the reference (ground truth)) and plot and save the individual results to .zip files forevo_res:First trajectory (ORB Stereo):mkdir results
evo_ape kitti KITTI_00_gt.txt KITTI_00_ORB.txt -va --plot --plot_mode xz --save_results results/ORB.zipSecond trajectory (S-PTAM):evo_ape kitti KITTI_00_gt.txt KITTI_00_SPTAM.txt -va --plot --plot_mode xz --save_results results/SPTAM.zip3.) Process multiple results from a metricevo_rescan be used to compare multiple result files from the metrics, i.e.:print infos and statistics (default)plot the resultssave the statistics in a tableHere, we use the results from above to generate a plot and a table:evo_res results/*.zip -p --save_table results/table.csvIPython / Jupyter ResourcesFor an interactive source code documentation, open theJupyter notebookmetrics_tutorial.ipynbin thenotebooksfolder of the repository. More infos on Jupyter notebooks: seehereIf you have IPython installed, you can launch an IPython shell with a custom evo profile with the commandevo_ipython.Contributing UtilitiesA few "inoffical" scripts for special use-cases are collected  in thecontrib/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":scream:, this piece of :shit: software doesn't do what I want!!1!1!!"First aid:append-h/--helpto your commandcheck theWikicheck theprevious issuesopen anew issueContributingPatches are welcome, preferably as pull requests.LicenseGPL-3.0 or laterIf 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}
}