Package frc.robot.Subsystems.DriveTrain
Class SwerveModuleRealIO
java.lang.Object
frc.robot.Subsystems.DriveTrain.SwerveModule
frc.robot.Subsystems.DriveTrain.SwerveModuleRealIO
-
Field Summary
Fields inherited from class frc.robot.Subsystems.DriveTrain.SwerveModule
acceleration_ff, target_state -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSwerveModuleRealIO(int drive_port, int steer_port, int sensor_port) -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.geometry.Rotation2dgetAngle()edu.wpi.first.math.kinematics.SwerveModulePositionedu.wpi.first.math.kinematics.SwerveModuleStatedoubledoublegetSpeed()List<com.ctre.phoenix6.hardware.TalonFX>protected voidsetAngle(edu.wpi.first.math.geometry.Rotation2d angle) protected voidsetSpeed(double speed) Methods inherited from class frc.robot.Subsystems.DriveTrain.SwerveModule
setState, update
-
Constructor Details
-
SwerveModuleRealIO
protected SwerveModuleRealIO(int drive_port, int steer_port, int sensor_port)
-
-
Method Details
-
getSpeed
public double getSpeed() -
getPosition
public double getPosition() -
getAngle
public edu.wpi.first.math.geometry.Rotation2d getAngle() -
getModuleState
public edu.wpi.first.math.kinematics.SwerveModuleState getModuleState() -
getModulePosition
public edu.wpi.first.math.kinematics.SwerveModulePosition getModulePosition() -
setSpeed
protected void setSpeed(double speed) - Specified by:
setSpeedin classSwerveModule
-
setAngle
protected void setAngle(edu.wpi.first.math.geometry.Rotation2d angle) - Specified by:
setAnglein classSwerveModule
-
getTalons
-