Skip to content

Event bcc#16

Merged
SeanErn merged 50 commits into
competitionfrom
event_bcc
Mar 30, 2026
Merged

Event bcc#16
SeanErn merged 50 commits into
competitionfrom
event_bcc

Conversation

@SeanErn
Copy link
Copy Markdown
Member

@SeanErn SeanErn commented Mar 30, 2026

Summary by CodeRabbit

  • New Features

    • Added roller subsystem for improved shooting mechanics.
    • Added new autonomous routines with multiple strategic variants.
    • Added launcher targeting for passing shots.
  • Enhancements

    • Tuned shooter, turret, and deflector control parameters.
    • Added field zone utilities for strategic positioning.
    • Improved launcher aiming with dynamic target calculation.
  • Configuration

    • Updated robot physical parameters and drivetrain constraints.
    • Expanded AprilTag camera system from 3 to 4 cameras.

alanmeye and others added 30 commits March 17, 2026 18:29
WIP: need to flip correct passing targets based on actual one
TODO: figure out why first run of launch calculator causes such a large spike in latency
@SeanErn SeanErn merged commit bbd727c into competition Mar 30, 2026
1 of 2 checks passed
@SeanErn SeanErn deleted the event_bcc branch March 30, 2026 01:11
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b9d2215-1cee-433d-8f14-61c33d3d5f2c

📥 Commits

Reviewing files that changed from the base of the PR and between 691c960 and 5400680.

📒 Files selected for processing (60)
  • build.gradle
  • src/main/deploy/pathplanner/autos/BestEverDepot.auto
  • src/main/deploy/pathplanner/autos/BestEverOutpost.auto
  • src/main/deploy/pathplanner/autos/DepotStartNeutralClimbRaceToMiddle2nd.auto
  • src/main/deploy/pathplanner/autos/DepotStartNeutralClimbRaceToMiddleQuick.auto
  • src/main/deploy/pathplanner/autos/DepotStartNeutralClimbRaceToMiddleShort.auto
  • src/main/deploy/pathplanner/autos/DepotStartNeutralClimbRaceToMiddleXL.auto
  • src/main/deploy/pathplanner/paths/BestEverDepot1.path
  • src/main/deploy/pathplanner/paths/BestEverDepot2.path
  • src/main/deploy/pathplanner/paths/BestEverDepot3.path
  • src/main/deploy/pathplanner/paths/BestEverOutpost1.path
  • src/main/deploy/pathplanner/paths/BestEverOutpost2.path
  • src/main/deploy/pathplanner/paths/BestEverOutpost3.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimb 2 XL.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimb 3Part1ofearlyshootShort.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimb 3Part1ofearlyshootXL.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimb2Short.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbQuick.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 1.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 2.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 3.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 4.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 5.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 6.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbRaceToMiddle2nd 7.path
  • src/main/deploy/pathplanner/paths/DepotStartNeutralClimbShort.path
  • src/main/deploy/pathplanner/settings.json
  • src/main/java/frc/alotobots/AutoNamedCommands.java
  • src/main/java/frc/alotobots/Constants.java
  • src/main/java/frc/alotobots/DataCollection.java
  • src/main/java/frc/alotobots/Robot.java
  • src/main/java/frc/alotobots/RobotContainer.java
  • src/main/java/frc/alotobots/library/subsystems/swervedrive/constants/mk5i2026/TunerConstants2026.java
  • src/main/java/frc/alotobots/library/subsystems/swervedrive/io/ModuleIOTalonFX.java
  • src/main/java/frc/alotobots/library/subsystems/swervedrive/util/PathPlannerManager.java
  • src/main/java/frc/alotobots/library/subsystems/vision/photonvision/apriltag/constants/AprilTagConstants.java
  • src/main/java/frc/alotobots/rebuilt/FieldConstants.java
  • src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherShoot.java
  • src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherTargetHubDynamic.java
  • src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherTargetHubDynamicAndShoot.java
  • src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherTargetPassingDynamic.java
  • src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherTargetPassingDynamicAndShoot.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/belt/constants/BeltConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/intake/extendo/constants/IntakeExtendoTalonFXConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/LaunchCalculator.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/LaunchCalculatorConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/deflector/constants/DeflectorVortexConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/shooter/ShooterSubsystem.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/shooter/constants/ShooterConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/shooter/constants/ShooterTalonFXConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/launcher/turret/constants/TurretConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/RollerSubsystem.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/commands/DefaultRollerRunAtVelocity.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/commands/DefaultRollerRunOpenLoop.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/constants/RollerConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/constants/RollerSparkMaxConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/constants/RollerTalonFXConstants.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/io/RollerIO.java
  • src/main/java/frc/alotobots/rebuilt/subsystems/roller/io/RollerIOSparkMax.java
  • src/main/java/frc/alotobots/util/PoseZone.java

