[cmd3] Add example and template projects for commands v3 and make hatchbot example idiomatic (#8887)

The `command3` example project contains a program that could plausibly
play in the 2026 rebuilt game. It includes nested mechanisms (`Intake`
has an inner `IntakeWrist` and `IntakeRoller` and is similar to the v2
superstructure concept), swerve drive with localization and path
following (albeit stubbed for sake of example), opmodes and
opmode-scoped commands, and command-scoped triggers.

The template projects are basic skeletons. The larger template includes
a basic command that just increments and prints a counter variable every
time it runs.

The hatchbot v3 example has been refactored to be more idiomatic:
- `RobotContainer` removed
- "Subsystem" names in packages, comments, and classes has been replaced
with "Mechanism"
- Some v2-specific comments and structures have been reworded or deleted
- The Drive mechanism now provides commands for arcade drive and driving
a distance, instead of exposing public methods that write directly to
hardware (which broke encapsulation and made it possible to issue
conflicting hardware requests)
This commit is contained in:
Sam Carlberg
2026-06-21 23:10:53 -04:00
committed by GitHub
parent 8444a58640
commit ffd371cbf8
35 changed files with 1589 additions and 188 deletions

View File

@@ -10,6 +10,22 @@
"robotclass": "Robot",
"commandversion": 2
},
{
"name": "Commands v3 - REBUILT Robot",
"description": "A robot with a drivetrain, intake, and shooter subsystems controlled by the commands v3 framework",
"tags": [
"Complete Robot",
"Commandv3",
"DataLog",
"Joystick",
"Swerve Drive",
"OpMode"
],
"foldername": "rebuiltcmdv3",
"gradlebase": "java",
"robotclass": "Robot",
"commandversion": 3
},
{
"name": "Encoder",
"description": "View values from a quadrature encoder.",