FRC1076 / FRC1076/2026-FirstYearRobot
[Prototype] Build a 'Digital Twin' for the Fuel Subsystem
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Objective:** Create a simulation for the Fuel (Intake/Launcher) subsystem so we can test our 'Launch Sequence' without a real robot.
**Why this matters:**
The real robot is often busy or broken. If we can simulate the physics of the launcher, we can tune our 'spin-up' time and 'launch' speeds at home on our laptops.
**Hardware Specifics:**
* We use **REV SparkMax** controllers with **NEO** motors.
* **2026 Change:** REVLib has new `SparkMaxSim` classes. We no longer use `REVPhysicsSim`.
**The Prototype Goal:**
1. **Create the IO Interface:** Look at `ModuleIO.java` in the `drive` folder. Create a `FuelIO.java` interface that defines what the launcher *does* (e.g., `setVoltage`, `getVelocity`).
2. **Implement `FuelIOSim`:** Use WPILib’s `FlywheelSim` to model the physics of the rollers and the new `SparkMaxSim.iterate()` method to sync the motor's encoder with the physics model.
3. **Visualize with Mechanism2d:** Write code to draw two 'wheels' in the Sim GUI that spin faster when you increase the voltage.
**Resources:**
* [REVLib 2026 Simulation Guide](https://docs.revrobotics.com/brushless/spark-max/simulation)
* [WPILib FlywheelSim Example](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/physics-sim.html#flywheelsim)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.