-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.java
More file actions
42 lines (32 loc) · 1.83 KB
/
Constants.java
File metadata and controls
42 lines (32 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package frc.robot;
import edu.wpi.first.math.geometry.Translation2d;
public final class Constants {
public static final class DriveConstants {
public static final int kFrontLeftChannel = 5;
public static final int kRearLeftChannel = 2;
public static final int kFrontRightChannel = 4;
public static final int kRearRightChannel = 3;
public static final double driveDistancePerPulse = 0.01;
public static final double STEER_K = 0.003; // how hard to turn toward the target
public static final double DRIVE_K = 0.01; // how hard to drive fwd toward the target
public static final double DESIRED_TARGET_AREA = 13.0; // Area of the target when the robot reaches the wall
public static final double MAX_DRIVE = 0.7; // Simple speed limit so we don't drive too fast
}
public static final class ElevatorConstants {
public static double kDt = 0.02;
public static double kMaxVelocity = 1.75;
public static double kMaxAcceleration = 0.75;
public static double kP = 1.3;
public static double kI = 0.0;
public static double kD = 0.7;
public static double kS = 1.1;
public static double kG = 1.2;
public static double kV = 1.3;
}
public static final class OdometryConstants {
public static final Translation2d frontLeftWheelMeters = new Translation2d(-0.29845, 0.27305);
public static final Translation2d frontRightWheelMeters = new Translation2d(0.29845, 0.27305);
public static final Translation2d rearLeftWheelMeters = new Translation2d(-0.29845, -0.27305);
public static final Translation2d rearRightWheelMeters = new Translation2d(0.29845, -0.27305);
}
}