Skip to content

Commit 0e27e13

Browse files
update calculateWithVelocities
1 parent 193cd3f commit 0e27e13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/carlmontrobotics/lib199/swerve/SwerveModule.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ public void drivePeriodic() {
195195
double actualSpeed = getCurrentSpeed();
196196
double targetVoltage = (actualSpeed >= 0 ? forwardSimpleMotorFF : backwardSimpleMotorFF)
197197
.calculateWithVelocities(
198-
desiredSpeed,
199-
desiredSpeed+calculateAntiGravitationalA(pitchDegSupplier.get(), rollDegSupplier.get())
198+
actualSpeed,
199+
desiredSpeed
200200
);//clippedAcceleration);
201+
//calculateAntiGravitationalA(pitchDegSupplier.get(), rollDegSupplier.get())
201202

202203
// Use robot characterization as a simple physical model to account for internal resistance, frcition, etc.
203204
// Add a PID adjustment for error correction (also "drives" the actual speed to the desired speed)

0 commit comments

Comments
 (0)