Dynamic Time Warping (DTW) is a method to align two sequences under certain constraints. For instance, two trajectories that are very similar but one of them performed in a longer time. The alignment should be is such way that minimizes the distance between these two sequences. Here I have done DTW between two-time series with python. I found a good c++ library for Fast Dynamic Time Warping and I developed my wrapper to make a ROS package for that. Here you can download my code at GitHub.
A good wrapping function should have following characteristics:
- monotonicity: The alignment path does not go back in “time” index.
- continuity: The alignment path does not jump in “time” index.
- boundary conditions: The alignment path starts at the bottom left and ends at the top right.
- warping window: A good alignment path is unlikely to wander too far from the diagonal.
- slope constraint: The alignment path should not be too steep or too shallow.
- References: [1]
References: [1]