Package frc.robot.Subsystems.DriveTrain
Class SwerveModuleSimIO
java.lang.Object
frc.robot.Subsystems.DriveTrain.SwerveModule
frc.robot.Subsystems.DriveTrain.SwerveModuleSimIO
-
Field Summary
FieldsModifier and TypeFieldDescriptionedu.wpi.first.math.geometry.Rotation2ddoubleedu.wpi.first.math.controller.PIDControlleredu.wpi.first.math.controller.PIDControllerdoubleFields inherited from class frc.robot.Subsystems.DriveTrain.SwerveModule
acceleration_ff, target_state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.geometry.Rotation2dgetAngle()edu.wpi.first.math.kinematics.SwerveModulePositionprotected edu.wpi.first.math.kinematics.SwerveModuleStatedoubledoublegetSpeed()voidsetAngle(edu.wpi.first.math.geometry.Rotation2d angle) voidsetSpeed(double speed) voidupdate()Resends input to the motors.Methods inherited from class frc.robot.Subsystems.DriveTrain.SwerveModule
setState
-
Field Details
-
angle
public edu.wpi.first.math.geometry.Rotation2d angle -
speed
public double speed -
position
public double position -
sim_angle_pid
public edu.wpi.first.math.controller.PIDController sim_angle_pid -
sim_velocity_pid
public edu.wpi.first.math.controller.PIDController sim_velocity_pid
-
-
Constructor Details
-
SwerveModuleSimIO
protected SwerveModuleSimIO()
-
-
Method Details
-
setAngle
public void setAngle(edu.wpi.first.math.geometry.Rotation2d angle) - Specified by:
setAnglein classSwerveModule
-
setSpeed
public void setSpeed(double speed) - Specified by:
setSpeedin classSwerveModule
-
update
public void update()Description copied from class:SwerveModuleResends input to the motors.- Overrides:
updatein classSwerveModule
-
getAngle
public edu.wpi.first.math.geometry.Rotation2d getAngle() -
getSpeed
public double getSpeed() -
getPosition
public double getPosition() -
getModuleState
protected edu.wpi.first.math.kinematics.SwerveModuleState getModuleState() -
getModulePosition
public edu.wpi.first.math.kinematics.SwerveModulePosition getModulePosition()
-