📝 Walkthrough

Walkthrough

This PR adds a new RollerSubsystem with hardware abstractions and commands, introduces new PathPlanner autonomous routines and trajectory paths for "BestEver" and "DepotStartNeutralClimbRaceToMiddle2nd" sequences, refactors launcher command groups to compose new dynamic aiming and shooting behaviors, implements field zone utilities via PoseZone, updates numerous subsystem constants for tuning, and refactors RobotContainer with data collection telemetry and control logic adjustments.

Changes

Cohort / File(s) Summary
PathPlanner Autonomy Routines
src/main/deploy/pathplanner/autos/BestEverDepot.auto, BestEverOutpost.auto, DepotStartNeutralClimbRaceToMiddle*.auto (4 files)
Added five new sequential/parallel autonomous command sequences with path following, event markers, and climbing phases. Configurations include odometry reset, folder metadata, and Choreo integration settings.
PathPlanner Trajectory Paths
src/main/deploy/pathplanner/paths/BestEver*.path, DepotStartNeutralClimb*.path, DepotStartNeutralClimbRaceToMiddle2nd*.path (19 files)
Added 19 new path definitions with waypoints, rotation targets, event markers, and global motion constraints across multiple trajectory segments for autonomous navigation.
PathPlanner Settings
src/main/deploy/pathplanner/settings.json
Updated pathFolders list with new entries, adjusted robot mass from 59.1 to 51.65 kg, increased max drive speed from 5.2 to 6.02 m/s, and raised drive current limit from 60 to 65 A.
Roller Subsystem Implementation
src/main/java/frc/alotobots/rebuilt/subsystems/roller/RollerSubsystem.java, RollerIO.java, RollerIOSparkMax.java, RollerConstants.java, RollerSparkMaxConstants.java, RollerTalonFXConstants.java
New roller motor subsystem with closed-loop velocity and open-loop percent output control, hardware abstraction for Spark Max, AdvantageKit logging, and configurable limits/setpoints.
Roller Commands
src/main/java/frc/alotobots/rebuilt/subsystems/roller/commands/DefaultRollerRunAtVelocity.java, DefaultRollerRunOpenLoop.java
Two new command classes for controlling roller subsystem at target velocity or via percent output with automatic cleanup on end.
Launcher Command Refactoring
src/main/java/frc/alotobots/rebuilt/commands/groups/LauncherTargetHubDynamic.java, LauncherTargetHubDynamicAndShoot.java, LauncherTargetPassingDynamic.java, LauncherTargetPassingDynamicAndShoot.java, LauncherShoot.java
Introduced LauncherTargetHubDynamic and LauncherTargetPassingDynamic for parallel aiming, new LauncherShoot for belt/roller/kicker feeding, and refactored Hub/Passing "AndShoot" groups to compose these via parallel execution with override supplier support.
Launcher Subsystem Constants
src/main/java/frc/alotobots/rebuilt/subsystems/launcher/LaunchCalculatorConstants.java, LaunchCalculator.java, shooter/constants/ShooterConstants.java, shooter/constants/ShooterTalonFXConstants.java, deflector/constants/DeflectorVortexConstants.java, turret/constants/TurretConstants.java
Updated hub and passing shot interpolation tables with new distance/angle/velocity/TOF points, added LaunchCalculator.warmup() for filter initialization, reduced shooter "at velocity" threshold to 2.5 RPS, adjusted PID gains (shooter KP 2.5→0.45, deflector KP 0.4→0.8), and expanded turret angle limits (max 115→145°, min -122→-123°).
Other Subsystem Constants
src/main/java/frc/alotobots/rebuilt/subsystems/belt/constants/BeltConstants.java, intake/extendo/constants/IntakeExtendoTalonFXConstants.java
Updated belt load velocities from ±90 to ±100 RPS and reduced intake extendo current limits (stator 65→45 A, supply peak 55→35 A, supply sustained 45→25 A).
Core Robot Classes
src/main/java/frc/alotobots/RobotContainer.java
Instantiated RollerSubsystem across all modes, added data collection telemetry with logged override suppliers for shooter velocity/deflector angle, disabled Bling control wiring, simplified auto configuration flow, added climber safety bypass, uncommented SysId routines, and introduced field zone conditionals for deflector behavior.
AutoNamedCommands & Constants
src/main/java/frc/alotobots/AutoNamedCommands.java, Constants.java
Updated AutoNamedCommands to accept RollerSubsystem dependency and register LauncherTargetPassingDynamicAndShoot, removed SWERVE_CAN_BUS constant, added ROLLER_MOTOR_CAN_ID = 41.
Utility & Support Files
src/main/java/frc/alotobots/util/PoseZone.java, rebuilt/FieldConstants.java, Robot.java, DataCollection.java, library/subsystems/swervedrive/... (TunerConstants2026.java, ModuleIOTalonFX.java, PathPlannerManager.java), vision/photonvision/apriltag/constants/AprilTagConstants.java
Added PoseZone field zone utility with Box geometry and Trigger factories, added FieldConstants.PoseZones with zone definitions, reduced thread priority (99→1) in Robot.robotPeriodic(), deleted DataCollection class, configured Pigeon2 mount pose, optimized CANcoder in bus utilization, disabled LocalADStarAK pathfinding init, and added front-right AprilTag camera configuration (CAMERA_CONFIGS[4], STD_DEV[4]=1.2).

