From a823aa7af79beda2c359a0c2184b55f942802346 Mon Sep 17 00:00:00 2001 From: brotherhobo Date: Sun, 21 Jul 2024 22:52:25 -0400 Subject: [PATCH] small misc changes --- .../pedroPathing/{localization/README.md => LOCALIZATION.md} | 2 +- .../ftc/teamcode/pedroPathing/examples/TeleOpEnhancements.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) rename TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/{localization/README.md => LOCALIZATION.md} (99%) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/README.md b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/LOCALIZATION.md similarity index 99% rename from TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/README.md rename to TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/LOCALIZATION.md index 0a1f6d2..28ef56d 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/localization/README.md +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/LOCALIZATION.md @@ -7,7 +7,7 @@ by Tyler Veness. However, the OTOS localizer uses its own onboard system for cal which I do not know about. ## Setting Your Localizer -Go to line `69` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)` +Go to line `70` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)` with the localizer that applies to you: * If you're using drive encoders, put `new DriveEncoderLocalizer(hardwareMap)` * If you're using two wheel odometry, put `new TwoWheelLocalizer(hardwareMap)` diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/examples/TeleOpEnhancements.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/examples/TeleOpEnhancements.java index 79a804f..1f0c2fc 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/examples/TeleOpEnhancements.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/examples/TeleOpEnhancements.java @@ -59,6 +59,8 @@ public class TeleOpEnhancements extends OpMode { public void loop() { driveVector.setOrthogonalComponents(-gamepad1.left_stick_y, -gamepad1.left_stick_x); driveVector.setMagnitude(MathFunctions.clamp(driveVector.getMagnitude(), 0, 1)); + + // TODO: if you want to make this field centric, then just remove this line driveVector.rotateVector(follower.getPose().getHeading()); headingVector.setComponents(-gamepad1.left_stick_x, follower.getPose().getHeading());