# frc5885/2025-poseidon architecture

> Architecture diagram of the GitHub repository frc5885/2025-poseidon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/frc5885/2025-poseidon
- Repository: https://github.com/frc5885/2025-poseidon

## Overview

This is an FRC robot-control application for operating a competition robot, including autonomous routines, field-relative driving, coral/algae handling, and coordinated arm/elevator positioning. RobotContainer is the documented wiring hub for commands, autonomous routines, and hardware-facing subsystems. The sampled code shows drivetrain control and state-based superstructure behavior; the source index also identifies vision, game-piece visualization, and other core runtime modules. Several links below are grounded in the index’s file references rather than inspected call sites, so unsampled integration details are not inferred.

Main entry points: [`src/main/java/frc/robot/RobotContainer.java`](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/RobotContainer.java) (Robot Container), [`src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java`](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java) (Superstructure), [`src/main/java/frc/robot/commands/DriveCommands.java`](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/commands/DriveCommands.java) (Drive Commands), [`src/main/java/frc/robot/subsystems/drive/Drive.java`](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/drive/Drive.java) (Swerve Drive)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Robot Control"]
  node_robot["Robot Lifecycle<br/>[Robot.java]"]
  node_container["Robot Container"]
  node_auto["Autonomous Routines"]
  node_drivecmd["Drive Commands<br/>[DriveCommands.java]"]
end

subgraph group_drive["Mobility and Sensing"]
  node_drive["Swerve Drive<br/>[Drive.java]"]
  node_modules["Module I/O<br/>[ModuleIO.java]"]
  node_vision["Photon Vision<br/>[Vision.java]"]
  node_quest["Quest Navigation<br/>[QuestNav.java]"]
  node_heimdall["Pose Controller"]
end

subgraph group_handling["Piece Handling"]
  node_feeder["Coral Feeder<br/>[Feeder.java]"]
  node_beam["Beam Break<br/>[BeamBreakIO.java]"]
  node_effector["End Effector<br/>[EndEffector.java]"]
end

subgraph group_mechanisms["Superstructure"]
  node_structurecmd["Mechanism Commands"]
  node_structure["Superstructure"]
  node_stategraph["State Transitions<br/>[StateGraph.java]"]
  node_arm["Arm Control<br/>[Arm.java]"]
  node_elevator["Elevator Control<br/>[Elevator.java]"]
end

subgraph group_support["Field and Feedback"]
  node_led["LED Feedback<br/>[LEDSubsystem.java]"]
  node_visualizer["Piece Visualization"]
  node_field["Field Constants"]
  node_alliance["Alliance Mapping"]
end

node_panel["Operator Panel<br/>[main.py]"]

node_container -->|"selects routines"| node_auto
node_container -->|"binds controls"| node_drivecmd
node_container -->|"binds controls"| node_structurecmd
node_container -->|"configures subsystem"| node_feeder
node_container -->|"configures subsystem"| node_effector
node_container -->|"configures subsystem"| node_structure
node_container -->|"configures subsystem"| node_drive
node_drivecmd -->|"commands motion"| node_drive
node_drivecmd -->|"uses targeting"| node_vision
node_drive -->|"uses module I/O"| node_modules
node_drive -->|"updates pose"| node_heimdall
node_heimdall -->|"synchronizes pose"| node_quest
node_feeder -->|"reads sensor"| node_beam
node_feeder -->|"sets feedback"| node_led
node_structurecmd -->|"requests states"| node_structure
node_structure -->|"finds transitions"| node_stategraph
node_structure -->|"coordinates arm"| node_arm
node_structure -->|"coordinates elevator"| node_elevator
node_visualizer -->|"reads field poses"| node_field
node_drivecmd -->|"flips field frame"| node_alliance

