ProDCG / HermitePathVisualizer

3rd degree polynomial spline trajectory generator

Home Page:https://www.youtube.com/watch?v=sKTy4vUG_LI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hermite Path Visualizer

This project showcases the visual generation of 3rd-degree polynomial splines, designed for First Tech Challenge pathing, with JavaFX.

Features

Path Generation

  • 2D point dragging and manipulation using a GUI
  • Tangent and control point modification

Guiding Vector Field

  • Dynamic path follower, getting to end position from any initial pose
  • Uses vector projections to estimate the nearest point along the spline
  • Mathematically determines and scales robot velocity around the path given the curvature and distance away from the trajectory

Explanation

With traditional trajectory generation in First Tech Challenge (FTC), splines for robot paths are based around bezier splines, using interpolated control points to define the spline. There is a starting and ending control point (representing the starting and ending positions of the bezier spline) and two further control points which act as ways to define the actual behavior of the path, how much curvature there is, the tangent direction, etc.

The issue with this approach becomes apparent when trying to define a well-structured trajectory either on-the-fly or without a visualizer. This is because the non-starting and final control points come off as arbitrary and non-realistic to what the path may actually look like.

Hermite splines simiarily (to bezier splines) use two control points to define the starting and ending positions. However, the two intermediate control points used in the creation of a bezier spline are replaced with tangent vectors located at both starting and ending control points. This allows us to much more realistically define the starting and ending state of the robot, instead of relying on arbitrary definitions for where the robot "might" go.

Here is a useful paper demonstrating and exploring more in-depth the properties of splines.

Demo (click image below)

Watch the video

About

3rd degree polynomial spline trajectory generator

https://www.youtube.com/watch?v=sKTy4vUG_LI

License:MIT License


Languages

Language:Java 100.0%