Spline
A spline is a piecewise polynomial function that is used to approximate or interpolate a set of data points.
Spline vs. Curve?
Curves are defined by a set of control points, while splines are defined by a mathematical function.
Why is this important?
The main thing is interpolation and smoothing. You can a set of points and want to connect them, such as to do Raceline Optimization.
There are different types of splines:
- Cubic Spline (most common)
- Bezier Splines
- Hermite Splines
- Catmull-Rom Splines
- B-Splines
- NURBS
- Pythagorean Hodograph
Clothoids??
- Local Planning (Sampling Based motion Planning)
- They introduce the idea of splines, where you generate a bunch of splines and use RRT to find the optimal spline to follow
Also from Optimization for Raceline
You can use SciPy for the splines
Curves
I was getting confused about this, since I hear the terms Spline, Clothoid (Euler Spiral), and Bezier Curve, but don’t really know the difference.
These are the different types of curves according to ChatGPT:
- Line segments: straight lines that connect two points in a Euclidean space.
- Circles: curves defined by the equation (x-a)^2 + (y-b)^2 = r^2, where (a,b) is the center of the circle and r is its radius.
- Ellipses: curves defined by the equation (x-a)^2/b^2 + (y-b)^2/a^2 = 1, where (a,b) is the center of the ellipse, and a and b are its semi-major and semi-minor axes, respectively.
- Parabolas: curves defined by the equation y = ax^2 + bx + c, where a, b, and c are constants.
- Hyperbolas: curves defined by the equation (x-a)^2/b^2 - (y-b)^2/a^2 = 1 or (y-b)^2/a^2 - (x-a)^2/b^2 = 1, where (a,b) is the center of the hyperbola and a and b are its semi-major and semi-minor axes, respectively.
- Bezier curves: curves defined by a set of control points that determine its shape.
- Splines: curves defined by a mathematical function that passes through a series of control points, with additional constraints such as continuity or curvature.
- Clothoids: curves defined by a mathematical function that describes a curve with a continuously changing curvature.