|
boolean | fieldRelative = false |
|
◆ DriveSubsystem()
org.titaniumtitans.frc2022.subsystems.DriveSubsystem.DriveSubsystem |
( |
| ) |
|
◆ drive()
void org.titaniumtitans.frc2022.subsystems.DriveSubsystem.drive |
( |
double |
xSpeed, |
|
|
double |
ySpeed, |
|
|
double |
rot |
|
) |
| |
Method to drive the robot using joystick info.
- Parameters
-
xSpeed | Speed of the robot in the x direction (forward). |
ySpeed | Speed of the robot in the y direction (sideways). |
rot | Angular rate of the robot. |
◆ getHeading()
double org.titaniumtitans.frc2022.subsystems.DriveSubsystem.getHeading |
( |
| ) |
|
Returns the heading of the robot.
- Returns
- the robot's heading in degrees, from -180 to 180
◆ getPose()
Pose2d org.titaniumtitans.frc2022.subsystems.DriveSubsystem.getPose |
( |
| ) |
|
Returns the currently-estimated pose of the robot.
- Returns
- The pose.
◆ getTurnRate()
double org.titaniumtitans.frc2022.subsystems.DriveSubsystem.getTurnRate |
( |
| ) |
|
Returns the turn rate of the robot.
- Returns
- The turn rate of the robot, in degrees per second
◆ resetEncoders()
void org.titaniumtitans.frc2022.subsystems.DriveSubsystem.resetEncoders |
( |
| ) |
|
Resets the drive encoders to currently read a position of 0.
◆ resetOdometry()
void org.titaniumtitans.frc2022.subsystems.DriveSubsystem.resetOdometry |
( |
Pose2d |
pose | ) |
|
Resets the odometry to the specified pose.
- Parameters
-
pose | The pose to which to set the odometry. |
◆ updateEncoderOffset()
void org.titaniumtitans.frc2022.subsystems.DriveSubsystem.updateEncoderOffset |
( |
double[] |
angles | ) |
|
Updates the magnetic offset of the the absolute encoder
- Parameters
-
angles | The angle offset in degrees of the encoder |
◆ zeroHeading()
void org.titaniumtitans.frc2022.subsystems.DriveSubsystem.zeroHeading |
( |
| ) |
|
Zeroes the heading of the robot.
The documentation for this class was generated from the following file:
- src/main/java/org/titaniumtitans/frc2022/subsystems/DriveSubsystem.java