Package frc.robot.subsystems.DriveTrain
Class SwerveModuleRealIO
java.lang.Object
frc.robot.subsystems.DriveTrain.SwerveModule
frc.robot.subsystems.DriveTrain.SwerveModuleRealIO
-
Field Summary
Modifier and TypeFieldDescriptioncom.ctre.phoenix6.hardware.TalonFX
com.ctre.phoenix6.hardware.TalonFX
com.ctre.phoenix6.hardware.CANcoder
Fields inherited from class frc.robot.subsystems.DriveTrain.SwerveModule
angle_pid, target_state
-
Constructor Summary
-
Method Summary
Methods inherited from class frc.robot.subsystems.DriveTrain.SwerveModule
setState, update
-
Field Details
-
steer_motor
public com.ctre.phoenix6.hardware.TalonFX steer_motor -
drive_motor
public com.ctre.phoenix6.hardware.TalonFX drive_motor -
steer_sensor
public com.ctre.phoenix6.hardware.CANcoder steer_sensor
-
-
Constructor Details
-
SwerveModuleRealIO
public 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() -
setDrive
public void setDrive(double speedMetersPerSecond) -
setSteer
public void setSteer(double volts)
-