Class SwerveDrivetrain
- java.lang.Object
 - 
- edu.wpi.first.wpilibj2.command.SubsystemBase
 - 
- com.lightningrobotics.common.subsystem.drivetrain.LightningDrivetrain
 - 
- com.lightningrobotics.common.subsystem.drivetrain.swerve.SwerveDrivetrain
 
 
 
 
- 
- All Implemented Interfaces:
 edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public abstract class SwerveDrivetrain extends LightningDrivetrain
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSwerveDrivetrain.Modules 
- 
Constructor Summary
Constructors Constructor Description SwerveDrivetrain(SwerveGains gains, SwerveModule... modules) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureMotors()DrivetrainStategetDriveState()LightningGainsgetGains()edu.wpi.first.math.geometry.Pose2dgetPose()voidsetDriveSpeed(DrivetrainSpeed speed)voidstop()protected voidwithEachAzimuthMotor(java.util.function.Consumer<edu.wpi.first.wpilibj.motorcontrol.MotorController> op)protected voidwithEachDriveMotor(java.util.function.Consumer<edu.wpi.first.wpilibj.motorcontrol.MotorController> op)protected voidwithEachModule(java.util.function.Consumer<SwerveModule> op)- 
Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
SwerveDrivetrain
public SwerveDrivetrain(SwerveGains gains, SwerveModule... modules)
 
 - 
 
- 
Method Detail
- 
configureMotors
public void configureMotors()
- Specified by:
 configureMotorsin classLightningDrivetrain
 
- 
setDriveSpeed
public void setDriveSpeed(DrivetrainSpeed speed)
- Specified by:
 setDriveSpeedin classLightningDrivetrain
 
- 
getPose
public edu.wpi.first.math.geometry.Pose2d getPose()
- Specified by:
 getPosein classLightningDrivetrain
 
- 
getDriveState
public DrivetrainState getDriveState()
- Specified by:
 getDriveStatein classLightningDrivetrain
 
- 
getGains
public LightningGains getGains()
- Specified by:
 getGainsin classLightningDrivetrain
 
- 
stop
public void stop()
- Specified by:
 stopin classLightningDrivetrain
 
- 
withEachModule
protected void withEachModule(java.util.function.Consumer<SwerveModule> op)
 
- 
withEachDriveMotor
protected void withEachDriveMotor(java.util.function.Consumer<edu.wpi.first.wpilibj.motorcontrol.MotorController> op)
 
- 
withEachAzimuthMotor
protected void withEachAzimuthMotor(java.util.function.Consumer<edu.wpi.first.wpilibj.motorcontrol.MotorController> op)
 
 - 
 
 -