From b442008fb6607858aa5c6aba9407dd572c77937d Mon Sep 17 00:00:00 2001 From: Carlos Rivas Date: Wed, 30 Oct 2024 12:54:51 -0700 Subject: [PATCH] Updating localizer/tuning values for Bobito --- .../org/firstinspires/ftc/teamcode/PedroConstants.java | 10 +++++----- .../localization/localizers/DriveEncoderLocalizer.java | 4 ++-- .../pedroPathing/tuning/FollowerConstants.java | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/PedroConstants.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/PedroConstants.java index fda3f04..6ede460 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/PedroConstants.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/PedroConstants.java @@ -37,21 +37,21 @@ public class PedroConstants { public static final double ROBOT_WEIGHT_IN_KG = 5.15; // Maximum velocity of the robot going forward - public static final double ROBOT_SPEED_FORWARD = 57.1750; + public static final double ROBOT_SPEED_FORWARD = 66.6117; // Maximum velocity of the robot going right - public static final double ROBOT_SPEED_LATERAL = 52.775; + public static final double ROBOT_SPEED_LATERAL = 60.0671; // Rate of deceleration when power is cut-off when the robot is moving forward - public static final double FORWARD_ZERO_POWER_ACCEL = -68.235; + public static final double FORWARD_ZERO_POWER_ACCEL = -71.154; // Rate of deceleration when power is cut-off when the robot is moving to the right - public static final double LATERAL_ZERO_POWER_ACCEL = -111.025; + public static final double LATERAL_ZERO_POWER_ACCEL = -109.5358; // Determines how fast your robot will decelerate as a factor of how fast your robot will coast to a stop public static final double ZERO_POWER_ACCEL_MULT = 4.0; /* Centripetal force correction - increase if robot is correcting into the path - decrease if robot is correcting away from the path */ - public static final double CENTRIPETAL_SCALING = 0.0004; + public static final double CENTRIPETAL_SCALING = 0.0005; } diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/localizers/DriveEncoderLocalizer.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/localizers/DriveEncoderLocalizer.java index 7de4983..558904d 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/localizers/DriveEncoderLocalizer.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/localizers/DriveEncoderLocalizer.java @@ -48,8 +48,8 @@ public class DriveEncoderLocalizer extends Localizer { private final Encoder rightRear; private double totalHeading; public static double FORWARD_TICKS_TO_INCHES = -0.0058; - public static double STRAFE_TICKS_TO_INCHES = -0.0057; - public static double TURN_TICKS_TO_RADIANS = -0.0008675; + public static double STRAFE_TICKS_TO_INCHES = -0.0326; + public static double TURN_TICKS_TO_RADIANS = -0.0009; public static double ROBOT_WIDTH = 1; public static double ROBOT_LENGTH = 1; diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/tuning/FollowerConstants.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/tuning/FollowerConstants.java index 7d01fca..4830913 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/tuning/FollowerConstants.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/tuning/FollowerConstants.java @@ -42,7 +42,7 @@ public class FollowerConstants { public static CustomPIDFCoefficients translationalPIDFCoefficients = new CustomPIDFCoefficients( 0.1, 0, - 0.01, + 0, 0); // Translational Integral @@ -60,7 +60,7 @@ public class FollowerConstants { public static CustomPIDFCoefficients headingPIDFCoefficients = new CustomPIDFCoefficients( 1, 0, - .1, + 0, 0); // Feed forward constant added on to the heading PIDF @@ -69,10 +69,10 @@ public class FollowerConstants { // Drive PIDF coefficients public static CustomFilteredPIDFCoefficients drivePIDFCoefficients = new CustomFilteredPIDFCoefficients( - 0.006, + 0.025, 0, 0.00001, - 0.8, + 0.6, 0); // Feed forward constant added on to the drive PIDF