Skip to content

Commit a2d1f9e

Browse files
authored
Merge pull request #19 from grt192/swerve
2 parents 19a8a85 + d68fdc7 commit a2d1f9e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: src/main/java/frc/robot/Constants.java

+10-8
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ public static class SwerveConstants {
4545
public static final int BR_STEER = 7;
4646
public static final double BR_OFFSET = 0;
4747

48-
public static double MODULE_DIST = Units.inchesToMeters(30 / 2.0);
49-
public static final Translation2d FL_POS = new Translation2d(MODULE_DIST, MODULE_DIST);
50-
public static final Translation2d FR_POS = new Translation2d(MODULE_DIST, -MODULE_DIST);
51-
public static final Translation2d BL_POS = new Translation2d(-MODULE_DIST, MODULE_DIST);
52-
public static final Translation2d BR_POS = new Translation2d(-MODULE_DIST, -MODULE_DIST);
48+
public static double MODULE_X_DIST = Units.inchesToMeters(33 / 2.0);
49+
public static double MODULE_Y_DIST = Units.inchesToMeters(27 / 2.0);
50+
51+
public static final Translation2d FL_POS = new Translation2d(MODULE_X_DIST, MODULE_Y_DIST);
52+
public static final Translation2d FR_POS = new Translation2d(MODULE_X_DIST, -MODULE_Y_DIST);
53+
public static final Translation2d BL_POS = new Translation2d(-MODULE_X_DIST, MODULE_Y_DIST);
54+
public static final Translation2d BR_POS = new Translation2d(-MODULE_X_DIST, -MODULE_Y_DIST);
5355

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

64-
public static final double[] DRIVE_P = new double[] {10, 10, 10, 10}; //.32
66+
public static final double[] DRIVE_P = new double[] {9.5, 9.5, 9,5, 9.5}; //.32
6567
public static final double[] DRIVE_I = new double[] {0, 0, 0, 0};
66-
public static final double[] DRIVE_D = new double[] {0.01, 0.01, 0.01, 0.01};
68+
public static final double[] DRIVE_D = new double[] {0.1, 0.1, 0.1, 0.1};
6769
public static final double[] DRIVE_S = new double[] {5, 5, 5, 5};//{0.16, 0.1499, 0.1499, 0.1499};
6870
public static final double[] DRIVE_V = new double[] {0.0, 0.0, 0.0, 0.0}; //{0.11, 0.112, 0.112, 0.112};
6971

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

76-
public static final boolean DRIVE_DEBUG = true;
78+
public static final boolean DRIVE_DEBUG = false;
7779
public static final boolean STEER_DEBUG = false;
7880
public static final boolean STATE_DEBUG = false;
7981
}

0 commit comments

Comments
 (0)