Interface Drive

All Known Implementing Classes:
DriveWrapper

public interface Drive
An interface used to make sure different types of drive systems are fully integrated and working.

If you're trying to make a Pathfinder configuration and you want to add a drivetrain (have to, actually) you SHOULD NOT implement this class. UNLESS you have a drivetrain that's not a swerve drive, a meccanum drive, or a tank drive, you should use a pre-made class instead of creating your own. Unless you like debugging...

Since:
0.1.0
Author:
Colin Robertson
  • Method Summary

    Modifier and Type Method Description
    void disableUserControl()
    Stop allowing the drivetrain to be controlled by a user.
    void drive​(RTransform transform)
    Drive the robot according to a specified transformation.
    void enableUserControl()
    Allow the drivetrain to be controlled by a user.
  • Method Details

    • drive

      void drive​(RTransform transform)
      Drive the robot according to a specified transformation. Transformations are made up of several components, most notably X, Y, and angle. It's important to note that the angle component of these transformations represents the angle that the robot SHOULD be facing, not by how much the robot needs to turn.
      Parameters:
      transform - the robot's desired transformation. It's important to note that this transformation's angle doesn't mean how much the robot should be turning, it means the angle that the robot should currently be facing.
    • enableUserControl

      void enableUserControl()
      Allow the drivetrain to be controlled by a user.

      User control needs to be enabled in order for the user to actually control the robot manually, such as via a joystick. Although Pathfinder is pretty lovely, sometimes you need to control the robot.

      If this isn't implemented properly, you may see very funky things going on with the motors - spasms, for example. In order to counter this, it's a good idea to... well, actually implement this method properly.

    • disableUserControl

      void disableUserControl()
      Stop allowing the drivetrain to be controlled by a user.

      In order for Pathfinder to actually function, and in order for the user to not miserably mess up absolutely everything, user control needs to be disabled prior to controlling a motor.

      If this isn't implemented properly, you may see very funky things going on with the motors - spasms, for example. In order to counter this, it's a good idea to... well, actually implement this method properly.