Skip to content

Commit

Permalink
make swerve not chatter
Browse files Browse the repository at this point in the history
make swerve not chatter
  • Loading branch information
OakvilleDynamicsProgrammer committed Feb 29, 2024
1 parent f2873ee commit 71f19f5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/main/deploy/swerve/controllerproperties.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"angleJoystickRadiusDeadband": 0.25,
"angleJoystickRadiusDeadband": 0.05,
"heading": {
"p": 0.4,
"i": 0,
"d": 0.01
"d": 0
}
}
4 changes: 2 additions & 2 deletions src/main/deploy/swerve/modules/backleft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"location": {
"front": -13.5,
"left": 13.5
"front": -11,
"left": 11
},
"absoluteEncoderOffset": 276.15234375,
"drive": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/swerve/modules/backright.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"location": {
"front": -13.5,
"left": -13.5
"front": -11,
"left": -11
},
"absoluteEncoderOffset": 299.267578125,
"drive": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/swerve/modules/frontleft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"location": {
"front": 13.5,
"left": 13.5
"front": 11,
"left": 11
},
"absoluteEncoderOffset": 357.978515625,
"drive": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/swerve/modules/frontright.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"location": {
"front": 13.5,
"left": -13.5
"front": 11,
"left": -11
},
"absoluteEncoderOffset": 52.91015625,
"drive": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/physicalproperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"rampRate": {
"drive": 0.25,
"angle": 0.25
"angle": 0
}
}
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public RobotContainer() {
// Configure the trigger bindings
configureBindings();

AbsoluteDriveAdv closedAbsoluteDriveAdv =
final AbsoluteDriveAdv closedAbsoluteDriveAdv =
new AbsoluteDriveAdv(
drivebase,
() -> MathUtil.applyDeadband(driverXbox.getLeftY(), OperatorConstants.LEFT_Y_DEADBAND),
Expand Down Expand Up @@ -94,15 +94,15 @@ public RobotContainer() {
drivebase.driveCommand(
() -> MathUtil.applyDeadband(driverXbox.getLeftY(), OperatorConstants.LEFT_Y_DEADBAND),
() -> MathUtil.applyDeadband(driverXbox.getLeftX(), OperatorConstants.LEFT_X_DEADBAND),
() -> driverXbox.getRawAxis(2));
() -> driverXbox.getRightX() * 0.5);

Command driveFieldOrientedDirectAngleSim =
drivebase.simDriveCommand(
() -> MathUtil.applyDeadband(driverXbox.getLeftY(), OperatorConstants.LEFT_Y_DEADBAND),
() -> MathUtil.applyDeadband(driverXbox.getLeftX(), OperatorConstants.LEFT_X_DEADBAND),
() -> driverXbox.getRawAxis(2));

drivebase.setDefaultCommand(closedAbsoluteDriveAdv);
drivebase.setDefaultCommand(driveFieldOrientedAnglularVelocity);
}

/**
Expand Down

0 comments on commit 71f19f5

Please sign in to comment.