Mechanisms and Subsystems
In this module, we will explore the concept of mechanisms and subsystems in FRC robots. Unlike traditional subsystem-based designs, we will focus on a modular approach that allows for reusable components. This method emphasizes the creation of mechanisms that can be easily integrated into different subsystems, promoting flexibility and efficiency in robot design.
Presentation
Do this lesson in Scriptum
The exercises below are the Mechanisms and Subsystems lesson in Scriptum. Open the lesson, start the simulated robot and follow its README. Each step is checked with the Verify button.
New Java in this lesson: enums and switch, inheritance (extends and @Override), constructors, and lists.
Exercises
Subsystems
- Read the DrivetrainSubsystem: its states, its
switch, and itsgetInstance() - Drive from the subsystem: call
arcadeDrivewith the OI sticks inupdateLogic()
Mechanisms and Subsystems
- Finish the ShooterConstants class
- Add the roller motor configuration and its index duty cycle
- Create a Shooter Subsystem
- Add a flywheel Mechanism
- Add a roller mechanism
- Write the shoot button logic with an
if/else: run the flywheel while the button is held, otherwise let it coast to a stop - Create logic to allow a button press to index
- Update OI to read the shoot and index buttons
- Update the RobotContainer to register your subsystem
Related Documentation
Software
- Mechanisms: Overview of mechanisms in FRC robots (Unique to MARS/WARE).
- Subsystems: Overview of subsystems in FRC robots (Unique to MARS/WARE).