Skip to content
This repository was archived by the owner on May 19, 2024. It is now read-only.

Commit 308a0ef

Browse files
committed
fix(swerve): Change rotation velocity back to radians.
1 parent 5eea860 commit 308a0ef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: src/main/java/frc/robot/swerve/DriveCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ private ChassisSpeeds clampChassisSpeeds(ChassisSpeeds desiredChassisSpeeds) {
9090
double vyMetersPerSecond =
9191
yAccelerationLimiter.calculate(desiredChassisSpeeds.vyMetersPerSecond);
9292
double omegaRadiansPerSecond =
93-
rotationVelocityClamper.apply(
94-
Units.radiansToRotations(desiredChassisSpeeds.omegaRadiansPerSecond));
93+
Units.rotationsToRadians(rotationVelocityClamper.apply(
94+
Units.radiansToRotations(desiredChassisSpeeds.omegaRadiansPerSecond)));
9595

9696
return new ChassisSpeeds(vxMetersPerSecond, vyMetersPerSecond, omegaRadiansPerSecond);
9797
}

Diff for: src/main/java/frc/robot/swerve/Swerve.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ public class Swerve extends Subsystem {
3434
.withMaximumAcceleration(18); // meters per second per second
3535

3636
/** Rotation motion profile config. */
37+
// TODO Verify
3738
private final MotionProfileConfig rotationMotionProfileConfig =
38-
new MotionProfileConfig().withMaximumVelocity(0.25); // rotations per second
39+
new MotionProfileConfig().withMaximumVelocity(1); // rotations per second
3940

4041
/** Initializes the swerve subsystem and configures swerve hardware. */
4142
private Swerve() {

0 commit comments

Comments
 (0)