Skip to content

V2#84

Open
Murat65536 wants to merge 60 commits into
mainfrom
new-robot
Open

V2#84
Murat65536 wants to merge 60 commits into
mainfrom
new-robot

Conversation

@Murat65536
Copy link
Copy Markdown
Contributor

@Murat65536 Murat65536 commented Apr 9, 2026

Pull Request

Closes #83


Issue Number

Comments

@Murat65536 Murat65536 marked this pull request as ready for review April 19, 2026 12:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 multiple robot subsystems and command flows to a “V2” hardware/software layout, including a redesigned shooter (4 motors + SysId), a new motor-driven shooter hood, and a new HopperExtension mechanism, with corresponding updates across commands, operator/driver bindings, and autonomous routines.

Changes:

  • Replaces the old dual “ShooterHoods” (servo hub) implementation with a single motor-driven ShooterHood subsystem and updates commands/dashboard bindings accordingly.
  • Refactors Shooter to a 4-motor SparkMax setup and adds SysId characterization hooks plus a new ShooterSysID auton.
  • Introduces HopperExtension + command, removes AcquisitionPivot (and its commands/constants), and updates autos + joystick bindings.

Reviewed changes

Copilot reviewed 38 out of 41 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/main/java/frc/robot/subsystems/SwagLights.java Makes SerialPort field final.
src/main/java/frc/robot/subsystems/ShooterHoods.java Removes legacy servo-hub-based hood subsystem.
src/main/java/frc/robot/subsystems/ShooterHood.java Adds new motor-driven shooter hood subsystem (SparkMax + absolute encoder).
src/main/java/frc/robot/subsystems/Shooter.java Refactors shooter to 4 SparkMax motors, adds SysId routine helpers, updates distance/angle math.
src/main/java/frc/robot/subsystems/Kicker.java Refactors kicker into two SparkFlex motors (kicker + feeder) with separate controllers.
src/main/java/frc/robot/subsystems/Indexer.java Switches indexer motor controller to SparkFlex and renames forward/reverse actions.
src/main/java/frc/robot/subsystems/HopperExtension.java Adds new hopper extension subsystem with limit switches and closed-loop control.
src/main/java/frc/robot/subsystems/Dashboard.java Updates shooter hood constants reference; removes acquisition tilt dashboard value.
src/main/java/frc/robot/subsystems/AcquisitionPivot.java Removes legacy acquisition pivot subsystem.
src/main/java/frc/robot/subsystems/Acquisition.java Changes acquisition from duty-cycle control to velocity control with configured PID/FF.
src/main/java/frc/robot/constants/ShooterHoodsConstants.java Removes old servo hood constants.
src/main/java/frc/robot/constants/ShooterHoodConstants.java Adds new shooter hood constants (CAN IDs, limits, PID/FF placeholders).
src/main/java/frc/robot/constants/ShooterConstants.java Updates shooter motor CAN IDs and replaces module translation constants with barrel center offset.
src/main/java/frc/robot/constants/KickerConstants.java Splits constants for kicker vs feeder motor/controllers and adds feeder RPMs.
src/main/java/frc/robot/constants/IndexerConstants.java Updates CAN ID and replaces duty-cycle constants with forward/backward power.
src/main/java/frc/robot/constants/HopperExtensionConstants.java Adds new constants for hopper extension control.
src/main/java/frc/robot/constants/AcquisitionPivotConstants.java Removes legacy pivot constants.
src/main/java/frc/robot/constants/AcquisitionConstants.java Updates CAN ID and adds PID/FF + RPM setpoints for velocity control.
src/main/java/frc/robot/commands/ShootCommand.java Updates shooter usage and removes acquisition pivot/tilt timing logic.
src/main/java/frc/robot/commands/RetractHoodsCommand.java Removes old dual-hood retract command.
src/main/java/frc/robot/commands/RetractHoodCommand.java Adds new single-hood retract command.
src/main/java/frc/robot/commands/IndexerCommand.java Renames Mode enum and updates indexer direction method calls.
src/main/java/frc/robot/commands/HopperExtensionCommand.java Adds command to drive hopper extension until limit switch triggers.
src/main/java/frc/robot/commands/AlignCommand.java Updates alignment logic to aim using field target vector rather than shooter module bisector.
src/main/java/frc/robot/commands/AdjustHoodCommand.java Renames/updates hood adjustment command for new single hood subsystem.
src/main/java/frc/robot/commands/AcquisitionPivotTrenchRetract.java Removes legacy pivot trench retract command.
src/main/java/frc/robot/commands/AcquisitionPivotCommand.java Removes legacy acquisition pivot setpoint command.
src/main/java/frc/robot/commands/AcquisitionCommand.java Renames Mode enum and updates naming around intake/dispose direction.
src/main/java/frc/robot/autons/ShooterSysID.java Adds new SysId auton sequence for shooter characterization.
src/main/java/frc/robot/autons/RightTrenchAuto.java Updates command sequence to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/RightPreloadAuto.java Updates preload auton to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/MiddlePreloadAuto.java Updates preload auton to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/LeftTrenchAuto.java Updates command sequence to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/LeftPreloadAuto.java Updates preload auton to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/DepotAuto.java Updates depot auton to use hopper extension + new hood/shoot interfaces.
src/main/java/frc/robot/autons/AutonSelector.java Adds ShooterSysID to auton choices and chooser options.
src/main/java/frc/robot/OperatorJoystick.java Updates bindings to new hopper extension + retract hood + simplified shoot command.
src/main/java/frc/robot/DriverJoystick.java Updates default/trigger commands to use new hood commands and subsystem.

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

