public abstract class Robot
extends java.lang.Object
Robot
is an abstract class that should be extended by any class representing a
physical robot.Modifier and Type | Field and Description |
---|---|
private DriveSystem |
drive
The drive system that controls the movement of this robot.
|
Constructor and Description |
---|
Robot()
Constructs a new
Robot and initializes the drive system |
Modifier and Type | Method and Description |
---|---|
DriveSystem |
createDriveSystem()
Constructs a DriveSystem that the robot should use.
|
DriveSystem |
getDrive()
Gets a reference to the
DriveSystem being used to control the robot. |
protected abstract java.lang.String[] |
getDriveMotorNames()
Gets an array of Strings representing the names of the motors used for driving.
|
abstract void |
initializeRobot()
Initializes the robot.
|
private DriveSystem drive
protected abstract java.lang.String[] getDriveMotorNames()
If the robot has four motors, this array should be in the format of:
[front left, front right, back left, back right]If the robot has only two motors, this array should be in the format of:
[left, right]
public abstract void initializeRobot()
public DriveSystem getDrive()
DriveSystem
being used to control the robot.drive
public DriveSystem createDriveSystem()
DriveSystem
that is specific to this robot or op mode.