-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobot.py
59 lines (36 loc) · 1.07 KB
/
robot.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
59
#! python3
import wpilib
import commands2
import math
import constants
import robotcontainer
#import networktables
#networktables.NetworkTables.initialize()
import subsystems.swervedrivetrain
from commands import drivetrain
from wpilib import DriverStation
class Robot(commands2.TimedCommandRobot):
def robotInit(self):
DriverStation.silenceJoystickConnectionWarning(True)
print("robot init before container")
self.robot = robotcontainer.robotcontainer()
print("robot init after container")
#self.scheduler = commands2.CommandScheduler.getInstance()
print("robot init scheduler")
def robotPeriodic(self):
commands2.CommandScheduler.getInstance().run()
#self.scheduler.run()
def teleopPeriodic(self):
pass
def teleopInit(self):
pass
def disabledInit(self):
commands2.CommandScheduler.getInstance().cancelAll()
def disabledPeriodic(self):
pass
def autonomousInit(self):
pass
def autonomousPeriodic(self):
pass
if __name__ == "__main__":
wpilib.run(Robot)