Class RotationController

java.lang.Object
frc.robot.swerve.RotationController

public class RotationController extends Object
Uses a profiled PID Controller to quickly turn the robot to a specified angle. Once the robot is within a certain tolerance of the goal angle, a PID controller is used to hold the robot at that angle.
  • Constructor Details

    • RotationController

      public RotationController(SwerveConfig config)
  • Method Details

    • calculate

      public double calculate(double goalRadians, double currentRadians, boolean isHoldController)
    • calculate

      public double calculate(double goalRadians, double currentRadians)
    • calculateHold

      public double calculateHold(double goalRadians, double currentRadians)
    • atSetpoint

      public boolean atSetpoint()
    • atGoal

      public boolean atGoal(double current)
    • reset

      public void reset(double currentRadians)
    • updatePID

      public void updatePID(double kP, double kI, double kD)