-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package frc.robot; | ||
|
||
public final class PIDConstants { | ||
public static final class balancePID { | ||
// Balance PID / AutoBalance | ||
public static final double balance_P = 0.0625; // 1/16 | ||
public static final double balance_I = 0.00; | ||
public static final double balance_D = 0.00; | ||
public static final double MaxBalanceRateDegPerS = 10; | ||
public static final double MaxBalanceAccelerationDegPerSSquared = 20; | ||
public static final double BalanceToleranceDeg = 2; // max diff in degrees | ||
} | ||
|
||
public static final class distancePID { | ||
// Distance PID / MoveDistance | ||
public static final double distance_P = 0.1; | ||
public static final double distance_I = 0.00; | ||
public static final double distance_D = 0.00; | ||
public static final double distanceMaxSpeed = 1; // m/s | ||
public static final double distanceMaxAcceleration = 2; // m/s^2 | ||
public static final double DistanceTolerance = 0.01; // max diff in meters | ||
public static final double DistanceSpeedTolerance = 0.1; // ignore if velocity is below. (m) | ||
} | ||
|
||
public static final class turnPID { | ||
// Angle PID / RotateToAngle | ||
public static final double turn_P = 0.1; | ||
public static final double turn_I = 0.00; | ||
public static final double turn_D = 0.00; | ||
public static final double MaxTurnRateDegPerS = 100; | ||
public static final double MaxTurnAccelerationDegPerSSquared = 50; | ||
public static final double TurnToleranceDeg = 3; // max diff in degrees | ||
public static final double TurnRateToleranceDegPerS = 10; // degrees per second | ||
// false when inactive, true when active / a target is set. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters