-
Notifications
You must be signed in to change notification settings - Fork 1
Subsystems
From a programming perspective, a robot is made up of various subsystems, each being responsible for different tasks. Each subsystem is made up of the following:
- Actuators - Motors, Pistons, etc.*
- Sensors - Encoders, Photoelectric, LIDARS, etc.
- Constants - PID Gains, Starting configurations, etc.
*although, in the context of FRC programming, we talk to controllers like solenoids or motor controllers as opposed to the actual device itself.
When we program subsystems, we usually have to implement three types of methods:
- Getters
- Setters
- Initializers
Getters allow other parts of the code to gain information about the subsystem. Getters are used to determine various properties of the subsystem, such as the value of its sensors and the states of its actuators.
Setters allow other parts of the code to manipulate the subsystem. This could mean telling the actuators to move in one direction or another, zeroing the sensor values, or changing constants.
Initializers usually define sensor properties and calibrate them at the start of the match.
On our robot, there are 5 distinct subsystems that contain the robots functionality:
- Drive - Responsible for moving the chassis of the robot
- Shooter - Responsible for shooting the Power Cell into the goal
- Turret - Responsible for rotating the shooter to point at the goal
- Intake - Responsible for acquiring and serializing (counting + storing) Power Cells
- Vision - Responsible for determining the position of various game elements in reference to the robot's location
Let's now talk about each subsystem in depth.