This repository is broken up into three components: the main robot code under src/
, the vision code under vision/src/
, and the models for communication between the robot and vision modules under commons/src/
.
The robot code starts at the LaunchRobot
class, which loads up subsystem configuration from the robot-config.json
file and initializes the CoreRobot
class with instances of hardware interfaces (inside RobotHardware
). CoreRobot
is a cross-platform robot initialization point that makes it possible to run parts of our robot code on local computers. Through Potassium, we are able to support hot-loading of configuration values, which takes place in the LaunchRobot
class as well.
In the CoreRobot
class, we use the given configuration and hardware instances to initialize each of our components. CoreRobot
sets up all button mappings between joystick buttons and tasks to run automated routines. We also set up autonomous routines, which are selected during matches through the driver station software.
Individual subsystem classes are grouped into packages, such as collector.rollers
, which contain a core set of classes for configuration, initialization, and automation. The component class is where our code interacts with hardware interfaces to send out specified commands, and implements subsystem-wide logic such as safeties. Configuration starts in the ...Config
class, which contains instances of ...Ports
(hardware interface ports) and ...Properties
(other configuration such as controller gains). The ...Ports
class is used during initialization to create an instance of the ...Hardware
class, which contains the hardware interfaces to be used by the component. Finally, each subsystem has its own set of tasks, which define automated routines for the robot to run such as shooting fuel at a given target flywheel speed or driving a set distance.