void make(VectorArr& arr, Chassis* chassis)
Makes a new path from the given set of bezier curve control points and the given chassis’ speed constraints
This function is intended to be used by the followPath function, however it is exposed for public use.
Parameters
arr- A reference to the control point arraychassis- The Chassis object
Explanation
This function first generates a bezier curve path, then generates target angles from the path derivative, and then generates smooth target speeds. The target speeds are generated first by using the curvature from the path, then they are smoothed from the max accellerations of the chassis using the equation:
$ v_f^2 = v_i^2 + 2ad $
Example
Path path = Path();
path.setK(1.3);
VectorArr points = VectorArr({PVector(0, 0), PVector(0, 45), PVector(45, 45)});
path.make(points, &chassis);