FollowerConstants

public class FollowerConstants

This is the FollowerConstants class. It holds many constants and parameters for various parts of the Follower. This is here to allow for easier tuning of Pedro Pathing, as well as concentrate everything tunable for the Paths themselves in one place.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Baron Henderson - 20077 The Indubitables

Constructors

Link copied to clipboard
public void FollowerConstants()

Properties

Link copied to clipboard
public static int APPROXIMATION_STEPS
This is how many steps the BezierCurve class uses to approximate the length of a BezierCurve.
Link copied to clipboard
public static boolean automaticHoldEnd
Boolean that determines if holdEnd is automatically (when not defined in the constructor) enabled at the end of a path.
Link copied to clipboard
This is the number of times the velocity is recorded for averaging when approximating a first and second derivative for on the fly centripetal correction.
Link copied to clipboard
public static int BEZIER_CURVE_SEARCH_LIMIT
This is the number of steps the search for the closest point uses.
Link copied to clipboard
public static double cacheInvalidateSeconds
Time (in seconds) before reading voltage again Will only read voltage if useVoltageCompensation is true.
Link copied to clipboard
public static double centripetalScaling
Centripetal force to power scaling Default Value: 0.
Link copied to clipboard
Kalman filter parameters for the drive error Kalman filter Default Value: new KalmanFilterParameters(6,1);
Link copied to clipboard
Drive PIDF coefficients Default Value: new CustomFilteredPIDFCoefficients(0.025,0,0.00001,0.
Link copied to clipboard
public static double drivePIDFFeedForward
Feed forward constant added on to the drive PIDF Default Value: 0.
Link copied to clipboard
public static double drivePIDFSwitch
The limit at which the heading PIDF switches between the main and secondary drive PIDFs.
Link copied to clipboard
public static double forwardZeroPowerAcceleration
Acceleration of the drivetrain when power is cut in inches/second^2 (should be negative) if not negative, then the robot thinks that its going to go faster under 0 power Default Value: -34.
Link copied to clipboard
public static Vector frontLeftVector
The actual drive vector for the front left wheel, if the robot is facing a heading of 0 radians with the wheel centered at (0,0) Default Value: new Vector(convertToPolar[0], convertToPolar[1])
Link copied to clipboard
Heading error PIDF coefficients Default Value: new CustomPIDFCoefficients(1,0,0,0);
Link copied to clipboard
public static double headingPIDFFeedForward
Feed forward constant added on to the heading PIDF Default Value: 0.
Link copied to clipboard
public static double headingPIDFSwitch
The limit at which the heading PIDF switches between the main and secondary heading PIDFs.
Link copied to clipboard
public static double holdPointHeadingScaling
This scales the heading error correction power when the Follower is holding a Point.
Link copied to clipboard
public static double holdPointTranslationalScaling
This scales the translational error correction power when the Follower is holding a Point.
Link copied to clipboard
public static double lateralZeroPowerAcceleration
Acceleration of the drivetrain when power is cut in inches/second^2 (should be negative) if not negative, then the robot thinks that its going to go faster under 0 power Default Value: -78.
Link copied to clipboard
public static DcMotorSimple.Direction leftFrontMotorDirection
The direction of the left front motor Default Value: DcMotorSimple.Direction.
Link copied to clipboard
public static String leftFrontMotorName
The name of the left front motor Default Value: "leftFront"
Link copied to clipboard
public static DcMotorSimple.Direction leftRearMotorDirection
The direction of the left rear motor Default Value: DcMotorSimple.Direction.
Link copied to clipboard
public static String leftRearMotorName
The name of the left rear motor Default Value: "leftRear"
Link copied to clipboard
public static Localizers localizers
The Localizer that the Follower &Pose Updater will use Default Value: Localizers.
Link copied to clipboard
public static double mass
Mass of robot in kilograms Default Value: 10.
Link copied to clipboard
public static double maxPower
Global Max Power (can be overridden, just a default) Default Value: 1
Link copied to clipboard
public static double motorCachingThreshold
The motor caching threshold Default Value: 0.
Link copied to clipboard
public static double nominalVoltage
The voltage to scale to (the voltage that you tuned at) If the robot's voltage is at the default value, it will not affect the motor powers.
Link copied to clipboard
public static double pathEndHeadingConstraint
When the robot is at the end of its current Path or PathChain and the heading error goes below this value, then end the Path.
Link copied to clipboard
public static double pathEndTimeoutConstraint
When the Path is considered at its end parametrically, then the Follower has this many milliseconds to further correct by default.
Link copied to clipboard
public static double pathEndTranslationalConstraint
When the robot is at the end of its current Path or PathChain and the translational error goes below this value, then end the Path.
Link copied to clipboard
public static double pathEndTValueConstraint
When the t-value of the closest point to the robot on the Path is greater than this value, then the Path is considered at its end.
Link copied to clipboard
public static double pathEndVelocityConstraint
When the robot is at the end of its current Path or PathChain and the velocity goes below this value, then end the Path.
Link copied to clipboard
public static DcMotorSimple.Direction rightFrontMotorDirection
The direction of the right front motor Default Value: DcMotorSimple.Direction.
Link copied to clipboard
The name of the right front motor Default Value: "rightFront"
Link copied to clipboard
public static DcMotorSimple.Direction rightRearMotorDirection
The direction of the right rear motor Default Value: DcMotorSimple.Direction.
Link copied to clipboard
public static String rightRearMotorName
The name of the right rear motor Default Value: "rightRear"
Link copied to clipboard
Secondary drive PIDF coefficients.
Link copied to clipboard
public static double secondaryDrivePIDFFeedForward
Feed forward constant added on to the secondary drive PIDF.
Link copied to clipboard
Secondary heading error PIDF coefficients.
Link copied to clipboard
public static double secondaryHeadingPIDFFeedForward
Feed forward constant added on to the secondary heading PIDF.
Link copied to clipboard
Secondary translational Integral value.
Link copied to clipboard
Secondary translational PIDF coefficients (don't use integral).
Link copied to clipboard
Feed forward constant added on to the small translational PIDF.
Link copied to clipboard
Translational Integral Default Value: new CustomPIDFCoefficients(0,0,0,0);
Link copied to clipboard
Translational PIDF coefficients (don't use integral) Default Value: new CustomPIDFCoefficients(0.
Link copied to clipboard
public static double translationalPIDFFeedForward
Feed forward constant added on to the translational PIDF Default Value: 0.
Link copied to clipboard
public static double translationalPIDFSwitch
The limit at which the translational PIDF switches between the main and secondary translational PIDFs, if the secondary PID is active.
Link copied to clipboard
public static boolean useBrakeModeInTeleOp
Use brake mode for the drive motors in teleop Default Value: false
Link copied to clipboard
public static boolean useSecondaryDrivePID
Use the secondary drive PIDF.
Link copied to clipboard
public static boolean useSecondaryHeadingPID
Use the secondary heading PIDF.
Link copied to clipboard
public static boolean useSecondaryTranslationalPID
This activates/deactivates the secondary translational PIDF.
Link copied to clipboard
public static boolean useVoltageCompensationInAuto
Use voltage compensation to linearly scale motor powers in Auto Requires fully re-tuning if you set it to true Default Value: false
Link copied to clipboard
public static boolean useVoltageCompensationInTeleOp
Use voltage compensation to linearly scale motor powers in TeleOp Requires fully re-tuning if you set it to true Default Value: false
Link copied to clipboard
public static double xMovement
The Forward Velocity of the Robot - Different for each robot Default Value: 81.
Link copied to clipboard
public static double yMovement
The Lateral Velocity of the Robot - Different for each robot Default Value: 65.
Link copied to clipboard
public static double zeroPowerAccelerationMultiplier
A multiplier for the zero power acceleration to change the speed the robot decelerates at the end of paths.