Package robot.humaninterface.drivers
Class SwerveDriver
java.lang.Object
lib.humaninput.HumanInput
lib.humaninput.Driver
robot.humaninterface.drivers.SwerveDriver
- All Implemented Interfaces:
Nameable
-
Field Summary
Fields inherited from class lib.humaninput.HumanInput
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidA function where the driver's and operator's controls are bound to commandsprotected doubleprotected doubleedu.wpi.first.math.geometry.Translation2ddoublevoidCan be optionally overridden to unbind commands that were bound in bindCommands().Methods inherited from class lib.humaninput.HumanInput
getName
-
Constructor Details
-
SwerveDriver
public SwerveDriver()
-
-
Method Details
-
bindCommands
public void bindCommands()Description copied from class:HumanInputA function where the driver's and operator's controls are bound to commandsCan't be done in the constructor because constructors are called too early
- Specified by:
bindCommandsin classHumanInput
-
unbindCommands
public void unbindCommands()Description copied from class:HumanInputCan be optionally overridden to unbind commands that were bound in bindCommands().You should do this for any commands that were not bound to one of the following:
-
RobotMap.HumanInput.Driver.xyJoystick -
RobotMap.HumanInput.Driver.turnJoystick -
RobotMap.HumanInput.Operator.joystick
CommandRobotBase.clearBindings()- Overrides:
unbindCommandsin classHumanInput
-
-
getRawForward
protected double getRawForward() -
getRawLeft
protected double getRawLeft() -
getTranslation
public edu.wpi.first.math.geometry.Translation2d getTranslation()- Specified by:
getTranslationin classDriver- Returns:
- Speed that the driver wants, in wpilib field-relative coordinates (forward, left). Length of translation vector should not exceed 1
-
getTurnSpeed
public double getTurnSpeed()- Specified by:
getTurnSpeedin classDriver- Returns:
- Turn speed that the driver wants in the range [-1, 1], positive = counterclockwise
-