Repository navigation
Expand file tree
/
Copy pathconstants.py
More file actions
113 lines (81 loc) · 1.8 KB
/
Copy pathconstants.py
File metadata and controls
113 lines (81 loc) · 1.8 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# constants.py
from enum import Enum
import math
from wpimath.geometry import Translation2d
from wpimath.units import inchesToMeters
TwoPI = math.tau
HalfPI = math.pi / 2.0
class CanIdConstants:
LFTurnMotor = 7
LFDriveMotor = 8
LBTurnMotor = 6
LBDriveMotor = 5
RBTurnMotor = 3
RBDriveMotor = 4
RFTurnMotor = 2
RFDriveMotor = 1
LFCanID = 10
LBCanID = 11
RFCanID = 13
RBCanID = 12
PigeonID = 14
PDHID = 50
class DriveConstants:
defaultSpeedMod = 0.3
maxRobotSpeedmps = 4.5
maxRobotAutoSpeedmps = 2.5
driveGearRatio = 6.75
turnGearRatio = 150.0 / 7.0
wheelDiameter = inchesToMeters(4.25)
wheelCircumference = wheelDiameter * math.pi
maxAngularVelocityRadps = TwoPI
maxLinearSpeed = 15.5 / 3.281
wheelBase = 0.52705
trackWidth = 0.5842
LFOff = 0.0
RFOff = 0.0
LBOff = 0.0
RBOff = 0.0
LFLocation = Translation2d(
wheelBase / 2.0,
trackWidth / 2.0,
)
RFLocation = Translation2d(
wheelBase / 2.0,
-trackWidth / 2.0,
)
LBLocation = Translation2d(
-wheelBase / 2.0,
trackWidth / 2.0,
)
RBLocation = Translation2d(
-wheelBase / 2.0,
-trackWidth / 2.0,
)
kNominalVoltage = 12
kDriveCurrentLimit = 60
kSteerCurrentLimit = 25
class ControllerConstants:
joystickDeadband = 0.1
joystickZDeadband = 0.35
class NeoConstants:
CountsPerRevolution = 1.0
class DebugLevel (Enum):
Off = 0
Swerve = 1
ArmRotate = 2
ArmExtend = 3
Elevator = 4
Algae = 5
Claw = 6
Autonomous = 7
Vision = 8
Wrist = 9
Climber = 10
All = 11
class DebugSetting:
TraceLevel = DebugLevel.Autonomous
class TimeDuration:
Instant = 0.01
HalfSecond = 0.5
Second = 1.0