2023 Drive base
 
Loading...
Searching...
No Matches
frc.robot.Constants Class Reference

Constants - set once, and use throught the code Naming convention is all caps, spaces are underscores LIKE_THIS. More...

Static Public Attributes

static final int XBOX_CONTROLLER_PORT = 0
 
static final double DRIVE_MAX_ANGULAR_VELOCITY = 2 * Math.PI
 
static final double TANK_WHEEL_RADIUS = 0.075
 
static final double MECANUM_WHEEL_DIAMETER = 0.1524
 
static double maxVelocity
 
static final int ENCODER_CPR = 4096
 
static final int TALON_FX_CPR = 2048
 
static final double dt = 0.02
 
static final int LEFT_VICTOR_ID = 7
 
static final int RIGHT_VICTOR_ID = 4
 
static final int TALON_ID = 9
 
static final int SPARK_MAX_ID = 12
 
static final int FR_TALON_ID = 1
 
static final int FL_TALON_ID = 2
 
static final int RR_TALON_ID = 3
 
static final int RL_TALON_ID = 4
 
static final double FALCON_GEARBOX_RATIO = 10.71
 
static final double SPARK_MAX_CONVERSION_FACTOR = (2 * Math.PI) / 60
 
static final double TALON_CONVERSION_FACTOR = 10 * 2 * Math.PI / ENCODER_CPR
 
static final SPI.Port NAVX_PORT = SPI.Port.kMXP
 
static final double DRIVE_STARTING_MULTIPLIER = 0.1
 
static final double ANALOG_DEAD_ZONE = 0.1
 
static double LEFT_X_EXPONENT = 2
 
static double LEFT_Y_EXPONENT = 2
 
static double RIGHT_X_EXPONENT = 2
 
static double RIGHT_Y_EXPONENT = 2
 
static final double ANALOG_CROSS_DEADZONE = 0.2
 
static final double ROBOT_WIDTH = 0.40
 
static final double SLOW_DOWN_CUTOFF = 0.05
 
static final double SLOW_DOWN_FACTOR = 2
 
static final double WHEEL_ABSOLUTE_X_METERS = 0.2794
 
static final double WHEEL_ABSOLUTE_Y_METERS = 0.31115
 
static final Translation2d FL_WHEEL_POS = new Translation2d(WHEEL_ABSOLUTE_Y_METERS, WHEEL_ABSOLUTE_X_METERS)
 
static final Translation2d FR_WHEEL_POS = new Translation2d(-WHEEL_ABSOLUTE_Y_METERS, WHEEL_ABSOLUTE_X_METERS)
 
static final Translation2d RL_WHEEL_POS = new Translation2d(WHEEL_ABSOLUTE_Y_METERS, -WHEEL_ABSOLUTE_X_METERS)
 
static final Translation2d RR_WHEEL_POS = new Translation2d(-WHEEL_ABSOLUTE_Y_METERS, -WHEEL_ABSOLUTE_X_METERS)
 
static final MecanumDriveKinematics MECANUM_KINEMATICS = new MecanumDriveKinematics(FL_WHEEL_POS, FR_WHEEL_POS, RL_WHEEL_POS, RR_WHEEL_POS)
 
static final double RAMSETE_B = 2.0
 
static final double RAMSETE_ZETA = 0.7
 
static final double maxAccelerationMetersPerSecond = 1.2
 
static final double maxVelocityMetersPerSecond = 0.5
 
static final double SECONDS_BETWEEN_CODE_PERIODS = 0.02
 

Detailed Description

Constants - set once, and use throught the code Naming convention is all caps, spaces are underscores LIKE_THIS.

Definition at line 13 of file Constants.java.

Member Data Documentation

◆ ANALOG_CROSS_DEADZONE

final double frc.robot.Constants.ANALOG_CROSS_DEADZONE = 0.2
static

Definition at line 64 of file Constants.java.

◆ ANALOG_DEAD_ZONE

final double frc.robot.Constants.ANALOG_DEAD_ZONE = 0.1
static

◆ DRIVE_MAX_ANGULAR_VELOCITY

final double frc.robot.Constants.DRIVE_MAX_ANGULAR_VELOCITY = 2 * Math.PI
static

Definition at line 18 of file Constants.java.

Referenced by frc.robot.subsystems.Autonomous.applyChassisSpeeds().

◆ DRIVE_STARTING_MULTIPLIER

final double frc.robot.Constants.DRIVE_STARTING_MULTIPLIER = 0.1
static

Definition at line 56 of file Constants.java.

◆ dt

final double frc.robot.Constants.dt = 0.02
static

Definition at line 29 of file Constants.java.

◆ ENCODER_CPR

final int frc.robot.Constants.ENCODER_CPR = 4096
static

◆ FALCON_GEARBOX_RATIO

final double frc.robot.Constants.FALCON_GEARBOX_RATIO = 10.71
static

◆ FL_TALON_ID

final int frc.robot.Constants.FL_TALON_ID = 2
static

Definition at line 39 of file Constants.java.

◆ FL_WHEEL_POS

final Translation2d frc.robot.Constants.FL_WHEEL_POS = new Translation2d(WHEEL_ABSOLUTE_Y_METERS, WHEEL_ABSOLUTE_X_METERS)
static

Definition at line 76 of file Constants.java.

◆ FR_TALON_ID

final int frc.robot.Constants.FR_TALON_ID = 1
static

Definition at line 38 of file Constants.java.

◆ FR_WHEEL_POS

final Translation2d frc.robot.Constants.FR_WHEEL_POS = new Translation2d(-WHEEL_ABSOLUTE_Y_METERS, WHEEL_ABSOLUTE_X_METERS)
static

Definition at line 77 of file Constants.java.

