# raptacon/robot-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/raptacon/robot-2025
- Repository: https://github.com/raptacon/robot-2025

## Overview

##### Main Components

a) Hardware Layer:
- RoboRIO (Main Controller)
- Radio (Communication)
- Motor Controllers
- Sensors
- Physical Subsystems (Arms, Intake, Shooter)

b) Software Layer:
- Robot Control System
- Main Robot Program (robot.py)
- Command-Based Architecture
- Subsystems
- Configuration System
- Telemetry System
- Autonomous Routines

**┌─────────────────────────────────────────────┐**
- Driver Station                │
- ┘
- ↕ WiFi
**┌─────────────────────────────────────────────┐**
- Radio (FRC)                   │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- RoboRIO                     │
- ┤
- Software Stack                              │
- ┌─────────────┐ ┌─────────────┐            │
- Configuration│ │  Commands   │            │
- System    │ │   System    │            │
- ┘ └─────────────┘            │
- ┌─────────────┐ ┌─────────────┐            │
- Subsystems  │ │ Autonomous  │            │
- Routines   │            │
- ┘ └─────────────┘            │
- ┌─────────────┐                            │
- Telemetry  │                            │
- System    │                            │
- ┘                            │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Hardware Controllers              │
- ┬────────────┬──────────────────┤
- Motors   │  Sensors   │     Actuators    │
- ┴────────────┴──────────────────┘

##### Key Relationships to Highlight

a) Command Flow:
- Driver Station → Radio → RoboRIO → Hardware
- Autonomous Commands → Subsystems → Hardware
- Sensor Feedback → RoboRIO → Telemetry

b) Configuration System:
- How YAML configs (from /configs) feed into subsystems
- Different robot configurations (breadboxBot, greenBot, etc.)

##### Implementation Details

- Python-based implementation (RobotPy)
- Command-based architecture (commands/ directory)
- Multiple robot configurations support
- Subsystem modularity
- Testing infrastructure

##### Additional Notes

- Version information flow
- Deployment paths
- Testing points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Driver Interface"
        DS[Driver Station]
        AS[AdvantageScope]
    end

    subgraph "Communication Layer"
        Radio[FRC Radio]
    end

    subgraph "Main Controller"
        RIO[RoboRIO]
    end

    subgraph "Software Stack"
        MainControl["Robot Control System"]:::control
        RobotMap["Robot Map"]:::control
        
        subgraph "Command System"
            CmdArch["Command Architecture"]:::software
            AutoCmd["Autonomous Commands"]:::software
        end
        
        subgraph "Configuration"
            ConfigSys["Configuration System"]:::config
            BreadConfig["BreadboxBot Config"]:::config
            GreenConfig["GreenBot Config"]:::config
            DoofConfig["Doof Config"]:::config
        end
        
        subgraph "Core Systems"
            Telemetry["Telemetry System"]:::software
            Testing["Testing Infrastructure"]:::software
            Deploy["Deployment System"]:::software
        end
        
        subgraph "Robot Implementations"
            BreadBot["BreadboxBot"]:::robot
            GreenBot["GreenBot"]:::robot
            ConfigBot["Config Based Robot"]:::robot
        end
        
        subgraph "Subsystems"
            Swerve["Drive System"]:::subsystem
            Intake["Sparky Intake"]:::subsystem
            Shooter["Sparky Shooter"]:::subsystem
            LEDs["Sparky LEDs"]:::subsystem
        end
    end

    subgraph "Hardware Layer"
        Motors["Motor Controllers"]:::hardware
        Sensors["Sensor Array"]:::hardware
        Actuators["Actuators"]:::hardware
    end

    %% Relationships
    DS --> Radio
    Radio --> RIO
    RIO --> MainControl
    MainControl --> RobotMap
    
    ConfigSys --> |Configures| BreadConfig
    ConfigSys --> |Configures| GreenConfig
    ConfigSys --> |Configures| DoofConfig
    
    MainControl --> CmdArch
    CmdArch --> AutoCmd
    
    MainControl --> Subsystems
    Subsystems --> Motors
    Subsystems --> Sensors
    Subsystems --> Actuators
    
    Telemetry --> AS
    
    %% Click Events
    click MainControl "https://github.com/Raptacon/Robot-2025/blob/main/robot.py"
    click RobotMap "https://github.com/Raptacon/Robot-2025/blob/main/robotMap.py"
    click CmdArch "https://github.com/Raptacon/Robot-2025/tree/main/commands/"
    click ConfigSys "https://github.com/Raptacon/Robot-2025/tree/main/configs/"
    click Telemetry "https://github.com/Raptacon/Robot-2025/blob/main/data/telemetry.py"
    click AutoCmd "https://github.com/Raptacon/Robot-2025/tree/main/autonomous/"
    click Swerve "https://github.com/Raptacon/Robot-2025/tree/main/swerve/"
    click BreadConfig "https://github.com/Raptacon/Robot-2025/blob/main/configs/breadboxBot.yml"
    click GreenConfig "https://github.com/Raptacon/Robot-2025/blob/main/configs/greenBot.yml"
    click DoofConfig "https://github.com/Raptacon/Robot-2025/blob/main/configs/doof.yml"
    click Intake "https://github.com/Raptacon/Robot-2025/blob/main/subsystem/sparkyIntake.py"
    click Shooter "https://github.com/Raptacon/Robot-2025/blob/main/subsystem/sparkyShooter.py"
    click LEDs "https://github.com/Raptacon/Robot-2025/blob/main/subsystem/sparkyLeds.py"
    click Testing "https://github.com/Raptacon/Robot-2025/tree/main/tests/"
    click Deploy "https://github.com/Raptacon/Robot-2025/tree/main/deploy_utils/"
    click BreadBot "https://github.com/Raptacon/Robot-2025/blob/main/robots/breadboxBot.py"
    click GreenBot "https://github.com/Raptacon/Robot-2025/blob/main/robots/greenBot.py"
    click ConfigBot "https://github.com/Raptacon/Robot-2025/blob/main/robots/configBasedRobot.py"

    %% Styles
    classDef hardware fill:#FFE5CC,stroke:#FF9933
    classDef software fill:#E6F3FF,stroke:#3399FF
    classDef control fill:#CCE5CC,stroke:#33CC33
    classDef config fill:#FFE6FF,stroke:#FF66FF
    classDef subsystem fill:#F0F0F0,stroke:#666666
    classDef robot fill:#E6FFE6,stroke:#00CC00

    %% Legend
    subgraph Legend
        H[Hardware]:::hardware
        S[Software]:::software
        C[Control]:::control
        CF[Config]:::config
        SS[Subsystem]:::subsystem
        R[Robot]:::robot
    end
```
