Classes | |
| enum | Mode |
Public Member Functions | |
| void | drive (double leftAnalogX, double leftAnalogY, double rightAnalogX, double rightAnalogY) |
| Drive the robot with controller input. | |
| void | drive (double leftAnalogX, double leftAnalogY, double rightAnalogX) |
| abstract void | printControlsOfCurrentMode () |
| Prints the controls of the current driving mode. | |
| void | increaseSpeedBracket () |
| The speed bracket controls the multiplier for al the speeds So when you change it, lets say, to 1/2 speed, all movement will be at 1/2 speed. | |
| void | decreaseSpeedBracket () |
| void | turnOnDefaultMode () |
| void | turnOnDebugMode () |
| void | turnOnStopMode () |
| should be overridden for actual functionality because depends on drive base specifc speeds (for tank drive, there is a left and right speed, whereas for mecanum there are 4) | |
| void | turnONPIDTuningMode () |
| abstract void | cycleMotor () |
| Needs to be implemented in sub classes becuase there might be different numbers of motors. | |
| void | AButtonPressed () |
| void | BButtonPressed () |
| void | XButtonPressed () |
| void | YButtonPressed () |
| void | leftBumperPressed () |
| void | rightBumperPressed () |
| Mode | getCurrentMode () |
| void | setCurrentMode (Mode currentMode) |
| int | getDebugEnabledMotor () |
| void | setDebugEnabledMotor (int debugEnabledMotor) |
| Trajectory | getCurrentTrajectory () |
| void | setCurrentTrajectory (Trajectory currentTrajectory) |
| TrajectoryConfig | getTrajectoryConfig () |
| RamseteController | getChassisController () |
| double | getCurrentTrajectoryTime () |
| void | resetCurrentTrajectoryTime () |
| void | incrementCurrentTrajectoryTime () |
Protected Attributes | |
| TrajectoryConfig | trajectoryConfig |
Private Attributes | |
| Trajectory | currentTrajectory |
| double | currentTrajectoryTime |
| final RamseteController | chassisController = new RamseteController(Constants.RAMSETE_B, Constants.RAMSETE_ZETA) |
Definition at line 10 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.AButtonPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 126 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.BButtonPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 128 of file DriveBase.java.
|
abstract |
Needs to be implemented in sub classes becuase there might be different numbers of motors.
Reimplemented in frc.robot.subsystems.MecaDrive, and frc.robot.subsystems.TankDrive.
| void frc.robot.subsystems.DriveBase.decreaseSpeedBracket | ( | ) |
Definition at line 72 of file DriveBase.java.
Referenced by frc.robot.Robot.checkForButtonPresses(), and frc.robot.subsystems.TankDrive.leftBumperPressed().
| void frc.robot.subsystems.DriveBase.drive | ( | double | leftAnalogX, |
| double | leftAnalogY, | ||
| double | rightAnalogX | ||
| ) |
Reimplemented in frc.robot.subsystems.MecaDrive.
Definition at line 53 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.drive | ( | double | leftAnalogX, |
| double | leftAnalogY, | ||
| double | rightAnalogX, | ||
| double | rightAnalogY | ||
| ) |
Drive the robot with controller input.
These are doubles on the interval [-1, 1] and come from the controller's analog sticks
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 49 of file DriveBase.java.
| RamseteController frc.robot.subsystems.DriveBase.getChassisController | ( | ) |
Definition at line 160 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.chassisController.
Referenced by frc.robot.subsystems.Autonomous.getChassisSpeeds().
| Mode frc.robot.subsystems.DriveBase.getCurrentMode | ( | ) |
Definition at line 139 of file DriveBase.java.
| Trajectory frc.robot.subsystems.DriveBase.getCurrentTrajectory | ( | ) |
Definition at line 151 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.currentTrajectory.
Referenced by frc.robot.subsystems.Autonomous.getChassisSpeeds().
| double frc.robot.subsystems.DriveBase.getCurrentTrajectoryTime | ( | ) |
Definition at line 163 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.currentTrajectoryTime.
Referenced by frc.robot.subsystems.Autonomous.getChassisSpeeds().
| int frc.robot.subsystems.DriveBase.getDebugEnabledMotor | ( | ) |
Definition at line 145 of file DriveBase.java.
| TrajectoryConfig frc.robot.subsystems.DriveBase.getTrajectoryConfig | ( | ) |
Definition at line 157 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.trajectoryConfig.
Referenced by frc.robot.subsystems.Autonomous.updateTrajectory().
| void frc.robot.subsystems.DriveBase.increaseSpeedBracket | ( | ) |
The speed bracket controls the multiplier for al the speeds So when you change it, lets say, to 1/2 speed, all movement will be at 1/2 speed.
Definition at line 67 of file DriveBase.java.
Referenced by frc.robot.Robot.checkForButtonPresses(), and frc.robot.subsystems.TankDrive.rightBumperPressed().
| void frc.robot.subsystems.DriveBase.incrementCurrentTrajectoryTime | ( | ) |
Definition at line 169 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.currentTrajectoryTime, and frc.robot.Constants.SECONDS_BETWEEN_CODE_PERIODS.
Referenced by frc.robot.Robot.autonomousPeriodic().
| void frc.robot.subsystems.DriveBase.leftBumperPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 134 of file DriveBase.java.
|
abstract |
Prints the controls of the current driving mode.
Reimplemented in frc.robot.subsystems.MecaDrive, and frc.robot.subsystems.TankDrive.
Referenced by frc.robot.subsystems.DriveBase.turnOnDebugMode(), frc.robot.subsystems.DriveBase.turnOnDefaultMode(), frc.robot.subsystems.DriveBase.turnONPIDTuningMode(), and frc.robot.subsystems.DriveBase.turnOnStopMode().
| void frc.robot.subsystems.DriveBase.resetCurrentTrajectoryTime | ( | ) |
Definition at line 166 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.currentTrajectoryTime.
Referenced by frc.robot.Robot.autonomousCheckForButtonPresses(), and frc.robot.Robot.autonomousInit().
| void frc.robot.subsystems.DriveBase.rightBumperPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 136 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.setCurrentMode | ( | Mode | currentMode | ) |
Definition at line 142 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.setCurrentTrajectory | ( | Trajectory | currentTrajectory | ) |
Definition at line 154 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.currentTrajectory.
Referenced by frc.robot.subsystems.Autonomous.updateTrajectory().
| void frc.robot.subsystems.DriveBase.setDebugEnabledMotor | ( | int | debugEnabledMotor | ) |
Definition at line 148 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.turnOnDebugMode | ( | ) |
Definition at line 87 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.printControlsOfCurrentMode().
Referenced by frc.robot.Robot.checkForModeSwitches().
| void frc.robot.subsystems.DriveBase.turnOnDefaultMode | ( | ) |
Definition at line 78 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.printControlsOfCurrentMode().
Referenced by frc.robot.Robot.checkForModeSwitches().
| void frc.robot.subsystems.DriveBase.turnONPIDTuningMode | ( | ) |
Definition at line 110 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.printControlsOfCurrentMode().
Referenced by frc.robot.Robot.checkForModeSwitches().
| void frc.robot.subsystems.DriveBase.turnOnStopMode | ( | ) |
should be overridden for actual functionality because depends on drive base specifc speeds (for tank drive, there is a left and right speed, whereas for mecanum there are 4)
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 101 of file DriveBase.java.
References frc.robot.subsystems.DriveBase.printControlsOfCurrentMode().
Referenced by frc.robot.Robot.checkForModeSwitches().
| void frc.robot.subsystems.DriveBase.XButtonPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 130 of file DriveBase.java.
| void frc.robot.subsystems.DriveBase.YButtonPressed | ( | ) |
Reimplemented in frc.robot.subsystems.TankDrive.
Definition at line 132 of file DriveBase.java.
|
private |
Definition at line 39 of file DriveBase.java.
Referenced by frc.robot.subsystems.DriveBase.getChassisController().
|
private |
Definition at line 30 of file DriveBase.java.
Referenced by frc.robot.subsystems.DriveBase.getCurrentTrajectory(), and frc.robot.subsystems.DriveBase.setCurrentTrajectory().
|
private |
Definition at line 31 of file DriveBase.java.
Referenced by frc.robot.subsystems.DriveBase.getCurrentTrajectoryTime(), frc.robot.subsystems.DriveBase.incrementCurrentTrajectoryTime(), and frc.robot.subsystems.DriveBase.resetCurrentTrajectoryTime().
|
protected |
Definition at line 35 of file DriveBase.java.
Referenced by frc.robot.subsystems.DriveBase.getTrajectoryConfig(), and frc.robot.subsystems.MecaDrive.MecaDrive().