Skip to content

Commit

Permalink
add feedforward to swerve steer
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Mar 9, 2024
1 parent 1839cd7 commit 498a575
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public static class SwerveConstants {
public double STEER_kP;
public double STEER_kI;
public double STEER_kD;
public double STEER_kS;
public double STEER_kV;
public double STEER_kA;

public double DRIVE_GEARING;
public double STEER_GEARING;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ public KrakenCoaxialSwerveModule(
steerConfig.Slot0.kP = SWERVE_CONSTANTS.STEER_kP;
steerConfig.Slot0.kI = SWERVE_CONSTANTS.STEER_kI;
steerConfig.Slot0.kD = SWERVE_CONSTANTS.STEER_kD;
steerConfig.Slot0.kS = SWERVE_CONSTANTS.STEER_kS;
steerConfig.Slot0.kV = SWERVE_CONSTANTS.STEER_kV;
steerConfig.Slot0.kA = SWERVE_CONSTANTS.STEER_kA;
steerConfig.MotionMagic.MotionMagicCruiseVelocity = SWERVE_CONSTANTS.MAX_STEER_VELOCITY_RADIANS_PER_SECOND
/ (2 * Math.PI);
steerConfig.MotionMagic.MotionMagicAcceleration = SWERVE_CONSTANTS.MAX_STEER_ACCELERATION_RADIANS_PER_SECOND_SQUARED
Expand Down

0 comments on commit 498a575

Please sign in to comment.