import java.io.IOException;
import java.util.Optional;

import frc.robot.commands.*;
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Wildcard import (import frc.robot.commands.*;) diverges from the explicit-import style used elsewhere in autons (e.g., RightPreloadAuto uses explicit command imports at src/main/java/frc/robot/autons/RightPreloadAuto.java:5-9). Please switch back to explicit imports to keep dependencies clear.

Suggested change
import frc.robot.commands.*;
import frc.robot.commands.AcquisitionCommand;
import frc.robot.commands.AdjustHoodCommand;
import frc.robot.commands.AlignCommand;
import frc.robot.commands.HopperExtensionCommand;
import frc.robot.commands.ShootCommand;

Copilot uses AI. Check for mistakes.
Comment thread src/main/java/frc/robot/autons/LeftPreloadAuto.java Outdated
import java.io.IOException;
import java.util.Optional;

import frc.robot.commands.*;
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Wildcard import (import frc.robot.commands.*;) diverges from the explicit-import style used elsewhere in autons (e.g., RightPreloadAuto uses explicit command imports at src/main/java/frc/robot/autons/RightPreloadAuto.java:5-9). Please switch back to explicit imports to keep dependencies clear.

Suggested change
import frc.robot.commands.*;
import frc.robot.commands.AcquisitionCommand;
import frc.robot.commands.AdjustHoodCommand;
import frc.robot.commands.AlignCommand;
import frc.robot.commands.HopperExtensionCommand;
import frc.robot.commands.ShootCommand;

Copilot uses AI. Check for mistakes.
Comment thread src/main/java/frc/robot/constants/ShooterHoodConstants.java Outdated

@Override
public void initialize() {
shooterHood.setAngle(ShooterHoodConstants.SHOOTER_FULL_RETRACTION_ANGLE);
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

This command sets the hood angle to SHOOTER_FULL_RETRACTION_ANGLE, but ShooterHood.setAngle() clamps angles to ShooterHoodConstants.MAX_ANGLE. With the current constants, the requested value is above MAX_ANGLE, so the hood will never actually reach the commanded value. Consider using MAX_ANGLE here (or adjust the constants so full retraction is within the valid range).

Suggested change
shooterHood.setAngle(ShooterHoodConstants.SHOOTER_FULL_RETRACTION_ANGLE);
shooterHood.setAngle(ShooterHoodConstants.MAX_ANGLE);

Copilot uses AI. Check for mistakes.
Comment thread src/main/java/frc/robot/subsystems/ShooterHood.java Outdated
Comment thread src/main/java/frc/robot/subsystems/Kicker.java Outdated
Comment thread src/main/java/frc/robot/commands/ShootCommand.java Outdated
Comment thread src/main/java/frc/robot/commands/AcquisitionCommand.java Outdated
Comment thread src/main/java/frc/robot/autons/RightTrenchAuto.java Outdated
import java.io.IOException;
import java.util.Optional;

import frc.robot.commands.*;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No import *

Comment thread src/main/java/frc/robot/autons/DepotAuto.java Outdated
import java.io.IOException;
import java.util.Optional;

import frc.robot.commands.*;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No import *

import java.io.IOException;
import java.util.Optional;

import frc.robot.commands.*;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No import *

Comment thread src/main/java/frc/robot/commands/HopperExtensionCommand.java Outdated
classDiagram
direction LR

class ShooterConstants {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why was this final removed?

direction LR

class ShooterFormula {
<<static inner>>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is shooter formula still static inner?

classDiagram
direction LR

class SwerveConstants {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this final removed?

classDiagram
direction LR

class VisionConstants {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

final?

Right
None
}
classDiagram
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are there even changes to this file?

@reediculous456
Copy link
Copy Markdown
Member

Now that the hoods won't hit the trench, can we bring back the hood adjustment running constantly?

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.

Add persistent option

4 participants