Skip to content

Commit 5c84bf2

Browse files
committed
change in constants for more realistic simulations.
1 parent 3e9211b commit 5c84bf2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/main/java/frc/robot/Constants.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ public static final class DriveConstants {
5757
public static final double kI = 0.0;
5858
public static final double kD = 0;
5959
public static final double kS = 0;
60-
public static final double kV = 0.11;
61-
public static final double kA = 0.009;
60+
// public static final double kV = 0.11;
61+
// public static final double kA = 0.009;
62+
public static final double kV = 0.11 * 1 / 5;
63+
public static final double kA = 0.0001;
6264

6365
public static final double kTeleopMaxVoltage = 12;
6466
public static final double kTeleopMaxTurnVoltage = 7.2;

src/main/java/frc/robot/SwerveModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public SwerveModule(int canId, int drivePort, int steerPort) {
5757
LinearSystemId.createDCMotorSystem(kV / (2 * Math.PI), kA / (2 * Math.PI)),
5858
DCMotor.getKrakenX60(1).withReduction(kGearRatio));
5959
m_steerMotorModel = new DCMotorSim(
60-
LinearSystemId.createDCMotorSystem(kV / (2 * Math.PI), 0.0001 / (2 * Math.PI)),
60+
LinearSystemId.createDCMotorSystem(kV / (2 * Math.PI), kA / (2 * Math.PI)),
6161
DCMotor.getKrakenX60(1));
6262
} else {
6363
m_driveMotorModel = null;

src/main/java/frc/robot/subsystems/DriveSubsystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ public void setModuleAngles(double angle) {
292292
* @return a {@code Command} for testing this {@code DriveSubsystem}
293293
*/
294294
public Command testCommand() {
295-
double speed = .8;
296-
double rotionalSpeed = Math.toRadians(40);
295+
double speed = .5;
296+
double rotionalSpeed = Math.toRadians(45);
297297
double duration = 2.0;
298298
return run(() -> setModuleAngles(0)).withTimeout(1)
299299
.andThen(run(() -> drive(speed, 0, 0, false)).withTimeout(duration))

0 commit comments

Comments
 (0)