Package swervelib.math
Class SwerveModuleState2
java.lang.Object
edu.wpi.first.math.kinematics.SwerveModuleState
swervelib.math.SwerveModuleState2
- All Implemented Interfaces:
Comparable<edu.wpi.first.math.kinematics.SwerveModuleState>
public class SwerveModuleState2
extends edu.wpi.first.math.kinematics.SwerveModuleState
Second order kinematics swerve module state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionedu.wpi.first.math.geometry.Rotation2dSwerve module angle as aRotation2d.doubleRad per secdoubleSwerve module speed in meters per second. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a SwerveModuleState with zeros for speed and angle.SwerveModuleState2(double speedMetersPerSecond, edu.wpi.first.math.geometry.Rotation2d angle, double omegaRadPerSecond) Constructs a SwerveModuleState. -
Method Summary
Methods inherited from class edu.wpi.first.math.kinematics.SwerveModuleState
compareTo, equals, hashCode, optimize, toString
-
Field Details
-
speedMetersPerSecond
public double speedMetersPerSecondSwerve module speed in meters per second. -
omegaRadPerSecond
public double omegaRadPerSecondRad per sec -
angle
public edu.wpi.first.math.geometry.Rotation2d angleSwerve module angle as aRotation2d.
-
-
Constructor Details
-
SwerveModuleState2
public SwerveModuleState2()Constructs a SwerveModuleState with zeros for speed and angle. -
SwerveModuleState2
public SwerveModuleState2(double speedMetersPerSecond, edu.wpi.first.math.geometry.Rotation2d angle, double omegaRadPerSecond) Constructs a SwerveModuleState.- Parameters:
speedMetersPerSecond- The speed of the wheel of the module.angle- The angle of the module.omegaRadPerSecond- The angular velocity of the module.
-