Package frc.RebeLib.commands
Class DriveCommands
java.lang.Object
frc.RebeLib.commands.DriveCommands
-
Method Summary
Modifier and TypeMethodDescriptionstatic edu.wpi.first.wpilibj2.command.Command
feedforwardCharacterization
(Drive drive) Measures the velocity feedforward constants for the drive motors.static edu.wpi.first.wpilibj2.command.Command
joystickDrive
(Drive drive, DoubleSupplier xSupplier, DoubleSupplier ySupplier, DoubleSupplier omegaSupplier) Field relative drive command using two joysticks (controlling linear and angular velocities).static edu.wpi.first.wpilibj2.command.Command
joystickDriveAtAngle
(Drive drive, DoubleSupplier xSupplier, DoubleSupplier ySupplier, Supplier<edu.wpi.first.math.geometry.Rotation2d> rotationSupplier) Field relative drive command using joystick for linear control and PID for angular control.static edu.wpi.first.wpilibj2.command.Command
wheelRadiusCharacterization
(Drive drive) Measures the robot's wheel radius by spinning in a circle.
-
Method Details
-
joystickDrive
public static edu.wpi.first.wpilibj2.command.Command joystickDrive(Drive drive, DoubleSupplier xSupplier, DoubleSupplier ySupplier, DoubleSupplier omegaSupplier) Field relative drive command using two joysticks (controlling linear and angular velocities). -
joystickDriveAtAngle
public static edu.wpi.first.wpilibj2.command.Command joystickDriveAtAngle(Drive drive, DoubleSupplier xSupplier, DoubleSupplier ySupplier, Supplier<edu.wpi.first.math.geometry.Rotation2d> rotationSupplier) Field relative drive command using joystick for linear control and PID for angular control. Possible use cases include snapping to an angle, aiming at a vision target, or controlling absolute rotation with a joystick. -
feedforwardCharacterization
Measures the velocity feedforward constants for the drive motors.This command should only be used in voltage control mode.
-
wheelRadiusCharacterization
Measures the robot's wheel radius by spinning in a circle.
-