Skip to content

DE updates#98

Merged
Orcasphynx merged 1 commit into
developmentfrom
testing/April26
Apr 27, 2026
Merged

DE updates#98
Orcasphynx merged 1 commit into
developmentfrom
testing/April26

Conversation

@Orcasphynx
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions
Copy link
Copy Markdown

AI Code Review

Hello team!

Great work on these updates, especially with the autonomous paths and the improvements to the lemon hunter subsystem! It's clear a lot of thought is going into making the robot's autonomous behaviors more robust and its vision processing more reliable.

Positive Highlights

  • Robust LemonHunterSubsystem: I really appreciate the added if (lemonList.isEmpty()) check in the LemonHunterSubsystem. This is a fantastic improvement for robustness, preventing potential NullPointerExceptions when no lemons are detected and ensuring the Field2d display reflects the current state accurately.
  • Clear Autonomous Pathing: The new "Back Up" paths and the adjustments to the existing "Delayed Swipe" and "Side Wall" paths demonstrate a thoughtful approach to autonomous command composition. It's great to see these complex sequences being built out with PathPlanner.
  • Consistent Logging: The continued use of @Logged annotations throughout the RobotContainer and LemonHunterSubsystem is excellent for debugging and analysis, aligning well with our AdvantageKit logging practices.

Suggestions

FRC/WPILib Best Practices

  • RobotContainer.java - Intake Command Behavior (Line 214)
    • Suggestion: Currently, the driverJoystick.rightBumper().onTrue(intake.collectCommand()); binding starts the collectCommand when the button is pressed. Previously, releasing the button would explicitly stop the roller. If intake.collectCommand() is a command that runs indefinitely (like run(() -> ...)) or completes quickly, the roller might continue spinning after the button is released, or stop immediately depending on its implementation.
    • Why it matters: It's helpful to be explicit about the desired state when a button is released, especially for mechanisms like the intake.
    • Recommendation:
      • If the intent is for the intake to run only while the button is held, consider changing onTrue to whileTrue:
        driverJoystick.rightBumper()
            .whileTrue(intake.collectCommand());
      • If collectCommand() is designed to start an action that should continue until another command interrupts it, and you do not want it to stop on button release, then the current onTrue is fine, but it's good to confirm the intent.

Code Quality & Readability

  • RobotContainer.java - PDH Subsystem (Line 42 & 73)

    • Suggestion: I noticed the PDHSubsystem import and instance variable are commented out.
    • Why it matters: Keeping commented-out code can sometimes make the codebase harder to read and maintain, as it's unclear if it's temporary or permanently removed.
    • Recommendation: If the PDHSubsystem is no longer needed or has been fully refactored and replaced, consider removing the commented-out lines completely. If it's a temporary disablement, perhaps a brief comment explaining why it's commented out would be helpful.
  • LemonHunterSubsystem.java - Typo in Field2d Object Name (Line 98)

    • Suggestion: There's a small typo in one of the Field2d object names:
      lemonField.getObject("Cluser Centroid Position").setPose(new Pose2d(0, 0, new Rotation2d()));
      It should likely be "Cluster Centroid Position".
    • Why it matters: Consistent naming helps with clarity and debugging, especially when viewing data on the SmartDashboard.
    • Recommendation: Correct "Cluser" to "Cluster".

Questions

  • For the Delayed Swipe Start - LEFT.path file, I noticed useDefaultConstraints was changed from true to false. Was this an intentional change to allow for custom constraints to be applied to that specific path, and if so, are those custom constraints defined elsewhere or are the global constraints now being explicitly used?

Keep up the fantastic work on the robot! These continuous improvements are what make our robot great.


This review was automatically generated by AI. Please use your judgment and feel free to discuss any suggestions!

@github-actions
Copy link
Copy Markdown

✓ Build successful and code formatting check passed!

@Orcasphynx Orcasphynx merged commit 764ad25 into development Apr 27, 2026
2 checks passed
@Orcasphynx Orcasphynx deleted the testing/April26 branch April 27, 2026 22:55
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.

1 participant