-
Notifications
You must be signed in to change notification settings - Fork 0
Robot Systems
FlashLib recommends of viewing robots as made up of several systems, each able to operate separately, and usually each has a different purpose.
Each system contains the components it uses, such as actuators or sensors, thus allowing it to exist independently. Each exports a certain functionality, matching that system.
The following are examples for systems.
The system which controls the driving mechanism of the robot. This may change depending on the robot structure, but generally this system controls motors and other actuators responsible for moving the robot around.
Such system may export a functionality such as move
to move the robot, or rotate
to rotate it.
A system which controls an elevator. May contain actuators which raise and lower the elevator. In addition, it is possible for this system to control and access sensors related to this system, such as an encoder or other sensors to measure the elevator height and much more.
Such system may export a functionality such as 'lift' or 'lower' and more.
A system is represented as a class which extends com.flash3388.flashlib.robot.scheduling.Subsystem
.
This is largely used with the Scheduling System.
FlashLib provides several interfaces which define the expected behavior of systems. Such interfaces may help defining what control is needed to be implemented for your systems. Those interfaces are located under com.flash3388.flashlib.robot.systems
.
A few interfaces are:
-
com.flash3388.flashlib.robot.systems.drive.TankDrive
- for controlling tank-like driving systems -
com.flash3388.flashlib.robot.systems.drive.OmniDrive
- for controlling omni-directional driving systems
FlashLib also provides several implementations for the provided systems.
These classes each implement a corresponding interface for the system which they control, and extend the Subsystem
class.
Several examples are:
-
com.flash3388.flashlib.robot.systems.drive.TankDriveSystem
- for controlling tank-like driving systems -
com.flash3388.flashlib.robot.systems.drive.OmniDriveSystem
- for controlling omni-directional driving systems