From 0c14630d40f2cf8b715e46dfc78c54350be42b78 Mon Sep 17 00:00:00 2001 From: Ryan Brott Date: Wed, 19 Jul 2023 23:13:58 -0700 Subject: [PATCH] Bump RR --- TeamCode/build.gradle | 4 +- .../ftc/teamcode/MecanumDrive.java | 71 +++++++++---------- .../firstinspires/ftc/teamcode/TankDrive.java | 68 +++++++++--------- .../ftc/teamcode/ThreeDeadWheelLocalizer.java | 8 +-- .../ftc/teamcode/TwoDeadWheelLocalizer.java | 8 +-- .../ftc/teamcode/tuning/DriveView.java | 4 +- .../teamcode/tuning/ForwardRampLogger.java | 2 +- .../ftc/teamcode/tuning/LocalizationTest.java | 17 ++--- .../tuning/ManualFeedforwardTuner.java | 5 +- .../ftc/teamcode/util/Localizer.java | 4 +- .../ftc/teamcode/util/LogFiles.java | 12 ++-- .../ftc/teamcode/util/Paths.java | 4 +- 12 files changed, 105 insertions(+), 102 deletions(-) diff --git a/TeamCode/build.gradle b/TeamCode/build.gradle index ac72b746b0..dd806f291d 100644 --- a/TeamCode/build.gradle +++ b/TeamCode/build.gradle @@ -34,8 +34,8 @@ dependencies { annotationProcessor files('lib/OpModeAnnotationProcessor.jar') implementation 'com.acmerobotics.dashboard:dashboard:0.4.9' - implementation 'com.acmerobotics.roadrunner:core:1.0.0-beta1' - implementation 'com.acmerobotics.roadrunner:actions:1.0.0-beta1' + implementation 'com.acmerobotics.roadrunner:core:1.0.0-beta2' + implementation 'com.acmerobotics.roadrunner:actions:1.0.0-beta2' implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.7' } diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java index 27e0c19f2b..6a8009f1d9 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java @@ -20,9 +20,7 @@ import com.acmerobotics.roadrunner.TimeTurn; import com.acmerobotics.roadrunner.TrajectoryActionBuilder; import com.acmerobotics.roadrunner.TurnConstraints; -import com.acmerobotics.roadrunner.Twist2d; import com.acmerobotics.roadrunner.Twist2dDual; -import com.acmerobotics.roadrunner.Twist2dIncrDual; import com.acmerobotics.roadrunner.Vector2d; import com.acmerobotics.roadrunner.VelConstraint; import com.qualcomm.hardware.lynx.LynxModule; @@ -51,6 +49,7 @@ public final class MecanumDrive { // drive model parameters public static double IN_PER_TICK = 0; public static double LATERAL_IN_PER_TICK = 1; + public static double LATERAL_MULTIPLIER = IN_PER_TICK / LATERAL_IN_PER_TICK; public static double TRACK_WIDTH_TICKS = 0; // feedforward parameters in tick units @@ -77,8 +76,7 @@ public final class MecanumDrive { public static double HEADING_VEL_GAIN = 0.0; // shared with turn public final MecanumKinematics kinematics = new MecanumKinematics( - IN_PER_TICK * TRACK_WIDTH_TICKS, - IN_PER_TICK / LATERAL_IN_PER_TICK); + IN_PER_TICK * TRACK_WIDTH_TICKS, LATERAL_MULTIPLIER); public final MotorFeedforward feedforward = new MotorFeedforward(kS, kV / IN_PER_TICK, kA / IN_PER_TICK); @@ -126,7 +124,7 @@ public DriveLocalizer() { } @Override - public Twist2dIncrDual