click node_robot "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/Robot.java"
click node_container "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/RobotContainer.java"
click node_auto "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/AutoCommands/MultiCoralAuto.java"
click node_drivecmd "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/commands/DriveCommands.java"
click node_drive "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/drive/Drive.java"
click node_modules "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/drive/ModuleIO.java"
click node_vision "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/photon/Vision.java"
click node_quest "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/questnav/QuestNav.java"
click node_heimdall "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/heimdall/HeimdallPoseController.java"
click node_feeder "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/Feeder/Feeder.java"
click node_beam "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/io/beambreak/BeamBreakIO.java"
click node_effector "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/EndEffector/EndEffector.java"
click node_structurecmd "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/commands/SuperStructureCommand.java"
click node_structure "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java"
click node_stategraph "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/StateGraph.java"
click node_arm "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/Arm/Arm.java"
click node_elevator "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/elevator/Elevator.java"
click node_led "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/LEDS/LEDSubsystem.java"
click node_visualizer "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/GamePieces/GamePieceVisualizer.java"
click node_field "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/FieldConstants.java"
click node_alliance "https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/AllianceFlipUtil.java"
click node_panel "https://github.com/frc5885/2025-poseidon/blob/main/python-operator-panel/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_robot,node_container,node_auto,node_drivecmd toneBlue
class node_drive,node_modules,node_vision,node_quest,node_heimdall toneAmber
class node_feeder,node_beam,node_effector toneMint
class node_structurecmd,node_structure,node_stategraph,node_arm,node_elevator toneRose
class node_led,node_visualizer,node_field,node_alliance toneIndigo
class node_panel toneTeal
```

## Components

### Robot Control

- [Robot Lifecycle](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/Robot.java): `src/main/java/frc/robot/Robot.java`
- [Robot Container](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/RobotContainer.java): `src/main/java/frc/robot/RobotContainer.java`
- [Autonomous Routines](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/AutoCommands/MultiCoralAuto.java): `src/main/java/frc/robot/AutoCommands/MultiCoralAuto.java`
- [Drive Commands](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/commands/DriveCommands.java): `src/main/java/frc/robot/commands/DriveCommands.java`

### Mobility and Sensing

- [Swerve Drive](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/drive/Drive.java): `src/main/java/frc/robot/subsystems/drive/Drive.java`
- [Module I/O](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/drive/ModuleIO.java): `src/main/java/frc/robot/subsystems/drive/ModuleIO.java`
- [Photon Vision](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/photon/Vision.java): `src/main/java/frc/robot/subsystems/vision/photon/Vision.java`
- [Quest Navigation](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/questnav/QuestNav.java): `src/main/java/frc/robot/subsystems/vision/questnav/QuestNav.java`
- [Pose Controller](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/vision/heimdall/HeimdallPoseController.java): `src/main/java/frc/robot/subsystems/vision/heimdall/HeimdallPoseController.java`

### Piece Handling

- [Coral Feeder](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/Feeder/Feeder.java): `src/main/java/frc/robot/subsystems/Feeder/Feeder.java`
- [Beam Break](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/io/beambreak/BeamBreakIO.java): `src/main/java/frc/robot/io/beambreak/BeamBreakIO.java`
- [End Effector](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/EndEffector/EndEffector.java): `src/main/java/frc/robot/subsystems/EndEffector/EndEffector.java`

### Superstructure

- [Mechanism Commands](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/commands/SuperStructureCommand.java): `src/main/java/frc/robot/commands/SuperStructureCommand.java`
- [Superstructure](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java): `src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java`
- [State Transitions](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/StateGraph.java): `src/main/java/frc/robot/subsystems/SuperStructure/StateGraph.java`
- [Arm Control](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/Arm/Arm.java): `src/main/java/frc/robot/subsystems/SuperStructure/Arm/Arm.java`
- [Elevator Control](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/SuperStructure/elevator/Elevator.java): `src/main/java/frc/robot/subsystems/SuperStructure/elevator/Elevator.java`

### Field and Feedback

- [LED Feedback](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/subsystems/LEDS/LEDSubsystem.java): `src/main/java/frc/robot/subsystems/LEDS/LEDSubsystem.java`
- [Piece Visualization](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/GamePieces/GamePieceVisualizer.java): `src/main/java/frc/robot/util/GamePieces/GamePieceVisualizer.java`
- [Field Constants](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/FieldConstants.java): `src/main/java/frc/robot/util/FieldConstants.java`
- [Alliance Mapping](https://github.com/frc5885/2025-poseidon/blob/main/src/main/java/frc/robot/util/AllianceFlipUtil.java): `src/main/java/frc/robot/util/AllianceFlipUtil.java`

### Other components

- [Operator Panel](https://github.com/frc5885/2025-poseidon/blob/main/python-operator-panel/main.py): `python-operator-panel/main.py`

## Connections

- Robot Container → Autonomous Routines: selects routines (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → Drive Commands: binds controls (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → Mechanism Commands: binds controls (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → Coral Feeder: configures subsystem (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → End Effector: configures subsystem (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → Superstructure: configures subsystem (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Robot Container → Swerve Drive: configures subsystem (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Drive Commands → Swerve Drive: commands motion (evidence: `src/main/java/frc/robot/commands/DriveCommands.java`)
- Drive Commands → Photon Vision: uses targeting (evidence: `src/main/java/frc/robot/commands/DriveCommands.java`)
- Swerve Drive → Module I/O: uses module I/O (evidence: `src/main/java/frc/robot/subsystems/drive/Drive.java`)
- Swerve Drive → Pose Controller: updates pose (evidence: `src/main/java/frc/robot/subsystems/drive/Drive.java`)
- Pose Controller → Quest Navigation: synchronizes pose (evidence: `src/main/java/frc/robot/subsystems/vision/heimdall/HeimdallPoseController.java`)
- Coral Feeder → Beam Break: reads sensor (evidence: `src/main/java/frc/robot/subsystems/Feeder/Feeder.java`)
- Coral Feeder → LED Feedback: sets feedback (evidence: `src/main/java/frc/robot/subsystems/Feeder/Feeder.java`)
- Mechanism Commands → Superstructure: requests states (evidence: `src/main/java/frc/robot/RobotContainer.java`)
- Superstructure → State Transitions: finds transitions (evidence: `src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java`)
- Superstructure → Arm Control: coordinates arm (evidence: `src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java`)
- Superstructure → Elevator Control: coordinates elevator (evidence: `src/main/java/frc/robot/subsystems/SuperStructure/SuperStructure.java`)
- Piece Visualization → Field Constants: reads field poses (evidence: `src/main/java/frc/robot/util/GamePieces/GamePieceVisualizer.java`)
- Drive Commands → Alliance Mapping: flips field frame (evidence: `src/main/java/frc/robot/commands/DriveCommands.java`)
