Package frclib.drivebase
Class FrcRobotDrive
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frclib.drivebase.FrcRobotDrive
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Subsystem
- Direct Known Subclasses:
FrcDifferentialDrive
,FrcMecanumDrive
,FrcSwerveDrive
public class FrcRobotDrive
extends edu.wpi.first.wpilibj2.command.SubsystemBase
This class is intended to be extended by subclasses implementing different robot drive bases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
This class contains the Common Robot Info.static class
This class contains Vision parameters of a camera. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal TrcMotor[]
final TrcGyro
static final int
static final int
static final int
static final int
static final int
static final int
final FrcRobotDrive.RobotInfo
-
Constructor Summary
ConstructorsConstructorDescriptionFrcRobotDrive
(FrcRobotDrive.RobotInfo robotInfo) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
This method cancels any drive operation still in progress.void
This method cancels any drive operation still in progress.protected void
configDriveBase
(TrcDriveBase driveBase) This method configures the rest of drive base after it has been created.double
This method returns the gyro pitch.double
This method returns the gyro roll.double
This method returns the gyro yaw.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, periodic, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Field Details
-
INDEX_LEFT_FRONT
public static final int INDEX_LEFT_FRONT- See Also:
-
INDEX_RIGHT_FRONT
public static final int INDEX_RIGHT_FRONT- See Also:
-
INDEX_LEFT_BACK
public static final int INDEX_LEFT_BACK- See Also:
-
INDEX_RIGHT_BACK
public static final int INDEX_RIGHT_BACK- See Also:
-
INDEX_LEFT_CENTER
public static final int INDEX_LEFT_CENTER- See Also:
-
INDEX_RIGHT_CENTER
public static final int INDEX_RIGHT_CENTER- See Also:
-
robotInfo
-
imu
-
driveMotors
-
driveBase
-
pidDrive
-
purePursuitDrive
-
-
Constructor Details
-
FrcRobotDrive
Constructor: Create an instance of the object.- Parameters:
robotInfo
- specifies the Robot Info.
-
-
Method Details
-
cancel
This method cancels any drive operation still in progress.- Parameters:
owner
- specifies the owner that requested the cancel.
-
cancel
public void cancel()This method cancels any drive operation still in progress. -
configDriveBase
This method configures the rest of drive base after it has been created.- Parameters:
driveBase
- specifies the created drive base.
-
getGyroPitch
public double getGyroPitch()This method returns the gyro pitch.- Returns:
- gyro pitch.
-
getGyroRoll
public double getGyroRoll()This method returns the gyro roll.- Returns:
- gyro roll.
-
getGyroYaw
public double getGyroYaw()This method returns the gyro yaw.- Returns:
- gyro yaw.
-