-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.py
58 lines (48 loc) · 1.15 KB
/
constants.py
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
"""
CONSTANTS
"""
# Options
kUsingGuitarController = False
kDebug = True # Turns off some temporary SmartDashboard values (basically if we dont want to clutter up things ;))
# Multipliers
kDefaultSpeedMultplier = 1.0
kDefaultTranslationMultiplier = 1.0
kDefaultRotationMultiplier = 1.0
# Motors
kleftFrontSpeedID = 0
kleftRearSpeedID = 1
krightFrontSpeedID = 2
krightRearSpeedID = 3
kleftFrontDirectionID = 4
kleftRearDirectionID = 5
krightFrontDirectionID = 6
krightRearDirectionID = 7
# Controllers
kdriverControllerPort = 0
kdeadband = 0.15
# Encoders
ktimeoutMs = 10
kF = 0.05282272 # Feed forward
kP = 0.3 # Proportional
kI = 0.004 # Integral
kD = 2 # Derivative
kIzone = 150
kcruiseVel = 21134.0 # Cruise Velocity at 100% of max (max = 21134)
kcruiseAccel = 21134.0 # Cruise Acceleration same as velocity
kSlotIdx = 0
kPIDLoopIdx = 0
# CANCoders
kflCANcoderID = 10
krlCANcoderID = 11
kfrCANcoderID = 12
krrCANcoderID = 13
# Offsets
kflCANoffset = 350.5078125
krlCANoffset = 179.12109375
kfrCANoffset = 324.755859375
krrCANoffset = 28.828125
ksteeringGearRatio = 150 / 7
# PID constants for the charge station
kChargeP = 0.0115
kChargeI = 0.0
kChargeD = 0.0013