# whearobotics/frc2023 architecture

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

- Interactive diagram: https://gitdiagram.com/whearobotics/frc2023
- Repository: https://github.com/whearobotics/frc2023

## Overview

FRC2023 is a collection of 2023-season FRC robot programs and experiments, not one unified application. The principal competition workflow is a robot program reading driver input, commanding a swerve drivetrain and manipulator, and updating drivetrain pose; autonomous routines also run from the robot program. Separate examples cover an elevator mechanism, basic robot control, vision, and machine-learning experiments. Edges are limited to calls or references shown in the excerpts and SOURCE INDEX; the brief README does not document how the experiments are integrated.

Main entry points: [`src/Swerve/SwerveDrivetrain.py`](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveDrivetrain.py) (Swerve Drivetrain), [`src/Swerve/robot.py`](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/robot.py) (Robot Control), [`src/Swerve/SwerveModule.py`](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveModule.py) (Swerve Module), [`src/example_elevator/robot.py`](https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/robot.py) (Elevator Robot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_competition["Competition Robot"]
  node_swerve_robot["Robot Control<br/>[robot.py]"]
  node_manipulator["Manipulator<br/>[Manipulator.py]"]
  node_utilities["Arm Conversions<br/>[utilities.py]"]
end

subgraph group_swerve["Swerve Control"]
  node_swerve_drive["Swerve Drivetrain"]
  node_swerve_module["Swerve Module<br/>[SwerveModule.py]"]
  node_ez_drivetrain["EZ Drivetrain"]
  node_ez_robot["EZ Robot<br/>[SwerveRobot.py]"]
end

subgraph group_examples["Robot Examples"]
  node_elevator_robot["Elevator Robot<br/>[robot.py]"]
  node_elevator["Elevator Mechanism<br/>[elevator.py]"]
  node_elevator_drive["Example Drivetrain"]
  node_accelerometer_drive["Accelerometer Drivetrain"]
  node_hello_robot["Basic Robot<br/>[hello_robot.py]"]
end

subgraph group_experiments["Vision And ML"]
  node_vision_detect["Detect And Display"]
  node_vision_angle["Angle Calculation<br/>[CalculateAngle.py]"]
  node_xor["XOR Experiment<br/>[01-xor.py]"]
  node_mnist["MNIST Experiment<br/>[02-mnist.py]"]
  node_mnist_conv["Convolutional MNIST<br/>[03-mnist-conv.py]"]
end

node_driver(("Driver"))
node_robot_hardware["Robot Hardware"]

node_driver -->|"provides input"| node_swerve_robot
node_swerve_robot -->|"commands drive"| node_swerve_drive
node_swerve_robot -->|"controls mechanism"| node_manipulator
node_manipulator -->|"converts positions"| node_utilities
node_swerve_drive -->|"sets module states"| node_swerve_module
node_swerve_drive -.->|"reads sensors"| node_robot_hardware
node_swerve_drive -.->|"commands motors"| node_robot_hardware
node_ez_robot -->|"uses drivetrain"| node_ez_drivetrain
node_ez_drivetrain -->|"imports module"| node_swerve_module
node_elevator_robot -->|"controls mechanism"| node_elevator
node_elevator_robot -.->|"uses drivetrain"| node_elevator_drive
node_elevator_drive -->|"imports module"| node_swerve_module

click node_swerve_robot "https://github.com/whearobotics/frc2023/blob/main/src/Swerve/robot.py"
click node_manipulator "https://github.com/whearobotics/frc2023/blob/main/src/Swerve/Manipulator.py"
click node_utilities "https://github.com/whearobotics/frc2023/blob/main/src/Swerve/utilities.py"
click node_swerve_drive "https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveDrivetrain.py"
click node_swerve_module "https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveModule.py"
click node_ez_drivetrain "https://github.com/whearobotics/frc2023/blob/main/src/EZSwerve/SwerveDrivetrain.py"
click node_ez_robot "https://github.com/whearobotics/frc2023/blob/main/src/EZSwerve/SwerveRobot.py"
click node_elevator_robot "https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/robot.py"
click node_elevator "https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/elevator.py"
click node_elevator_drive "https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/SwerveDrivetrain.py"
click node_accelerometer_drive "https://github.com/whearobotics/frc2023/blob/main/src/helloworld/accelerometer/SwerveDrivetrain.py"
click node_hello_robot "https://github.com/whearobotics/frc2023/blob/main/src/helloworld/robot/hello_robot.py"
click node_vision_detect "https://github.com/whearobotics/frc2023/blob/main/src/Vision/01-DetectAndDisplay/DetectAndDisplay.py"
click node_vision_angle "https://github.com/whearobotics/frc2023/blob/main/src/Vision/02-CalculateAngle/CalculateAngle.py"
click node_xor "https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/01-xor.py"
click node_mnist "https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/02-mnist.py"
click node_mnist_conv "https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/03-mnist-conv.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_swerve_robot,node_manipulator,node_utilities toneBlue
class node_swerve_drive,node_swerve_module,node_ez_drivetrain,node_ez_robot toneAmber
class node_elevator_robot,node_elevator,node_elevator_drive,node_accelerometer_drive,node_hello_robot toneMint
class node_vision_detect,node_vision_angle,node_xor,node_mnist,node_mnist_conv toneRose
class node_driver,node_robot_hardware toneIndigo
```

## Components

### Competition Robot

- [Robot Control](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/robot.py): `src/Swerve/robot.py`
- [Manipulator](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/Manipulator.py): `src/Swerve/Manipulator.py`
- [Arm Conversions](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/utilities.py): `src/Swerve/utilities.py`

### Swerve Control

- [Swerve Drivetrain](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveDrivetrain.py): `src/Swerve/SwerveDrivetrain.py`
- [Swerve Module](https://github.com/whearobotics/frc2023/blob/main/src/Swerve/SwerveModule.py): `src/Swerve/SwerveModule.py`
- [EZ Drivetrain](https://github.com/whearobotics/frc2023/blob/main/src/EZSwerve/SwerveDrivetrain.py): `src/EZSwerve/SwerveDrivetrain.py`
- [EZ Robot](https://github.com/whearobotics/frc2023/blob/main/src/EZSwerve/SwerveRobot.py): `src/EZSwerve/SwerveRobot.py`

### Robot Examples

- [Elevator Robot](https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/robot.py): `src/example_elevator/robot.py`
- [Elevator Mechanism](https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/elevator.py): `src/example_elevator/elevator.py`
- [Example Drivetrain](https://github.com/whearobotics/frc2023/blob/main/src/example_elevator/SwerveDrivetrain.py): `src/example_elevator/SwerveDrivetrain.py`
- [Accelerometer Drivetrain](https://github.com/whearobotics/frc2023/blob/main/src/helloworld/accelerometer/SwerveDrivetrain.py): `src/helloworld/accelerometer/SwerveDrivetrain.py`
- [Basic Robot](https://github.com/whearobotics/frc2023/blob/main/src/helloworld/robot/hello_robot.py): `src/helloworld/robot/hello_robot.py`

### Vision And ML

- [Detect And Display](https://github.com/whearobotics/frc2023/blob/main/src/Vision/01-DetectAndDisplay/DetectAndDisplay.py): `src/Vision/01-DetectAndDisplay/DetectAndDisplay.py`
- [Angle Calculation](https://github.com/whearobotics/frc2023/blob/main/src/Vision/02-CalculateAngle/CalculateAngle.py): `src/Vision/02-CalculateAngle/CalculateAngle.py`
- [XOR Experiment](https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/01-xor.py): `src/machine_learning/01-xor.py`
- [MNIST Experiment](https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/02-mnist.py): `src/machine_learning/02-mnist.py`
- [Convolutional MNIST](https://github.com/whearobotics/frc2023/blob/main/src/machine_learning/03-mnist-conv.py): `src/machine_learning/03-mnist-conv.py`

### Other components

- **Driver**
- **Robot Hardware**

## Connections

- Driver → Robot Control: provides input (evidence: `src/Swerve/robot.py`)
- Robot Control → Swerve Drivetrain: commands drive (evidence: `src/Swerve/robot.py`)
- Robot Control → Manipulator: controls mechanism (evidence: `src/Swerve/robot.py`)
- Manipulator → Arm Conversions: converts positions (evidence: `src/Swerve/Manipulator.py`)
- Swerve Drivetrain → Swerve Module: sets module states (evidence: `src/Swerve/SwerveDrivetrain.py`)
- Swerve Drivetrain → Robot Hardware: reads sensors
- Swerve Drivetrain → Robot Hardware: commands motors
- EZ Robot → EZ Drivetrain: uses drivetrain (evidence: `src/EZSwerve/SwerveRobot.py`)
- EZ Drivetrain → Swerve Module: imports module (evidence: `src/EZSwerve/SwerveDrivetrain.py`)
- Elevator Robot → Elevator Mechanism: controls mechanism (evidence: `src/example_elevator/robot.py`)
- Elevator Robot → Example Drivetrain: uses drivetrain
- Example Drivetrain → Swerve Module: imports module (evidence: `src/example_elevator/SwerveDrivetrain.py`)
