Package frc.robot.subsystems.Swerve
Class SwerveSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Swerve.SwerveSubsystem
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class SwerveSubsystem
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds>final Supplier<edu.wpi.first.math.geometry.Pose2d>final Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds>final DoubleSupplierfinal Supplier<edu.wpi.first.math.geometry.Rotation2d> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.wpilibj2.command.CommanddriveFieldRelativeCommand(Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds> chassisSpeeds) edu.wpi.first.wpilibj2.command.CommanddriveFromJoystickCommand(DoubleSupplier forward, DoubleSupplier strafe, DoubleSupplier rotation, BooleanSupplier fieldRelative) edu.wpi.first.wpilibj2.command.CommanddriveRobotRelativeCommand(Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds> chassisSpeeds) edu.wpi.first.wpilibj2.command.Commandedu.wpi.first.wpilibj.smartdashboard.SendableChooser<edu.wpi.first.wpilibj2.command.Command>edu.wpi.first.math.kinematics.ChassisSpeedsedu.wpi.first.math.geometry.Pose2dgetPose()edu.wpi.first.math.kinematics.ChassisSpeedsvoidperiodic()voidresetOdometry(edu.wpi.first.math.geometry.Pose2d pose) edu.wpi.first.wpilibj2.command.InstantCommandresetOdometryCommand(edu.wpi.first.math.geometry.Pose2d pose) no subsystem requirementMethods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Field Details
-
totalCurrentDraw
-
poseSupplier
-
robotRelativeSpeedsSupplier
-
fieldRelativeSpeedsSupplier
-
yawSupplier
-
-
Constructor Details
-
SwerveSubsystem
public SwerveSubsystem()
-
-
Method Details
-
driveFromJoystickCommand
public edu.wpi.first.wpilibj2.command.Command driveFromJoystickCommand(DoubleSupplier forward, DoubleSupplier strafe, DoubleSupplier rotation, BooleanSupplier fieldRelative) -
driveRobotRelativeCommand
public edu.wpi.first.wpilibj2.command.Command driveRobotRelativeCommand(Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds> chassisSpeeds) -
driveFieldRelativeCommand
public edu.wpi.first.wpilibj2.command.Command driveFieldRelativeCommand(Supplier<edu.wpi.first.math.kinematics.ChassisSpeeds> chassisSpeeds) -
driveXCommand
public edu.wpi.first.wpilibj2.command.Command driveXCommand() -
getRobotRelativeSpeeds
public edu.wpi.first.math.kinematics.ChassisSpeeds getRobotRelativeSpeeds() -
getFieldRelativeSpeeds
public edu.wpi.first.math.kinematics.ChassisSpeeds getFieldRelativeSpeeds() -
getPose
public edu.wpi.first.math.geometry.Pose2d getPose() -
resetOdometry
public void resetOdometry(edu.wpi.first.math.geometry.Pose2d pose) -
resetOdometryCommand
public edu.wpi.first.wpilibj2.command.InstantCommand resetOdometryCommand(edu.wpi.first.math.geometry.Pose2d pose) no subsystem requirement -
getAutoChooser
public edu.wpi.first.wpilibj.smartdashboard.SendableChooser<edu.wpi.first.wpilibj2.command.Command> getAutoChooser() -
periodic
public void periodic()
-