Package frc.lib5k.kinematics
Class PIDProfile
- java.lang.Object
-
- frc.lib5k.kinematics.PIDProfile
-
public class PIDProfile extends java.lang.Object
Used to store PID control data
-
-
Constructor Summary
Constructors Constructor Description PIDProfile(double kp)
PIDProfile(double kp, double ki)
PIDProfile(double kp, double ki, double kd)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PIDProfile
autoConfig(double max_p, double osc_period)
Generate a PIDProfile using the Zeigler-Nichols tuning method.PIDProfile
modify(PIDProfile mod)
Modify the profile
-
-
-
Method Detail
-
autoConfig
public static PIDProfile autoConfig(double max_p, double osc_period)
Generate a PIDProfile using the Zeigler-Nichols tuning method. More info: https://frc-pdr.readthedocs.io/en/latest/control/pid_control.html#tuning-methods- Parameters:
max_p
- Maximum P to cause oscollation in the systemosc_period
- Period of oscillation. This must be a full cycle of the system (in whatever unit. Generally, seconds)- Returns:
- Generated PIDProfile
-
modify
public PIDProfile modify(PIDProfile mod)
Modify the profile- Parameters:
mod
- Profile to add- Returns:
- This profile
-
-