Pedro Pathing 1.1.0 has released! If you haven't already, migrate now.
Pedro Pathing LogoPedro Pathing

PID Tuners

The three PID tuners

Pedro Pathing relies on Proportional-Integral-Derivative (PID) controllers to ensure precise path-following performance. The following pages will walk you through tuning the various PID controllers for translational, heading, and drive.

Single vs. Dual PID System

In Pedro Pathing, you can choose between using one or two PID controllers for each correction type (translational, heading, and drive).

Single PID System

In a single PID system, a single PID is responsible for managing all errors. This is the simplest option and is the quickest to get started with.

Since a single PID system is the default, you don't have to do anything special to use it.

Dual PID System

In a dual PID system, there is a main PID that handles larger errors and a secondary PID for smaller corrections.

Advantages to using a dual PID system are:

  • Better correction
  • Scalable error thresholds
  • Allows for more aggressive tuning

If you want to try using a dual PID system, it is recommended that you start with drive, as it will contribute the most to a better auto.

To enable a dual PID system, set any of the following to true in FollowerConstants in the Constants file.

Constants.java
.useSecondaryTranslationalPID(true)
.useSecondaryHeadingPID(true)
.useSecondaryDrivePID(true)

Then, tune both the main and secondary PIDs. The main PID should move the error into the secondary PID's range without causing overshoot, and the secondary PID should correct for small errors quickly and minimize oscillations.

Tuning PIDs

Read the PID tuning page on CTRL ALT FTC to learn how to tune a PID controller. Addtionally, the following videos demonstrate how to tune a PID.

Last updated on