generated from Choate-Robotics/7407-DriveCode-Template-v2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
robot_systems.py
41 lines (28 loc) · 1.22 KB
/
robot_systems.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
import subsystem
import sensors
import wpilib, config, constants, utils
class Robot:
wrist: subsystem.Wrist = subsystem.Wrist()
intake: subsystem.Intake = subsystem.Intake()
elevator: subsystem.Elevator = subsystem.Elevator()
drivetrain: subsystem.Drivetrain = subsystem.Drivetrain()
flywheel: subsystem.Flywheel = subsystem.Flywheel()
class Pneumatics:
pass
class Sensors:
limelight_intake = sensors.Limelight(config.LimelightPosition.init_elevator_front, 'limelight-i')
limelight_back = sensors.Limelight(config.LimelightPosition.init_elevator_back, 'limelight-b')
limelight_front = sensors.Limelight(config.LimelightPosition.init_elevator_front)
class LEDs:
leds = sensors.ALeds(config.leds_id, config.leds_size)
class PowerDistribution:
pd = wpilib.PowerDistribution(30, wpilib.PowerDistribution.ModuleType.kRev)
class Field:
odometry = sensors.FieldOdometry(
Robot.drivetrain,
sensors.LimelightController([Sensors.limelight_front, Sensors.limelight_back], Robot.drivetrain.gyro),
constants.field_width,
constants.field_length
)
calculations = sensors.TrajectoryCalculator(odometry, Robot.elevator, Robot.flywheel)
POI = utils.POI()