Sequence Diagram(s)

sequenceDiagram
    participant Operator
    participant RobotContainer
    participant LauncherTargetHubDynamicAndShoot as LauncherTargetHubDynamicAndShoot<br/>(ParallelCommandGroup)
    participant LauncherTargetHubDynamic as LauncherTargetHubDynamic<br/>(ParallelCommandGroup)
    participant LauncherShoot as LauncherShoot<br/>(SequentialCommandGroup)
    participant Shooter as ShooterSubsystem
    participant Belt as BeltSubsystem
    participant Roller as RollerSubsystem
    participant Kicker as KickerSubsystem

    Operator->>RobotContainer: Command LauncherTargetHubDynamicAndShoot
    RobotContainer->>LauncherTargetHubDynamicAndShoot: execute()
    par Parallel Execution
        LauncherTargetHubDynamicAndShoot->>LauncherTargetHubDynamic: run parallel aiming
        par Aiming Phase
            LauncherTargetHubDynamic->>Shooter: runShooterAtVelocity(calc)
            LauncherTargetHubDynamic->>Shooter: turret follow angle
        end
        LauncherTargetHubDynamicAndShoot->>LauncherShoot: run feeding sequence
        LauncherShoot->>Shooter: waitUntil isAtTargetVelocity()
        Shooter-->>LauncherShoot: at target velocity
        par Parallel Feeding
            LauncherShoot->>Belt: run at LOAD_INTO_SHOOTER_VELOCITY
            LauncherShoot->>Roller: run open loop (JOSTLE)
            LauncherShoot->>Kicker: run at LOAD_INTO_SHOOTER_VELOCITY
        end
    end
    LauncherTargetHubDynamicAndShoot-->>Operator: sequence complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #5: Introduces launcher/shooter subsystems and command groups refactoring with RobotContainer wiring changes, directly overlapping with this PR's launcher command composition and shooter constant updates.
  • PR #4: Modifies RobotContainer instantiation across SIM/real modes with subsystem IO configuration, relevant to this PR's RollerSubsystem hardware abstraction wiring.
  • PR #12: Updates PathPlanner deployment assets (autonomous configurations and path definitions) with settings.json constraints, sharing the same trajectory/autonomous configuration scope.

Poem

🐰 A roller spins, a launcher dreams,
Aiming dynamic through field schemes,
Zones and paths chart the way,
Five-thousand changes lead the fray,
Constants dance, the bot will climb!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch event_bcc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

alanmeye added a commit that referenced this pull request Apr 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.

4 participants