◆ LEFT_VICTOR_ID

final int frc.robot.Constants.LEFT_VICTOR_ID = 7
static

Definition at line 32 of file Constants.java.

◆ LEFT_X_EXPONENT

double frc.robot.Constants.LEFT_X_EXPONENT = 2
static

◆ LEFT_Y_EXPONENT

double frc.robot.Constants.LEFT_Y_EXPONENT = 2
static

◆ maxAccelerationMetersPerSecond

final double frc.robot.Constants.maxAccelerationMetersPerSecond = 1.2
static

Definition at line 90 of file Constants.java.

Referenced by frc.robot.subsystems.MecaDrive.MecaDrive().

◆ maxVelocity

double frc.robot.Constants.maxVelocity
static

Definition at line 23 of file Constants.java.

◆ maxVelocityMetersPerSecond

final double frc.robot.Constants.maxVelocityMetersPerSecond = 0.5
static

◆ MECANUM_KINEMATICS

final MecanumDriveKinematics frc.robot.Constants.MECANUM_KINEMATICS = new MecanumDriveKinematics(FL_WHEEL_POS, FR_WHEEL_POS, RL_WHEEL_POS, RR_WHEEL_POS)
static

Definition at line 81 of file Constants.java.

Referenced by frc.robot.subsystems.MecaDrive.MecaDrive().

◆ MECANUM_WHEEL_DIAMETER

final double frc.robot.Constants.MECANUM_WHEEL_DIAMETER = 0.1524
static

◆ NAVX_PORT

final SPI.Port frc.robot.Constants.NAVX_PORT = SPI.Port.kMXP
static

Definition at line 54 of file Constants.java.

Referenced by frc.robot.subsystems.IMU.IMU().

◆ RAMSETE_B

final double frc.robot.Constants.RAMSETE_B = 2.0
static

Definition at line 84 of file Constants.java.

◆ RAMSETE_ZETA

final double frc.robot.Constants.RAMSETE_ZETA = 0.7
static

Definition at line 85 of file Constants.java.

◆ RIGHT_VICTOR_ID

final int frc.robot.Constants.RIGHT_VICTOR_ID = 4
static

Definition at line 33 of file Constants.java.

◆ RIGHT_X_EXPONENT

double frc.robot.Constants.RIGHT_X_EXPONENT = 2
static

◆ RIGHT_Y_EXPONENT

double frc.robot.Constants.RIGHT_Y_EXPONENT = 2
static

◆ RL_TALON_ID

final int frc.robot.Constants.RL_TALON_ID = 4
static

Definition at line 41 of file Constants.java.

◆ RL_WHEEL_POS

final Translation2d frc.robot.Constants.RL_WHEEL_POS = new Translation2d(WHEEL_ABSOLUTE_Y_METERS, -WHEEL_ABSOLUTE_X_METERS)
static

Definition at line 78 of file Constants.java.

◆ ROBOT_WIDTH

final double frc.robot.Constants.ROBOT_WIDTH = 0.40
static

Definition at line 66 of file Constants.java.

◆ RR_TALON_ID

final int frc.robot.Constants.RR_TALON_ID = 3
static

Definition at line 40 of file Constants.java.

◆ RR_WHEEL_POS

final Translation2d frc.robot.Constants.RR_WHEEL_POS = new Translation2d(-WHEEL_ABSOLUTE_Y_METERS, -WHEEL_ABSOLUTE_X_METERS)
static

Definition at line 79 of file Constants.java.

◆ SECONDS_BETWEEN_CODE_PERIODS

final double frc.robot.Constants.SECONDS_BETWEEN_CODE_PERIODS = 0.02
static

◆ SLOW_DOWN_CUTOFF

final double frc.robot.Constants.SLOW_DOWN_CUTOFF = 0.05
static

◆ SLOW_DOWN_FACTOR

final double frc.robot.Constants.SLOW_DOWN_FACTOR = 2
static

◆ SPARK_MAX_CONVERSION_FACTOR

final double frc.robot.Constants.SPARK_MAX_CONVERSION_FACTOR = (2 * Math.PI) / 60
static

Definition at line 51 of file Constants.java.

Referenced by frc.robot.subsystems.TankDrive.drive().

◆ SPARK_MAX_ID

final int frc.robot.Constants.SPARK_MAX_ID = 12
static

Definition at line 35 of file Constants.java.

◆ TALON_CONVERSION_FACTOR

final double frc.robot.Constants.TALON_CONVERSION_FACTOR = 10 * 2 * Math.PI / ENCODER_CPR
static

Definition at line 52 of file Constants.java.

Referenced by frc.robot.subsystems.TankDrive.drive().

◆ TALON_FX_CPR

final int frc.robot.Constants.TALON_FX_CPR = 2048
static

Definition at line 26 of file Constants.java.

◆ TALON_ID

final int frc.robot.Constants.TALON_ID = 9
static

Definition at line 34 of file Constants.java.

◆ TANK_WHEEL_RADIUS

final double frc.robot.Constants.TANK_WHEEL_RADIUS = 0.075
static

◆ WHEEL_ABSOLUTE_X_METERS

final double frc.robot.Constants.WHEEL_ABSOLUTE_X_METERS = 0.2794
static

Definition at line 73 of file Constants.java.

◆ WHEEL_ABSOLUTE_Y_METERS

final double frc.robot.Constants.WHEEL_ABSOLUTE_Y_METERS = 0.31115
static

Definition at line 74 of file Constants.java.

◆ XBOX_CONTROLLER_PORT

final int frc.robot.Constants.XBOX_CONTROLLER_PORT = 0
static

Definition at line 16 of file Constants.java.

Referenced by frc.robot.subsystems.Controller.Controller().


The documentation for this class was generated from the following file: