-
Notifications
You must be signed in to change notification settings - Fork 0
Autonomous
Autonomous opmodes operate without human input. Thus, the actions of our robot will take up different phases throughout the match's autonomous period, such as this series:
- Approach Beacon
- Turn To Beacon
- Drop Climbers
- Face Wall
These phases are entirely linear, however the parts they contain are not. One may need to poll a sensor value thousands of times over in order to reach a wall or beacon. Because of this, each phase is "ticked" until it returns an approval that the phase is complete.
The T10Autonomous
abstract opmode manages the linearity of these phases. A regular autonomous opmode simply registers all the phases, in order, into the queueing system.
#What are phases?
Phases are supercontrollers, AKA controllers which consume multiple smaller controllers if not already consuming organs upfront. For example, the Approach Beacon controller may contain the following controllers:
- Head to wall
- Sweep up blocks
- Avoid collisions
Obviously, these controllers are entirely nonlinear. If another robot suddenly drives in front of us, we're not going to reach the wall for at least a few extra seconds. Additionally, since the primary objective is to Approach the beacon, we want to make sure the Head to wall controller gives us the O.K. (returns a true
tick).
Once we get that objective tick, we can then return true
ourselves, thus ending the phase and moving onto Turn to beacon.