Skip to content

Commit

Permalink
Merge pull request #19 from grt192/swerve
Browse files Browse the repository at this point in the history
  • Loading branch information
CrolineCrois authored Feb 25, 2025
2 parents 19a8a85 + d68fdc7 commit a2d1f9e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ public static class SwerveConstants {
public static final int BR_STEER = 7;
public static final double BR_OFFSET = 0;

public static double MODULE_DIST = Units.inchesToMeters(30 / 2.0);
public static final Translation2d FL_POS = new Translation2d(MODULE_DIST, MODULE_DIST);
public static final Translation2d FR_POS = new Translation2d(MODULE_DIST, -MODULE_DIST);
public static final Translation2d BL_POS = new Translation2d(-MODULE_DIST, MODULE_DIST);
public static final Translation2d BR_POS = new Translation2d(-MODULE_DIST, -MODULE_DIST);
public static double MODULE_X_DIST = Units.inchesToMeters(33 / 2.0);
public static double MODULE_Y_DIST = Units.inchesToMeters(27 / 2.0);

public static final Translation2d FL_POS = new Translation2d(MODULE_X_DIST, MODULE_Y_DIST);
public static final Translation2d FR_POS = new Translation2d(MODULE_X_DIST, -MODULE_Y_DIST);
public static final Translation2d BL_POS = new Translation2d(-MODULE_X_DIST, MODULE_Y_DIST);
public static final Translation2d BR_POS = new Translation2d(-MODULE_X_DIST, -MODULE_Y_DIST);

public static final double DRIVE_GEAR_REDUCTION = 9. * 20. / 26.;
public static final double DRIVE_WHEEL_CIRCUMFERENCE = Units.inchesToMeters(4 * Math.PI);
Expand All @@ -61,9 +63,9 @@ public static class SwerveConstants {
public static final double RAMP_RATE = 0;
// public static final double KT = 0.01937; // Torque constant in Nm/A, refer to ctre Motor Performance Analysis Report

public static final double[] DRIVE_P = new double[] {10, 10, 10, 10}; //.32
public static final double[] DRIVE_P = new double[] {9.5, 9.5, 9,5, 9.5}; //.32
public static final double[] DRIVE_I = new double[] {0, 0, 0, 0};
public static final double[] DRIVE_D = new double[] {0.01, 0.01, 0.01, 0.01};
public static final double[] DRIVE_D = new double[] {0.1, 0.1, 0.1, 0.1};
public static final double[] DRIVE_S = new double[] {5, 5, 5, 5};//{0.16, 0.1499, 0.1499, 0.1499};
public static final double[] DRIVE_V = new double[] {0.0, 0.0, 0.0, 0.0}; //{0.11, 0.112, 0.112, 0.112};

Expand All @@ -73,7 +75,7 @@ public static class SwerveConstants {
public static final double[] STEER_D = new double[] {0, 0, 0, 0};
public static final double[] STEER_FF = new double[] {0.023,.02,0.025,0.03}; //{0.036, 0.024, 0.0182, 0.05};

public static final boolean DRIVE_DEBUG = true;
public static final boolean DRIVE_DEBUG = false;
public static final boolean STEER_DEBUG = false;
public static final boolean STATE_DEBUG = false;
}
Expand Down

0 comments on commit a2d1f9e

Please sign in to comment.