Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 42 additions & 7 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import edu.wpi.first.math.kinematics.SwerveDriveKinematics;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
import edu.wpi.first.math.util.Units;
import frc.lib.util.COTSFalconSwerveConstants;
import frc.lib.util.SwerveModuleConstants;


Expand Down Expand Up @@ -39,9 +38,18 @@ public static final class REV
//TODO: All must be tuned to specific robot
public static final double trackWidth = Units.inchesToMeters(18.75);
public static final double wheelBase = Units.inchesToMeters(20.25);

/*
public static final double wheelDiameter = Units.inchesToMeters(insert value);
public static final double wheelCircumference = wheelDiameter * Math.PI;
//NEED TO FINE TUNE THE BELOW 4 LINES FOR OUR ROBOT
public static final double openLoopRamp = 0.25;
public static final double closedLoopRamp = 0.0;

public static final double driveGearRatio = (6.75 / 1.0); // 6.75:1
public static final double angleGearRatio = (12.8 / 1.0); // 12.8:1
*/
// Chosen
// public static final double wheelCircumference = chosenModule.wheelCircumference;
//

/*Swerve Kinematics */

Expand All @@ -52,10 +60,37 @@ public static final class REV
new Translation2d(-wheelBase / 2.0, trackWidth / 2.0),
new Translation2d(-wheelBase / 2.0, -trackWidth / 2.0));





/*
(WE NEED TO FINE TUNE THIS VALUES FOR OUR ROBOT!)

// Angle Motor PID Values
public static final double angleKP = 0.01;
public static final double angleKI = 0.0;
public static final double angleKD = 0.0;
public static final double angleKFF = 0.0;

// Drive Motor PID Values
public static final double driveKP = 0.1;
public static final double driveKI = 0.0;
public static final double driveKD = 0.0;
public static final double driveKFF = 0.0;

// Drive Motor Characterization Values
public static final double driveKS = 0.667;
public static final double driveKV = 2.44;
public static final double driveKA = 0.27;

// Drive Motor Conversion Factors
public static final double driveConversionPositionFactor =
(wheelDiameter * Math.PI) / driveGearRatio;
public static final double driveConversionVelocityFactor = driveConversionPositionFactor / 60.0;
public static final double angleConversionFactor = 360.0 / angleGearRatio;


//for setting max speed and acceleration
public static final double kMaxSpeedMetersPerSecond = 3;
public static final double kMaxAccelerationMetersPerSecondSquared = 1;
*/


}
Expand Down