Class ArcadeDrive
- java.lang.Object
-
- org.chsrobotics.lib.drive.differential.ArcadeDrive
-
- All Implemented Interfaces:
DifferentialDriveMode
public class ArcadeDrive extends java.lang.Object implements DifferentialDriveMode
Moves the robot in teleop using separate inputs for linear and rotational motion.
-
-
Constructor Summary
Constructors Constructor Description ArcadeDrive(JoystickAxis linearAxis, JoystickAxis rotationalAxis, double driveModifier, double turnModifier, double driveLimiter, double turnLimiter)Constructs an ArcadeDrive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DifferentialDrivetrainInputexecute()Calculate the drive output using the current joystick inputs.
-
-
-
Constructor Detail
-
ArcadeDrive
public ArcadeDrive(JoystickAxis linearAxis, JoystickAxis rotationalAxis, double driveModifier, double turnModifier, double driveLimiter, double turnLimiter)
Constructs an ArcadeDrive.- Parameters:
linearAxis- TheJoystickAxisto be used for linear movement.rotationalAxis- TheJoystickAxisto be used for rotational movement.driveModifier- A scalar to multiply the linear input by.turnModifier- A scalar to multiply the rotational input by.driveLimiter- The maximum rate of change of the linear input, in units of input / second. If equal to 0, no rate limiting will be applied.turnLimiter- The maximum rate of change of the rotational input, in units of input / second. If equal to 0, no rate limiting will be applied.
-
-
Method Detail
-
execute
public DifferentialDrivetrainInput execute()
Calculate the drive output using the current joystick inputs.- Specified by:
executein interfaceDifferentialDriveMode- Returns:
- The input, mapped to left and right side inputs.
-
-