Skip to content

LimeLight branch closing#9

Merged
arnavjosh merged 14 commits into
Andrew-Statesfrom
LimeLight
Mar 3, 2026
Merged

LimeLight branch closing#9
arnavjosh merged 14 commits into
Andrew-Statesfrom
LimeLight

Conversation

@arnavjosh

Copy link
Copy Markdown
Member

Before issuing a pull request, please see the contributing page.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates LimeLight/localized aiming support by renaming and retuning the AprilTag aiming helper, wiring it into multiple TeleOp/test OpModes, and updating several Road Runner localization/tuning settings.

Changes:

  • Replaces AprilTagAimer usage with the new Aimer class and updates localized aiming telemetry/output.
  • Adjusts localization/tuning parameters (Pinpoint offsets/directions, mecanum model params) and tightens AntiDefense heading tolerance.
  • Re-enables Road Runner tuning opmode registration in TuningOpModes.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing/LocalizedAimingTester.java Switches to Aimer, updates pose estimate updates, and expands aiming telemetry (incl. bearing).
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing/DistanceRegressionTeleOp.java Switches from AprilTagAimer to Aimer.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing/AprilTagTester.java Switches from AprilTagAimer to Aimer and removes unused imports.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/teleop/BotPeriodics.java Switches stored aimer type from AprilTagAimer to Aimer.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/limelight/Aimer.java Renames/retunes the aiming helper and changes localized turn power return payload (adds bearing).
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/AntiDefense.java Adds angle clamping and tightens angular tolerance.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/utils/Hardware.java Switches stored aimer type from AprilTagAimer to Aimer.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/utils/BotActions.java Switches stored aimer type from AprilTagAimer to Aimer and cleans imports.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/roadrunner/tuning/TuningOpModes.java Uncomments opmode registrar (tuning opmodes now register when DISABLED=false).
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/roadrunner/miscRR/PinpointLocalizer.java Updates encoder offsets and reverses encoder directions.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/roadrunner/miscRR/MecanumDrive.java Updates drive constants and changes IMU/lazyImu field handling.
Comments suppressed due to low confidence (2)

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/limelight/Aimer.java:63

  • angleWrapDegrees uses Java’s % on potentially unbounded angles (your comment notes heading.toDouble() isn’t clamped). For large negative angles, (angle + 180) % 360 - 180 can return values outside [-180, 180] (e.g., -720° becomes -360°), which will break the aiming correction. Consider using a wrap implementation that handles negative values correctly (e.g., Math.floorMod or a double-mod pattern).
    TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/roadrunner/tuning/TuningOpModes.java:130
  • This PR uncomments the @OpModeRegistrar register(...) method, and DISABLED is false, so all Road Runner tuning op modes will now be registered on the robot. If this wasn’t intended for competition builds, consider setting DISABLED = true (or restoring the comment/guarding with a build flag) to avoid cluttering the op mode list and accidentally running tuners on-field.
    @OpModeRegistrar
    public static void register(OpModeManager manager) {
        if (DISABLED) return;


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI commented Mar 3, 2026

Copy link
Copy Markdown

@arnavjosh I've opened a new pull request, #10, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (3)

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/roadrunner/tuning/TuningOpModes.java:130

  • This change effectively uncomments the @OpModeRegistrar register(...) method while DISABLED is set to false, which will register all tuning opmodes on the Driver Station. If these are not intended to ship in this branch, set DISABLED = true (or re-comment the block) so the opmode list isn’t polluted in competition builds.

    @OpModeRegistrar
    public static void register(OpModeManager manager) {
        if (DISABLED) return;

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/limelight/Aimer.java:37

  • HardwareMap hardwareMap is accepted by Aimer's constructor but never used. If Aimer doesn’t need hardware access, drop the parameter to avoid implying side effects/required initialization; otherwise, use it (or at least annotate/suppress) so unused-parameter warnings don’t get ignored broadly.
    TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/limelight/Aimer.java:63
  • angleWrapDegrees uses the % operator, which in Java keeps the sign of the dividend. For negative inputs this can return values outside [-180, 180] (e.g., -200 stays -200), which will produce incorrect turn corrections near wrap boundaries. Consider using Math.floorMod (or a double-safe equivalent) to properly wrap degrees into [-180, 180] before feeding the PID and returning bearing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arnavjosh arnavjosh merged commit 5ec71ac into Andrew-States Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants