Swerve Drive Kinematics
import com.seattlesolvers.solverslib.kinematics.wpilibkinematics.SwerveDriveKinematics
The SwerveModuleState Class
SwerveModuleState ClassConstructing the Kinematics Object
// Locations for the swerve drive modules
// relative to the robot center.
Translation2d m_frontLeftLocation =
new Translation2d(0.381, 0.381);
Translation2d m_frontRightLocation =
new Translation2d(0.381, -0.381);
Translation2d m_backLeftLocation =
new Translation2d(-0.381, 0.381);
Translation2d m_backRightLocation =
new Translation2d(-0.381, -0.381);
// Creating my kinematics object using the module locations
SwerveDriveKinematics m_kinematics = new SwerveDriveKinematics
(
m_frontLeftLocation, m_frontRightLocation,
m_backLeftLocation, m_backRightLocation
);