This repository contains a collection of Python scripts designed to analyze and visualize deviations in trajectories, particularly useful in fields such as autonomous driving, robotics, and any application where precision in path tracking is crucial.
The scripts provided offer a variety of methods for comparing planned versus actual trajectories, highlighting deviations in both spatial and temporal dimensions. They range from basic Euclidean distance calculations to more sophisticated methods like Dynamic Time Warping (DTW) and Frenet frame analysis.
-
Dynamic_Window_fastdw.py
- Utilizes the Fast Dynamic Time Warping (FastDTW) algorithm to measure the similarity between planned and actual trajectories, optimizing for computational efficiency.
-
Dynamic_Window_numpy.py
- Implements the Dynamic Time Warping algorithm using NumPy without any external libraries, providing a deep dive into the DTW calculation process.
-
Euclidean_Distance_wxv.py
- Calculates deviations between planned and actual trajectories using straightforward Euclidean distance, extended to consider velocity vectors for a comprehensive trajectory analysis.
-
Euclidean_Distance_xy.py
- Focuses on spatial deviations between trajectories by calculating the Euclidean distance solely based on x and y coordinates.
-
Euclidean_Distance_xyv_TimeWindow.py
- Enhances the spatial analysis by incorporating a time window, allowing for the assessment of deviations over specified intervals, making it suitable for dynamic scenarios where conditions change over time.
-
Frenet_Frame.py (1D and 2D versions)
- Provides a detailed analysis using Frenet coordinates to quantify lateral and longitudinal displacements, and extends the analysis to include temporal deviations, offering insights into both spatial misalignments and timing inaccuracies.
Clone the repository to your local machine:
git clone https://github.com/yourusername/trajectory-analysis.git