2011:Low-Level Autonomous System
From 1511Wookiee
Jump to navigationJump to search
The low level autonomous code uses the following system that gives high level autonomous a series of tasks to perform, and only need to call methods to start these tasks.
Loop Structure:
- Give New Task Type, Goal, and Method. (call task method once)
- Process Input (call process method)
- Check Current Input Against Goal (call check done method)
- Match:
- More Tasks: Go to 1
- All Tasks Complete: End
- No Match: Go to 2
- Match:
Note: at any time, the loop can be broken by calling a stop method.
List of Current Low Level Methods:
Name |
Input | Description |
Process Action |
Check Done Condition |
Drive_Forward_Distance | Distance to Drive (inches) | Drive forwards the given distance | Set drive motors to drive straight | Encoder ticks indicate distance has been achieved |
Drive_Keep_On_Line | N/A | Drive forward, using optical sensors to maintain path of reflective tape line | Maintain direction, drive forward | Sensors indicate the line has ended |
Drive_Turn_Angle | Angle to turn (degrees from the current angle) | Spin the robot CW the number of degrees provided | Drive motors opposite, power depending on progress | Gyro indicates angle has been reached |
Drive_Turn_Until_Line | Turn right or left | Spin the robot until it senses it is lined up with a tape line | Drive motors in the given direction at a set speed | Sensors indicate the line is now under the robot |