Skip to main content

Trajectopy - Trajectory Evaluation in Python

Code style: ruff

Trajectopy is a Python package with an optional graphical user interface for empirical trajectory evaluation.

Trajectopy GUI showing the ATE of a trajectory in the 3D preview
ATE plot over time ATE map plot

Installation

Apps: the latest release provides an installer for Windows (Trajectopy-<version>-setup.exe), an app for macOS on Apple silicon (.dmg) and one for Linux (.tar.gz). They contain the GUI and need no Python installation; on Windows, .traj files and projects (.tpy) can then be opened by double-click. The apps report new versions (Help → Check for Updates).

Python package (Python 3.10 or newer):

Command Contents
pip install "trajectopy[gui]" Python package and GUI (recommended)
pip install "trajectopy[plot]" Python package with plotting, without the GUI
pip install trajectopy Python package only

Loading large trajectory files (millions of poses) is several times faster with the fast extra, which can be combined with the others: pip install "trajectopy[gui,fast]".

Quick Start

import trajectopy as tpy

reference = tpy.Trajectory.from_file("./example_data/KITTI_gt.traj")
estimate = tpy.Trajectory.from_file("./example_data/KITTI_ORB.traj")

ate_result = tpy.ate(trajectory=estimate, other=reference)  # aligns the estimate first
print(f"Position ATE: {ate_result.pos_ate:.3f} m")

Or start the GUI with trajectopy (or from the Start menu), drop trajectory files onto it, right-click the ground truth → Set as Reference, then right-click another trajectory → Compare with Reference.

Or evaluate from the command line, without the GUI:

trajectopy evaluate example_data/KITTI_ORB.traj example_data/KITTI_SPTAM.traj --ref example_data/KITTI_gt.traj --report report.html

More examples are in example_scripts and in the user guide.

Documentation

https://gereon-t.github.io/trajectopy/

Key Features

  • Interactive GUI: Load, plot, align and compare trajectories without writing code. Every action explains itself in the context menus, and trajectories can be aligned interactively if an automatic alignment is not possible.
  • Alignment: A spatio-temporal least squares alignment that can be tailored to the application: similarity transformation, leverarm and time shift, each of them optional.
  • Comparison: Absolute and relative trajectory error (ATE and RPE), computed with various pose-matching methods, with percentiles, confidence intervals that account for temporally correlated deviations, and statistics per segment of the trajectory.
  • Benchmarking: Summary tables of several estimates (Markdown, CSV, LaTeX) and self-contained HTML reports with all statistics, figures and settings.
  • Command Line: trajectopy ate | rpe | evaluate | align | convert | info for scripts, servers and CI pipelines.
  • Data Import/Export: ASCII files with configurable columns, time formats and coordinate systems (any EPSG code), TUM, KITTI and EuRoC files (recognized automatically), and ROS1/ROS2 bags (poses, odometry, TF, paths, GNSS fixes; covariances weight the alignment).
  • Fast, Interactive Visualization: Powered by pyqtgraph, the same plots are available in the GUI and in Python scripts, stay fluid for large trajectories, and can be exported to PNG, JPG or SVG. Georeferenced trajectories and ATE results can be exported to Google Earth, colored by speed, height or deviations, on the terrain or at their own heights, with playback.

Web Application (Docker)

A simple web application is available at gereon-t/trajectopy-web that allows you to use the core functionality of Trajectopy using Docker.

Citation

If you use this library for any academic work, please cite our original paper.

@article{Tombrink2024,
url = {https://doi.org/10.1515/jag-2024-0040},
title = {Spatio-temporal trajectory alignment for trajectory evaluation},
author = {Gereon Tombrink and Ansgar Dreier and Lasse Klingbeil and Heiner Kuhlmann},
journal = {Journal of Applied Geodesy},
doi = {doi:10.1515/jag-2024-0040},
year = {2024},
codeurl = {https://github.com/gereon-t/trajectopy},
}

Metadata

Release files for trajectopy 7.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trajectopy 7.0.0
File Size Uploaded Provenance Actions
trajectopy-7.0.0.tar.gz 3.4 MB Without provenance Details for trajectopy-7.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trajectopy 7.0.0
File Interpreter ABI Platform Actions
trajectopy-7.0.0-py3-none-any.whl Python 3 none any Details for trajectopy-7.0.0-py3-none-any.whl

Total release size: 4.0 MB

Release files / trajectopy-7.0.0.tar.gz

Download URL trajectopy-7.0.0.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
cbeb7e2f32544632ebd49ffad1bc54ac3e1f6734f3eb2d2346c9573ff39d21b2
BLAKE2b-256 checksum
How to use checksums
f0cb33047d466c1d3c4931503a8643f02d8c0ea51dbf85136975e509ed9c7823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / trajectopy-7.0.0-py3-none-any.whl

Download URL trajectopy-7.0.0-py3-none-any.whl
Size 628.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32d1b0793dc2acc515ced4c50db4a42345fd41f46c3aec1623d8e8b0e9b068b1
BLAKE2b-256 checksum
How to use checksums
54a380220b9d4e92d9fb420f3132e65c0df74552250392a1da7d68220ec9c562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for trajectopy 7.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

7.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page