Uses of Class
frc.robot.subsystems.swervedrive.swerve.kinematics.SwerveModuleState2
-
Packages that use SwerveModuleState2 Package Description frc.robot.subsystems.swervedrive.swerve frc.robot.subsystems.swervedrive.swerve.kinematics -
-
Uses of SwerveModuleState2 in frc.robot.subsystems.swervedrive.swerve
Methods in frc.robot.subsystems.swervedrive.swerve that return SwerveModuleState2 Modifier and Type Method Description SwerveModuleState2SwerveModule. getState()Get the module state.SwerveModuleState2[]SwerveDrive. getStates()Get current swerve module states in order.Methods in frc.robot.subsystems.swervedrive.swerve with parameters of type SwerveModuleState2 Modifier and Type Method Description voidSwerveDrive. setModuleStates(SwerveModuleState2[] states)Set the swerve module states given an array of states.voidSwerveModule. setState(SwerveModuleState2 state)Set the module speed and angle based off the module state. -
Uses of SwerveModuleState2 in frc.robot.subsystems.swervedrive.swerve.kinematics
Fields in frc.robot.subsystems.swervedrive.swerve.kinematics declared as SwerveModuleState2 Modifier and Type Field Description private SwerveModuleState2[]SwerveDriveKinematics2. m_moduleStatesMethods in frc.robot.subsystems.swervedrive.swerve.kinematics that return SwerveModuleState2 Modifier and Type Method Description static SwerveModuleState2SwerveModuleState2. optimize(SwerveModuleState2 desiredState, edu.wpi.first.math.geometry.Rotation2d currentAngle)Minimize the change in heading the desired swerve module state would require by potentially reversing the direction the wheel spins.SwerveModuleState2[]SwerveDriveKinematics2. toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds)Performs inverse kinematics.SwerveModuleState2[]SwerveDriveKinematics2. toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds, edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters)Performs inverse kinematics to return the module states from a desired chassis velocity.Methods in frc.robot.subsystems.swervedrive.swerve.kinematics with parameters of type SwerveModuleState2 Modifier and Type Method Description static voidSwerveDriveKinematics2. desaturateWheelSpeeds(SwerveModuleState2[] moduleStates, double attainableMaxSpeedMetersPerSecond)Renormalizes the wheel speeds if any individual speed is above the specified maximum.static voidSwerveDriveKinematics2. desaturateWheelSpeeds(SwerveModuleState2[] moduleStates, edu.wpi.first.math.kinematics.ChassisSpeeds currentChassisSpeed, double attainableMaxModuleSpeedMetersPerSecond, double attainableMaxTranslationalSpeedMetersPerSecond, double attainableMaxRotationalVelocityRadiansPerSecond)Renormalizes the wheel speeds if any individual speed is above the specified maximum, as well as getting rid of joystick saturation at edges of joystick.static SwerveModuleState2SwerveModuleState2. optimize(SwerveModuleState2 desiredState, edu.wpi.first.math.geometry.Rotation2d currentAngle)Minimize the change in heading the desired swerve module state would require by potentially reversing the direction the wheel spins.edu.wpi.first.math.kinematics.ChassisSpeedsSwerveDriveKinematics2. toChassisSpeeds(SwerveModuleState2... wheelStates)Performs forward kinematics to return the resulting chassis state from the given module states.
-