From d8f15ccdb0b26f150faf350ceb7e88073dc7e89f Mon Sep 17 00:00:00 2001 From: Aarav Shah Date: Sat, 29 Feb 2020 16:01:39 -0700 Subject: [PATCH] Tuned Motion Magic Gains pretty well --- src/main/java/frc4388/robot/Constants.java | 6 +++--- src/main/java/frc4388/robot/RobotContainer.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc4388/robot/Constants.java b/src/main/java/frc4388/robot/Constants.java index fd1e83d..1f4cf3a 100644 --- a/src/main/java/frc4388/robot/Constants.java +++ b/src/main/java/frc4388/robot/Constants.java @@ -54,9 +54,9 @@ public final class Constants { public static final Gains DRIVE_DISTANCE_GAINS_LOW = new Gains(0.1, 0.0, 1.0, 0.0, 0, 0.5); public static final Gains DRIVE_VELOCITY_GAINS_LOW = new Gains(0.1, 0.0, 0.2, 0.025, 0, 1.0); public static final Gains DRIVE_TURNING_GAINS_LOW = new Gains(0.5, 0.0, 0.0, 0.0, 0, 0.55); - public static final Gains DRIVE_MOTION_MAGIC_GAINS_LOW = new Gains(0.1, 0.0, 0.2, 0.05, 0, 1.0); - public static final int DRIVE_CRUISE_VELOCITY = 25000; - public static final int DRIVE_ACCELERATION = 21000; + public static final Gains DRIVE_MOTION_MAGIC_GAINS_LOW = new Gains(0.1, 0.0, 0, 0.025, 0, 1.0); + public static final int DRIVE_CRUISE_VELOCITY = 30000; + public static final int DRIVE_ACCELERATION = 23000; public static final Gains DRIVE_DISTANCE_GAINS_HIGH = new Gains(0.0, 0.0, 0.0, 0.0, 0, 0.5); public static final Gains DRIVE_VELOCITY_GAINS_HIGH = new Gains(0.0, 0.0, 0.0, 0.0, 0, 1.0); diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index bdae26e..4bd17d4 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -119,7 +119,7 @@ public class RobotContainer { /* Test Buttons */ // A driver test button new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) - .whenPressed(new DriveStraightToPositionMM(m_robotDrive, 24)); + .whenPressed(new DriveStraightToPositionMM(m_robotDrive, 12)); // B driver test button new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON) @@ -191,8 +191,8 @@ public class RobotContainer { RamseteCommand ramseteCommand = getRamseteCommand(trajectory); // Run path following command, then stop at the end. //return ramseteCommand.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0)); - //return new AutoPath1FromCenter(m_robotDrive); - return new AutoPath2FromRight(m_robotDrive); + return new AutoPath1FromCenter(m_robotDrive); + //return new AutoPath2FromRight(m_robotDrive); } TrajectoryConfig getTrajectoryConfig() {