Files
allwpilib/wpilibjExamples/example_projects.bzl
Sam Carlberg ffd371cbf8 [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)
2026-06-21 20:10:53 -07:00

118 lines
2.4 KiB
Python

EXAMPLE_FOLDERS = [
"arcadedrivegamepad",
"armsimulation",
"differentialdrivebot",
"differentialdriveposeestimator",
"drivedistanceoffboard",
"driverstationdisplayansi",
"driverstationdisplaylines",
"dutycycleencoder",
"elevatorexponentialprofile",
"elevatorexponentialsimulation",
"elevatorprofiledpid",
"elevatorsimulation",
"elevatortrapezoidprofile",
"encoder",
"expansionhubsample",
"gettingstarted",
"gyro",
"hatchbotcmdv3",
"hatchbotinlined",
"hatchbottraditional",
"mecanumbot",
"mecanumdrive",
"mecanumdriveposeestimator",
"mechanism2d",
"rapidreactcommandbot",
"rebuiltcmdv3",
"romireference",
"simpledifferentialdrivesimulation",
"statespacearm",
"statespaceelevator",
"statespaceflywheel",
"statespaceflywheelsysid",
"swervebot",
"swervedriveposeestimator",
"sysidroutine",
"tankdrivegamepad",
"unittest",
"xrpreference",
"xrptimed",
]
COMMANDS_V2_FOLDERS = [
"command2",
"emptyclass",
"instantcommand",
"parallelcommandgroup",
"paralleldeadlinegroup",
"parallelracegroup",
"sequentialcommandgroup",
"subsystem2",
]
SNIPPET_FOLDERS = [
"accelerometercollision",
"accelerometerfilter",
"addressableled",
"adxlaccelerometers",
"analogaccelerometer",
"analogencoder",
"analoginput",
"analogpotentiometer",
"apriltagsvision",
"canpdp",
"differentialdrive",
"digitalcommunication",
"digitalinput",
"dutycycleencoder",
"dutycycleinput",
"encoder",
"encoderdrive",
"encoderhoming",
"eventloop",
"flywheelbangbangcontroller",
"httpcamera",
"i2ccommunication",
"intermediatevision",
"limitswitch",
"mecanumdrive",
"motorcontrol",
"onboardimu",
"profiledpidfeedforward",
"quickvision",
"selectcommand",
"solenoid",
]
TEMPLATE_FOLDERS = [
"commandv2",
"commandv2skeleton",
"commandv3",
"commandv3skeleton",
"educational",
"opmode",
"robotbaseskeleton",
"romicommandv2",
"romieducational",
"romitimed",
"timed",
"timedskeleton",
"timeslice",
"timesliceskeleton",
"xrpcommandv2",
"xrpeducational",
"xrptimed",
]
EXAMPLE_TESTS_FOLDERS = [
"armsimulation",
"elevatorsimulation",
"unittest",
]
SNIPPET_TESTS_FOLDERS = [
"digitalcommunication",
"i2ccommunication",
]