Package swervelib.parser
Class SwerveDriveConfiguration
java.lang.Object
swervelib.parser.SwerveDriveConfiguration
Swerve drive configurations used during SwerveDrive construction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionSwerve IMUbooleanInvert the imu measurements.doubleMax speed in meters per second.intNumber of modules on the robot.edu.wpi.first.math.geometry.Translation2d[]Swerve Module locations.Swerve Modules. -
Constructor Summary
ConstructorsConstructorDescriptionSwerveDriveConfiguration(SwerveModuleConfiguration[] moduleConfigs, SwerveIMU swerveIMU, double maxSpeed, boolean invertedIMU) Create swerve drive configuration. -
Method Summary
Modifier and TypeMethodDescriptioncreateModules(SwerveModuleConfiguration[] swerves) Create modules based off of the SwerveModuleConfiguration.
-
Field Details
-
moduleLocationsMeters
public edu.wpi.first.math.geometry.Translation2d[] moduleLocationsMetersSwerve Module locations. -
imu
Swerve IMU -
invertedIMU
public boolean invertedIMUInvert the imu measurements. -
maxSpeed
public double maxSpeedMax speed in meters per second. -
moduleCount
public int moduleCountNumber of modules on the robot. -
modules
Swerve Modules.
-
-
Constructor Details
-
SwerveDriveConfiguration
public SwerveDriveConfiguration(SwerveModuleConfiguration[] moduleConfigs, SwerveIMU swerveIMU, double maxSpeed, boolean invertedIMU) Create swerve drive configuration.- Parameters:
moduleConfigs- Module configuration.swerveIMU- Swerve IMU.maxSpeed- Max speed of the robot in meters per second.invertedIMU- Invert the IMU.
-
-
Method Details
-
createModules
Create modules based off of the SwerveModuleConfiguration.- Parameters:
swerves- Swerve constants.- Returns:
- Swerve Modules.
-