Class DriveCommands

java.lang.Object
frc.robot.commands.DriveCommands

public class DriveCommands extends Object
Factory class for creating commands related to the drivetrain subsystem.

Provides methods for joystick control, PID-assisted rotation, and characterization routines to tune motor controllers.

  • Method Details

    • feedforwardCharacterization

      public static Command feedforwardCharacterization(Drive drive)
      Measures the velocity feedforward constants (kS and kV) for the drive motors.

      This command should only be used in voltage control mode to collect raw data.

      Parameters:
      drive - The drive subsystem.
      Returns:
      A command that ramps voltage to collect characterization data.
    • wheelRadiusCharacterization

      public static Command wheelRadiusCharacterization(Drive drive)
      Measures the robot's wheel radius by spinning in a circle and comparing gyro rotation to encoder rotation.
      Parameters:
      drive - The drive subsystem.
      Returns:
      A command that spins the robot to calculate effective wheel radius.