Class ArcadeDrive

java.lang.Object
me.autobot.lib.robot.drivebase.ArcadeDrive

public class ArcadeDrive extends Object
A drivebase that uses arcade drive.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArcadeDrive(Motor topLeft, Motor topRight, Motor bottomLeft, Motor bottomRight)
    Creates a new ArcadeDrive object.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Vector2d
    arcadeDrive(double speed, double rot)
    Translates arcade drive to motor speeds.
    void
    drive(double speed, double rotation)
    Drives the robot with the given speed and rotation.
    void
    drive(double speed, double rotation, double multiplier)
    Drives the robot with the given speed and rotation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArcadeDrive

      public ArcadeDrive(Motor topLeft, Motor topRight, Motor bottomLeft, Motor bottomRight)
      Creates a new ArcadeDrive object.
      Parameters:
      topLeft - The top left motor. This motor is on the top left of the robot.
      topRight - The top right motor. This motor is on the top right of the robot.
      bottomLeft - The bottom left motor. This motor is on the bottom left of the robot.
      bottomRight - The bottom right motor. This motor is on the bottom right of the robot.
      See Also:
  • Method Details

    • drive

      public void drive(double speed, double rotation)
      Drives the robot with the given speed and rotation.
      Parameters:
      speed - The speed of the robot. Positive is forward, negative is backward. Range: -1 to 1.
      rotation - The rotation of the robot. Positive is right, negative is left.
    • drive

      public void drive(double speed, double rotation, double multiplier)
      Drives the robot with the given speed and rotation.
      Parameters:
      speed - The speed of the robot. Positive is forward, negative is backward. Range: -1 to 1.
      rotation - The rotation of the robot. Positive is right, negative is left.
      multiplier - The multiplier to apply to the motor speeds.
    • arcadeDrive

      protected Vector2d arcadeDrive(double speed, double rot)
      Translates arcade drive to motor speeds.
      Parameters:
      speed - The speed of the robot.
      rot - The rotation of the robot.
      Returns:
      The motor speeds. (x=left, y=right)