Skip to main content

Trajectory alignment and evaluation toolkit

Project description

EPICA: Epic Trajectory Alignment and Evaluation Toolkit

EPICA is a trajectory alignment and evaluation toolkit.

It provides:

  • 3-step alignment pipeline (time offset, extrinsic, world alignment)
  • a set of CLI tools (traj, ape, rpe, res, config)
  • OpenVINS compatibility entrypoints
  • optional plotting and rerun-based visualization

Architecture

High-level system view:

EPA architecture diagram

EPA has three main surfaces:

  • the main epa / epica pipeline for one GT/EST pair
  • the epa_bench harness for multi-case benchmark runs
  • the ov_eval compatibility layer for legacy-style summaries

Step 1 to Step 3 trajectory alignment

APE translation error curve Rerun demo animation

Installation

Create and activate a virtual environment first (recommended):

conda create -n epa python=3.10 -y
conda activate epa

Then install:

pip install epica

Optional extras:

pip install "epica[rerun]"  # rerun visualization
pip install "epica[ros]"    # bag / bag2 / mcap support
pip install "epica[geo]"    # map-related tools

Quick Start

Run one trajectory pair:

epa <gt_file> <est_file>

Example:

epa ./example_data/example_groundtruth.csv ./example_data/example_estimation.txt

Run a multi-case benchmark:

epa_bench /path/to/cases_root

Input Formats

For one-pair runs, epa <gt_file> <est_file> uses format auto-detection by default.

Supported trajectory inputs:

  • csv / euroc: header-based pose CSV with timestamp, position, and quaternion columns
  • tum: text rows in t tx ty tz qx qy qz qw
  • kitti: text rows with a 3x4 pose matrix
  • bag, bag2, mcap: ROS log inputs; pass --gt-topic and --est-topic

For benchmarks, the cases root should contain benchmark/ and GT/:

cases_root/
├── benchmark/<dataset>/pose/<method>/<sequence>/*_poses.txt
├── benchmark/<dataset>/<method>/<sequence>/trajectory.txt
├── benchmark/<dataset>/<method>/<sequence>_poses.txt
└── GT/**/<sequence>.txt

One <method> directory can contain many sequences, either as sequence files or sequence subdirectories.

GT files can use .txt, .tum, or .csv. The pose/ directory is optional.

Outputs

Single epa run:

  • creates one outputs/run_YYYYMMDD_HHMMSS/ folder
  • typical files inside:
  • plots/
  • metrics.json
  • metrics_summary.csv
  • report_en.md
  • report_zh.md

Multi-case benchmark with epa_bench:

  • creates outputs/<cases_root_name>_bench/run_YYYYMMDD_HHMMSS/
  • typical files and folders inside:
  • summary.csv
  • summary.md
  • paper_tables/
  • cases/
  • logs/
  • epa_runs/
  • unresolved_cases.csv if some GT mappings cannot be resolved

metrics.json is compact by default. Default EPA metrics include the configured RPE, 1-second time RPE drift, and drift-valid success-rate metrics. Drift-valid segments are detected from local 1-second RPE and positive APE growth/jump checks, with a global accept gate (p05 <= 30 m) to avoid treating globally failed cases as partially valid. Use --save-full-metrics for full per-sample APE/RPE arrays. Use --no-downsample only when you need full-rate solve/evaluation. Benchmark prepared_tum/ files are removed by default; use --keep-prepared when you need them for later case reruns.

Analysis Notebook

For exploratory benchmark analysis, install the analysis extra and open the notebook:

pip install "epica[analysis]"
jupyter notebook notebooks/benchmark_analysis.ipynb

The notebook reads an existing summary.csv, summarizes datasets and methods, ranks suspicious cases, and shows the plots already generated by the benchmark workflow.

Common CLI Toolchain

  • epa / epica: run the main 3-step EPA pipeline for one GT/EST pair
  • epa_bench: run the multi-case benchmark harness over a cases root
  • epa_ape: compute APE for one trajectory pair
  • epa_rpe: compute RPE for one trajectory pair
  • epa_traj: inspect, align, sync, and visualize trajectories
  • epa_benchall: run the extended multi-case workflow, including summary plots
  • epa_all: run the extended single-case workflow
  • epa_openvins: run EPA on one or multiple OpenVINS case folders

Documentation Link

For more commands and detailed usage, see the docs:

Maintenance and Contact

This project is still actively maintained.

If you run into any issues, please open an issue at:

Or contact:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epica-0.1.12.tar.gz (198.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epica-0.1.12-py3-none-any.whl (214.0 kB view details)

Uploaded Python 3

File details

Details for the file epica-0.1.12.tar.gz.

File metadata

  • Download URL: epica-0.1.12.tar.gz
  • Upload date:
  • Size: 198.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for epica-0.1.12.tar.gz
Algorithm Hash digest
SHA256 58ccb7c50e723c652636a480802a9a408cf92fd6af546eed70a27e20b6e90e98
MD5 07fd6aa9eaa973c77957a6e1e86649c9
BLAKE2b-256 d3db076f88e6ff343d01451b8a83a84b14767c7a0f5763ff3c3c6e8a56eac14d

See more details on using hashes here.

File details

Details for the file epica-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: epica-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 214.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for epica-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 ac85a0d1991b80407330fa6dfd4e399e42fe2b9392573211737ca5b02edb3b21
MD5 bacb4851ca721e3c1299b7a05f89becb
BLAKE2b-256 e60a9437ac009e9a232765c27ffa4858b9549436b65a69e6130c3c58175e0b6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page