Periodic-Oriented Programming for FIRST Robotics
Web page · https://bvisness.me/periodic-oriented-programming
First seen by Oriel on .
AI summary
The article proposes Periodic-Oriented Programming for FRC: centralize robot logic in periodic functions, minimize state and abstractions, and avoid WPILib command-based programming.
- Periodic-Oriented Programming computes desired hardware state and updates outputs every periodic tick, using straightforward top-to-bottom logic instead of modes, commands, or extensive state.
- Subsystems own hardware and expose high-level methods that update desired-state variables, while each subsystem’s periodic method applies outputs, safety constraints, logging, and telemetry.
- The approach minimizes modes, duplicated coprocessor state, timers, and autonomous state, favoring current inputs, sensor feedback, or time-driven desired-state tables.
- The author argues command-based programming creates unpredictable scheduling, cancellation, lifecycle, and execution-order problems while scattering simple logic across many files.
- A 25-line 2025 teleopPeriodic implementation handles driving modes, precision controls, alliance reversal, and coordinate selection without default commands or button bindings.
#frc #robot programming #wpilib #choreo
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Lobsters: 23, latest observation ; +22 over observed period since
Comments
Comment count reported by the source.
- Lobsters: 3, latest observation ; +3 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Lobsters | bwjt1b | https://bvisness.me/periodic-oriented-programming/ Read discussion |