-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.java
More file actions
62 lines (52 loc) · 2.72 KB
/
Constants.java
File metadata and controls
62 lines (52 loc) · 2.72 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot;
public final class Constants {
public static final double RAMP_PID_P = 1.00;
public static final double RAMP_PID_I = 0.00;
public static final double RAMP_PID_D = 0.00;
public static final double RAMP_PID_FF = 1.00;
public static final double RAMP_ERROR_IZONE = 0.00;
public static final double RAMP_POS = 0.0;
public static final int RAMP_ID = 45;
public static final boolean ENABLE_LOGGING = true;
//JOYSTICKS
public static final int LEFT_JOYSICK_ID = 0;
public static final int RIGHT_JOYSTICK_ID = 1;
//S = STEER, D = DRIVE, Drivetrain ConstantsS
public static final int DRIVE_FRONT_RIGHT_S = 49;
public static final int DRIVE_FRONT_RIGHT_D = 40;
public static final int DRIVE_BACK_RIGHT_S = 43;
public static final int DRIVE_BACK_RIGHT_D = 46;
public static final int DRIVE_FRONT_LEFT_S = 51;
public static final int DRIVE_FRONT_LEFT_D = 50;
public static final int DRIVE_BACK_LEFT_S = 34;
public static final int DRIVE_BACK_LEFT_D = 31;
public static final int DRIVE_CANCODER_FRONT_RIGHT = 59;
public static final int DRIVE_CANCODER_BACK_RIGHT = 57;
public static final int DRIVE_CANCODER_FRONT_LEFT = 56;
public static final int DRIVE_CANCODER_BACK_LEFT = 58;
//PID Constants
public static final double DRIVE_PID_P = 1;
public static final double DRIVE_PID_I = 0;
public static final double DRIVE_PID_D = 0;
public static final double DRIVE_PID_FF_S = 1;
public static final double DRIVE_PID_FF_V = 2.8;
public static final double STEER_PID_P = .4;
public static final double STEER_PID_I = 0;
public static final double STEER_PID_D = 0;
public static final double STEER_PID_FF_S = 0;//0.2;
public static final double STEER_PID_FF_V = 0;//0.8;
public static final double WHEEL_RADIUS = 0.0508;
public static final double CHASSIS_DRIVE_GEAR_RATIO = 8.142857; // this value should be x:1
public static final double CHASSIS_STEER_GEAR_RATIO = 150f/7f; // this value should be x:1
public static final double MAX_VELOCITY = 4.0; // 4 meters per second
public static final double MAX_ANGULAR_SPEED = Math.PI * 6; // 1 rotation per second
public static final double ROBOT_WIDTH = 0.5969;
public static final double ROBOT_LENGTH = 0.5969;
public static final double BACK_RIGHT_ABS_ENCODER_ZERO = 54.35;
public static final double FRONT_LEFT_ABS_ENCODER_ZERO = 339.5;
public static final double BACK_LEFT_ABS_ENCODER_ZERO = 18.72;
public static final double FRONT_RIGHT_ABS_ENCODER_ZERO = 133.3;
}