Skip to content

frc1418/2026-robot

Repository files navigation

Subsystem & IO Layers Layout

robot
β”œβ”€ shooter
β”‚  β”œβ”€ flywheel
β”‚  β”‚  β”œβ”€ FlywheelIOReal     (TODO: ADD)
β”‚  β”‚  └─ FlywheelIOSim      (TODO: REFACTOR)
β”‚  └─ hood
β”‚     β”œβ”€ HoodIOReal         (TODO: ADD)
β”‚     └─ HoodIOSim          (TODO: REFACTOR)
β”œβ”€ hopper
β”‚  β”œβ”€ intake
β”‚  β”‚  β”œβ”€ IntakeIOReal       (TODO: ADD)
β”‚  β”‚  └─ IntakeIOSim        (TODO: REFACTOR)
β”‚  β”œβ”€ pivot
β”‚  β”‚  β”œβ”€ pivotIOReal  (TODO: ADD)
β”‚  β”‚  └─ pivotIOSim   (TODO: ADD)
β”‚  └─ transition
β”‚     β”œβ”€ TransistionIOReal  (TODO: ADD)
β”‚     └─ TransistionIOSim   (TODO: REFACTOR)
β”œβ”€ climber
β”‚  β”œβ”€ ClimberIOReal         (TODO: ADD)
β”‚  └─ ClimberIOSim          (TODO: ADD)
β”œβ”€ drive
β”‚  β”œβ”€ module (x4)
β”‚  β”‚  β”œβ”€ ModuleIOSpark
β”‚  β”‚  └─ ModuleIOSim
β”‚  └─ gyro
β”‚     β”œβ”€ GyroIONavX
β”‚     β”œβ”€ GyroIOBoron
β”‚     └─ GyroIOSim
└─ vision (x2)
   β”œβ”€ VisionIOLimelight
   β”œβ”€ VisionIOPhoton
   └─ VisionIOPhotonSim

Subsystem States/Commands

            robot
            β”œβ”€ shooter
            β”‚  β”œβ”€ flywheel
            β”‚  β”‚  β”œβ”€ idled
  [DEFAULT] β”‚  β”‚  └─ running
            β”‚  β”œβ”€ hood
  [DEFAULT] β”‚  β”‚  β”œβ”€ idled
            β”‚  β”‚  └─ aimed(angle: double)
            β”‚  β”‚
            β”‚  β”œβ”€ idled -> flywheel: idled, hood: idled
  [DEFAULT] β”‚  β”œβ”€ hoodIdled -> flywheel: running, hood: idled
            β”‚  └─ hoodAimed(angle: double) -> flywheel: running, hood: aimed(angle)
            β”œβ”€ hopper
            β”‚  β”œβ”€ intake
  [DEFAULT] β”‚  β”‚  β”œβ”€ idled
            β”‚  β”‚  └─ running
            β”‚  β”œβ”€ pivot
  [DEFAULT] β”‚  β”‚  β”œβ”€ idled
            β”‚  β”‚  β”œβ”€ up
            β”‚  β”‚  └─ down
            β”‚  β”œβ”€ transition
  [DEFAULT] β”‚  β”‚  β”œβ”€ idled
            β”‚  β”‚  └─ running
            β”‚  β”‚
  [DEFAULT] β”‚  β”œβ”€ idled -> intake: idled, pivot: idled, transition: idled
            β”‚  β”œβ”€ compacted -> intake: idled, pivot: up, transition: idled
            β”‚  β”œβ”€ intaking -> intake: pivot.down ? running : idled, pivot: down, transition: idled
            β”‚  └─ transitioning -> intake: idled, pivot: down, transition: running
            β”œβ”€ climber
  [DEFAULT] β”‚  β”œβ”€ idled
            β”‚  └─ climbing
            β”œβ”€ drive
  [DEFAULT] β”‚  β”œβ”€ idled
            β”‚  β”œβ”€ driving(x: double, y: double, Ξ©: double)
            β”‚  β”œβ”€ basicFFSysID
            β”‚  └─ wheelRadiusCharacterization
            β”œβ”€ vision0
  [DEFAULT] β”‚  β”œβ”€ aprilTags
            β”‚  └─ otherPipeline(id: int)
            β”œβ”€ vision1
  [DEFAULT] β”‚  β”œβ”€ aprilTags
            β”‚  └─ otherPipeline(id: int)
            β”‚
            β”œβ”€ shooting(x: double, y: double) ->
            β”‚       shooter: hoodAimed(SOTM_HOOD_ANGLE),
            β”‚       hopper: SOTM_ABLE_TO_HIT ? transitioning : idled,
            β”‚       drive: driving(x, y, SOTM_DRIVE_ANGLE),
            β”‚       vision0: aprilTags,
            β”‚       vision1: aprilTags
            β”‚
            β”œβ”€ manualShooting(x: double, y: double, Ξ©: double, hoodAngle: double) ->
            β”‚       shooter: hoodAimed(hoodAngle),
            β”‚       hopper: transitioning,
            β”‚       drive: driving(x, y, Ξ©),
            β”‚       vision0: aprilTags,
            β”‚       vision1: aprilTags
            β”‚
            β”œβ”€ intaking(x: double, y: double, Ξ©: double) ->
            β”‚       shooter: hoodIdled,
            β”‚       hopper: intaking,
            β”‚       drive: driving(x, y, Ξ©),
            β”‚       vision0: aprilTags,
            β”‚       vision1: aprilTags
            β”‚
  [DEFAULT] β”œβ”€ driving(x: double, y: double, Ξ©: double) ->
            β”‚       shooter: hoodIdled,
            β”‚       hopper: idled,
            β”‚       drive: driving(x, y, Ξ©),
            β”‚       vision0: aprilTags,
            β”‚       vision1: aprilTags
            β”‚
            └─ climbing ->
                    shooter: idled,
                    hopper: compacted,
                    drive: idled,
                    vision0: aprilTags,
                    vision1: aprilTags

CAN IDs

1 - 8: Swerve [even steer, odd drive; FL, BL, BR, FR] 9 - 11: Shooter [L Flywheel, R Flywheel, Hood] 12, 13: Spindexer [Primary, Kicker] 14, 15: Intake [Pivot, Intake] 16: Climb 17: (maybe temp) Intake Kicker 20: Gyro

TODOs

  • Consistent Shooter RPM
  • PivotIOReal
  • HoodIOReal
  • FF characterization
  • Variable-distance shooting
  • SOTM

TODOs - DONE

  • Limelight locations on-robot

NOTE: Shooter L Flywheel & Intake Intake need to be updated to 2026 firmware

AdvantageKit SparkMax Swerve Template with maple-sim

Original Project

This is the AdvantageKit Swerve Template with REV SparkMax hardware, enhanced with maple-sim integration for improved chassis physics simulation.

Not many changes were made to the original projectβ€”only the necessary ones to implement maple-sim. See the changelog from the original project.

The control loops of the chassis run on REV motor controllers. During simulation, they are replaced with WpiLib PIDController, so there might be slight differences between the real and simulated robot.

Running the Simulation

Change Constants.currentRobotMode to SIM and run simulateJava. Connect the robot from AdvantageScope, open AdvantageScope Simulation Layout, and drive your robot around!

About

πŸ€‘πŸ€‘πŸ€‘

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE-IronMaple.md
GPL-3.0
AdvantageKit-License.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages