Controller Suggestions

The motion profiles help the robot’s path-following abilities considerably but there are many factors that could prevent the robot from following the generated path. It is recommended to pair the output of Squiggles with a feedback controller.

A velocity PID controller is an easy start but a controller optimized for path following is the best choice. Small errors in a velocity controller are fine with systems like a flywheel but can cause a path-following robot to go wildly off course.

Pure Pursuit Controller

The Pure Pursuit Controller is the defacto standard for closed loop path following. Instead of trying to make the robot move to the nearest point along the path when it diverges the Pure Pursuit Controller anticipates moving to a point ahead on the path. The target point is the nearest point plus a look ahead distance. The Pure Pursuit Controller closes the control loop by using the robot’s measured position – calculated by something like odometry – and finds the look ahead point from that measured position.

The Pure Pursuit Controller has been used extensively in FRC. A couple examples of its use for FRC are listed below:

The Pure Pursuit algorithm is best explained by Alonzo Kelly’s white paper. It is often helpful to reference this document in conjunction with an example Pure Pursuit implementation when writing your own take on the controller.

Ramsete Controller

The Ramsete Controller is another controller that is used for following paths. It does not look ahead to follow the path like the Pure Pursuit Controller but is best suited for correcting small errors.

Like Pure Pursuit, the Ramsete Controller has become quite popular in FRC. The WPILib library includes an implementation for the Ramsete Controller:

The following white papers are excellent resources to use when constructing your Ramsete Controller: