@@ -210,11 +210,11 @@ public static final class Drivetrainc {
210210 // seconds it takes to go from 0 to 12 volts(aka MAX)
211211 public static final double secsPer12Volts = 0.1 ;
212212
213- // maxRCW is the angular velocity of the robot.
214- // Calculated by looking at one of the motors and treating it as a point mass moving around in a circle.
215- // Tangential speed of this point mass is maxSpeed and the radius of the circle is sqrt((wheelBase/2)^2 + (trackWidth/2)^2)
216- // Angular velocity = Tangential speed / radius
217- public static final double maxRCW = maxSpeed / swerveRadius ;
213+ // maxRCW is the angular velocity of the robot.
214+ // Calculated by looking at one of the motors and treating it as a point mass moving around in a circle.
215+ // Tangential speed of this point mass is maxSpeed and the radius of the circle is sqrt((wheelBase/2)^2 + (trackWidth/2)^2)
216+ // Angular velocity = Tangential speed / radius
217+ public static final double maxRCW = maxSpeed / swerveRadius ;
218218
219219 public static final boolean [] reversed = {false , false , false , false };
220220 // public static final boolean[] reversed = {true, true, true, true};
@@ -255,27 +255,27 @@ public static final class Drivetrainc {
255255 public static final double [] kForwardAccels = {1.1047 /2 , 0.79422 /2 , 0.77114 /2 , 1.1003 /2 };
256256 public static final double [] kBackwardAccels = kForwardAccels ;
257257
258- public static final double autoMaxSpeedMps = 0.35 * 4.4 ; // Meters / second
259- public static final double autoMaxAccelMps2 = mu * g ; // Meters / seconds^2
260- public static final double autoMaxVolt = 10.0 ; // For Drivetrain voltage constraint in RobotPath.java
261- // The maximum acceleration the robot can achieve is equal to the coefficient of static friction times the gravitational acceleration
262- // a = mu * 9.8 m/s^2
263- public static final double autoCentripetalAccel = mu * g * 2 ;
258+ public static final double autoMaxSpeedMps = 0.35 * 4.4 ; // Meters / second
259+ public static final double autoMaxAccelMps2 = mu * g ; // Meters / seconds^2
260+ public static final double autoMaxVolt = 10.0 ; // For Drivetrain voltage constraint in RobotPath.java
261+ // The maximum acceleration the robot can achieve is equal to the coefficient of static friction times the gravitational acceleration
262+ // a = mu * 9.8 m/s^2
263+ public static final double autoCentripetalAccel = mu * g * 2 ;
264264
265- public static final boolean isGyroReversed = true ;
265+ public static final boolean isGyroReversed = true ;
266266
267- // PID values are listed in the order kP, kI, and kD
268- public static final double [] xPIDController = {4 , 0.0 , 0.0 };
269- public static final double [] yPIDController = {4 , 0.0 , 0.0 };
270- public static final double [] thetaPIDController = {0.05 , 0.0 , 0.001 };
267+ // PID values are listed in the order kP, kI, and kD
268+ public static final double [] xPIDController = {4 , 0.0 , 0.0 };
269+ public static final double [] yPIDController = {4 , 0.0 , 0.0 };
270+ public static final double [] thetaPIDController = {0.1 , 0.0 , 0.00 };
271271
272272 public static final SwerveConfig swerveConfig = new SwerveConfig (wheelDiameterMeters , driveGearing , mu , autoCentripetalAccel , kForwardVolts , kForwardVels , kForwardAccels , kBackwardVolts , kBackwardVels , kBackwardAccels , drivekP , drivekI , drivekD , turnkP , turnkI , turnkD , turnkS , turnkV , turnkA , turnZeroDeg , driveInversion , reversed , driveModifier , turnInversion );
273273
274- public static final Transform limelightTransformForPoseEstimation = Transform .BOTPOSE_WPIBLUE ;
274+ // public static final Limelight. Transform limelightTransformForPoseEstimation = Transform.BOTPOSE_WPIBLUE;
275275
276- //#endregion
276+ //#endregion
277277
278- //#region Ports
278+ //#region Ports
279279
280280 public static final int driveFrontLeftPort = 11 ; //
281281 public static final int driveFrontRightPort = 19 ; //
@@ -292,21 +292,21 @@ public static final class Drivetrainc {
292292 public static final int canCoderPortBL = 2 ;
293293 public static final int canCoderPortBR = 1 ;
294294
295- //#endregion
295+ //#endregion
296296
297- //#region Command Constants
297+ //#region Command Constants
298298
299- public static double kNormalDriveSpeed = 1 ; // Percent Multiplier
300- public static double kNormalDriveRotation = 0.5 ; // Percent Multiplier
301- public static double kSlowDriveSpeed = 0.4 ; // Percent Multiplier
302- public static double kSlowDriveRotation = 0.250 ; // Percent Multiplier
303- public static double kAlignMultiplier = 1D /3D ;
304- public static final double kAlignForward = 0.6 ;
299+ public static double kNormalDriveSpeed = 1 ; // Percent Multiplier
300+ public static double kNormalDriveRotation = 0.5 ; // Percent Multiplier
301+ public static double kSlowDriveSpeed = 0.4 ; // Percent Multiplier
302+ public static double kSlowDriveRotation = 0.250 ; // Percent Multiplier
303+ public static double kAlignMultiplier = 1D /3D ;
304+ public static final double kAlignForward = 0.6 ;
305305
306- public static final double wheelTurnDriveSpeed = 0.0001 ; // Meters / Second ; A non-zero speed just used to orient the wheels to the correct angle. This should be very small to avoid actually moving the robot.
306+ public static final double wheelTurnDriveSpeed = 0.0001 ; // Meters / Second ; A non-zero speed just used to orient the wheels to the correct angle. This should be very small to avoid actually moving the robot.
307307
308- public static final double [] positionTolerance = {Units .inchesToMeters (.5 ), Units .inchesToMeters (.5 ), 5 }; // Meters, Meters, Degrees
309- public static final double [] velocityTolerance = {Units .inchesToMeters (1 ), Units .inchesToMeters (1 ), 5 }; // Meters, Meters, Degrees/Second
308+ public static final double [] positionTolerance = {Units .inchesToMeters (.5 ), Units .inchesToMeters (.5 ), 5 }; // Meters, Meters, Degrees
309+ public static final double [] velocityTolerance = {Units .inchesToMeters (1 ), Units .inchesToMeters (1 ), 5 }; // Meters, Meters, Degrees/Second
310310
311311 //#endregion
312312 //#region Subsystem Constants
@@ -329,22 +329,27 @@ public static final class Autoc {
329329 //#endregion
330330 }
331331
332- public static final class Limelight {
332+ public static final class Limelightc {
333333 public static final String INTAKE_LL_NAME = "intake-limelight" ;
334334 public static final String SHOOTER_LL_NAME = "shooter-limelight" ;
335335
336- public static final double ERROR_TOLERANCE = 0.1 ;
337- public static final double HORIZONTAL_FOV_DEG = 0 ;
338- public static final double RESOLUTION_WIDTH = 640 ;
339- public static final double MOUNT_ANGLE_DEG = 46.2 ; //23.228
340- public static final double HEIGHT_FROM_GROUND_METERS = Units .inchesToMeters (9 ); //16.6
341- public static final double ARM_TO_OUTTAKE_OFFSET_DEG = 115 ;
342- public static final class Apriltag {
343- public static final int RED_SPEAKER_CENTER_TAG_ID = 4 ;
344- public static final int BLUE_SPEAKER_CENTER_TAG_ID = 7 ;
345- public static final double SPEAKER_CENTER_HEIGHT_METERS = Units .inchesToMeters (56.7 ); //88.125
346- }
336+ public static final double ERROR_TOLERANCE_RAD = 0.1 ;
337+ public static final double HORIZONTAL_FOV_DEG = 0 ;
338+ public static final double RESOLUTION_WIDTH_PIX = 640 ;
339+ public static final double MOUNT_ANGLE_DEG_SHOOTER = 25 ; //23.228
340+ public static final double MOUNT_ANGLE_DEG_INTAKE = -22 ; //23.228
341+ public static final double HEIGHT_FROM_GROUND_METERS_SHOOTER = Units .inchesToMeters (56 ); //16.6
342+ public static final double HEIGHT_FROM_GROUND_METERS_INTAKE = Units .inchesToMeters (52 ); //16.6
343+ public static final double ARM_TO_OUTTAKE_OFFSET_DEG = 115 ;
344+ public static final double NOTE_HEIGHT = Units .inchesToMeters (0 );
345+ public static final double MIN_MOVEMENT_METERSPSEC = 0.5 ;
346+ public static final double MIN_MOVEMENT_RADSPSEC = 0.5 ;
347+ public static final class Apriltag {
348+ public static final int RED_SPEAKER_CENTER_TAG_ID = 4 ;
349+ public static final int BLUE_SPEAKER_CENTER_TAG_ID = 7 ;
350+ public static final double SPEAKER_CENTER_HEIGHT_METERS = Units .inchesToMeters (56.7 ); //88.125
347351 }
352+ }
348353
349354 public static final class OI {
350355 public static final class Driver {
0 commit comments