{"id":8979,"library":"evo","title":"evo","description":"evo is a Python package for the evaluation of odometry and SLAM (Simultaneous Localization and Mapping) algorithms. It provides a robust command-line interface and a modular Python library for handling, evaluating, and comparing trajectory outputs from various formats like TUM, KITTI, EuRoC MAV, and ROS bagfiles. It includes tools for association, alignment, scale adjustment (for monocular SLAM), flexible output, plotting, and visualization. The library is actively maintained, with the current version being 1.35.2, and supports Python 3.10+.","status":"active","version":"1.35.2","language":"en","source_language":"en","source_url":"https://github.com/MichaelGrupp/evo","tags":["SLAM","odometry","robotics","evaluation","trajectory","CLI"],"install":[{"cmd":"pip install evo","lang":"bash","label":"Latest stable release"},{"cmd":"pip install evo --upgrade --no-binary evo","lang":"bash","label":"Upgrade and ensure CLI executables are installed"}],"dependencies":[{"reason":"For enhanced GUI plots (QtAgg matplotlib backend). If not present, TkAgg is used.","package":"PyQt6","optional":true},{"reason":"Required for some ROS-related features, though reading ROS bag files (excluding /tf topics) works without a full ROS installation via the 'rosbags' package.","package":"ROS / ROS2","optional":true},{"reason":"Required for adding map tiles to plots of geo-referenced data.","package":"contextily","optional":true},{"reason":"For logging data to the Rerun viewer using the --rerun CLI flag.","package":"rerun-sdk","optional":true}],"imports":[{"note":"Represents a 3D trajectory with timestamped poses.","symbol":"PoseTrajectory3D","correct":"from evo.core.trajectory import PoseTrajectory3D"},{"note":"Contains core evaluation metrics like APE and RPE.","symbol":"metrics","correct":"from evo.core import metrics"},{"note":"Provides functions to read various trajectory file formats (TUM, KITTI, etc.).","symbol":"file_interface","correct":"from evo.tools import file_interface"},{"note":"Utility for associating trajectories based on timestamps.","symbol":"sync","correct":"from evo.core import sync"},{"note":"Tools for plotting trajectories and errors.","symbol":"plot","correct":"from evo.tools import plot"}],"quickstart":{"code":"import os\nimport numpy as np\nfrom evo.core import metrics, sync\nfrom evo.core.trajectory import PoseTrajectory3D\nfrom evo.tools import file_interface, plot\nfrom evo.tools.settings import SETTINGS\nimport matplotlib.pyplot as plt\n\n# Create dummy trajectory files for demonstration\n# In a real scenario, these would be actual ground truth and estimated trajectories\nref_file_content = \"\"\"\n1.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0\n2.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0\n3.0 2.0 0.0 0.0 0.0 0.0 0.0 1.0\n4.0 3.0 0.0 0.0 0.0 0.0 0.0 1.0\n\"\"\"\nest_file_content = \"\"\"\n1.0 0.1 0.0 0.0 0.0 0.0 0.0 1.0\n2.0 1.1 0.0 0.0 0.0 0.0 0.0 1.0\n3.0 2.1 0.0 0.0 0.0 0.0 0.0 1.0\n4.0 3.1 0.0 0.0 0.0 0.0 0.0 1.0\n\"\"\"\n\n# Save dummy files\ndummy_dir = \"./evo_quickstart_data\"\nos.makedirs(dummy_dir, exist_ok=True)\nref_path = os.path.join(dummy_dir, \"ref.tum\")\nest_path = os.path.join(dummy_dir, \"est.tum\")\n\nwith open(ref_path, \"w\") as f: f.write(ref_file_content)\nwith open(est_path, \"w\") as f: f.write(est_file_content)\n\n# 1. Load trajectories (TUM format in this example)\ntraj_ref = file_interface.read_tum_trajectory_file(ref_path)\ntraj_est = file_interface.read_tum_trajectory_file(est_path)\n\n# 2. Associate trajectories by timestamps\ntraj_ref, traj_est = sync.associate_trajectories(traj_ref, traj_est, max_diff=0.1)\n\n# 3. Align trajectories (e.g., SE(3) Umeyama alignment)\ntraj_est_aligned = traj_est.copy()\ntraj_est_aligned.align(traj_ref)\n\n# 4. Calculate Absolute Pose Error (APE)\nape_metric = metrics.APE(metrics.PoseRelation.translation_part)\nape_stats = ape_metric.process_trajectory(traj_ref, traj_est_aligned)\n\nprint(\"\\n--- APE Statistics (Translation Part) ---\")\nprint(f\"RMSE: {ape_stats.rmse:.4f}\")\nprint(f\"Mean: {ape_stats.mean:.4f}\")\nprint(f\"Max: {ape_stats.max:.4f}\")\n\n# 5. Plotting (optional)\nSETTINGS.plot_usetex = False # Disable LaTeX for simpler plotting\nfig = plt.figure(figsize=(10, 8))\nplot.trajectories(fig, {\"reference\": traj_ref, \"estimate_aligned\": traj_est_aligned}, plot.PlotMode.xyz)\nplt.title(\"Trajectories (Aligned)\")\nplt.show()\n\n# Clean up dummy files and directory\nos.remove(ref_path)\nos.remove(est_path)\nos.rmdir(dummy_dir)","lang":"python","description":"This quickstart demonstrates how to programmatically load two dummy TUM trajectories, associate them based on timestamps, align the estimated trajectory to the reference using Umeyama's method, calculate the Absolute Pose Error (APE) for the translation part, and print the resulting statistics. Finally, it visualizes the aligned trajectories using Matplotlib. In a real application, replace the dummy file creation with loading your actual trajectory files."},"warnings":[{"fix":"Ensure you are using Python 3.10 or newer. Upgrade your Python environment if necessary.","message":"Python 2.7 support was dropped after evo version 1.12.0. The current version requires Python 3.10+.","severity":"breaking","affected_versions":"<= 1.12.0 (Python 2.7), > 1.12.0 (Python 3.10+)"},{"fix":"Always install evo within the virtual environment corresponding to your Jupyter kernel. Verify Python versions using `which python` and `jupyter kernelspec list`.","message":"Jupyter Notebook or IPython environments may encounter issues if the kernel's Python version does not match the version where evo was installed, leading to import errors or unexpected behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For batch processing or large numbers of plots, consider creating custom scripts that load Matplotlib only once. For interactive plotting, ensure you have a suitable backend (e.g., PyQt6) installed for better performance.","message":"Plotting operations, especially with Matplotlib, can sometimes be slow due to the overhead of loading the plotting library and rendering complex figures. This is particularly noticeable for large datasets or multiple plots.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure pip's script directory is in your system's PATH. If installing with `--no-binary evo` (recommended for CLI usage), make sure `argcomplete` is installed and activated. Sometimes, restarting the terminal or system can resolve this. For programmatic use, you can always import and call functions directly (e.g., `python -c 'from evo.main_ape import ape; ...'`).","cause":"The executables provided by the 'evo' package are not in your system's PATH, or argcomplete (for tab completion) was not installed correctly.","error":"evo_ape: command not found (or similar for evo_traj, evo_rpe)"},{"fix":"Verify that 'evo' is installed in your active virtual environment using `pip show evo`. If not, run `pip install evo`. Check for typos in your import statements (e.g., `from evo.core.trajectory import PoseTrajectory3D`).","cause":"The 'evo' package is not installed in the currently active Python environment, or there's a typo in the import statement.","error":"ModuleNotFoundError: No module named 'evo.core'"}]}