|
20 | 20 | import frc.robot.commands.DrivetrainCommand; |
21 | 21 | import frc.robot.commands.FlywheelCommand; |
22 | 22 | import frc.robot.commands.KickerCommand; |
23 | | -import frc.robot.config.TunerConstants; |
24 | 23 | import frc.robot.subsystems.CommandSwerveDrivetrain; |
25 | 24 | import frc.robot.subsystems.Hopper; |
26 | 25 | import frc.robot.subsystems.Intake; |
27 | 26 |
|
28 | 27 | @Logged |
29 | 28 | public class Robot extends TimedRobot { |
30 | 29 | private Command m_autonomousCommand; |
31 | | - private final CommandSwerveDrivetrain drivetrain = TunerConstants.createDrivetrain(); |
32 | 30 | // last time we injected a synthetic vision measurement (seconds, FPGA time) |
33 | 31 | private double m_lastSimVisionTime = 0.0; |
34 | 32 | // whether we've injected a one-time offset vision measurement for testing |
35 | 33 | private boolean m_injectedOffset = false; |
36 | 34 | private Pose2d robotPose = new Pose2d(); |
37 | 35 | private final RobotContainer m_robotContainer; |
| 36 | + private final CommandSwerveDrivetrain drivetrain; |
38 | 37 | StructPublisher<Pose2d> publisher = |
39 | 38 | NetworkTableInstance.getDefault().getStructTopic("Robot Pose", Pose2d.struct).publish(); |
40 | 39 | StructArrayPublisher<Pose2d> arrayPublisher = |
41 | 40 | NetworkTableInstance.getDefault().getStructArrayTopic("MyPoseArray", Pose2d.struct).publish(); |
42 | 41 |
|
43 | 42 | public Robot() { |
44 | 43 | m_robotContainer = new RobotContainer(); |
| 44 | + drivetrain = m_robotContainer.getDrivetrain(); |
45 | 45 | Epilogue.bind(this); |
46 | 46 | DataLogManager.start(); |
47 | 47 | DriverStation.startDataLog(DataLogManager.getLog()); |
|
0 commit comments