Autonomous Strategies - RobotCasserole1736/RobotCasserole2015 GitHub Wiki
Introduction
To successfully compete during the 15-second autonomous period at the start of the match, the robot must be able to execute one of many possible tasks. The task to complete must be decided before the match start, after consultation with alliance and opposing-alliance members.
Strategies to Implement
In order of increasing complexity:
0. Stand Still
- Simplest strategy
- Event Sequence:
- Wait for Teleop
- Must exist in case of hardware failure, as backup
- Zero possible points
1. Drive forward into Auto Zone
- Given starting location on field
- Event Sequence:
- Drive forward some distance (measured by encoders)
- Wait for Teleop
- Should not drive over scoring platform
- Perform action slowly, as to not slip wheels
2. Drive forward, pushing Tote
- Given (alternate) starting location on field
- Event Sequence:
- Drive Forward some distance (measured by encoders)
- Wait for Teleop
- Should not drive over scoring platform
- Will need to account for possible slippage due to backforce from tote
3. Carry single Recycling Container to Auto Zone
- Given starting position and elevator tabs already under lip of Recycling Container
- Event Sequence:
- Command elevator up by ~three inches
- Wait for elevators up
- Drive forward some distance (measured by encoders)
- Wait for Teleop
- Should not drive over scoring platform
- Action could possibly be combined with mode 2
4. Retrieve two Recycling Containers
- Given starting position near landfill
- Event Sequence:
- Drive forward by some small distance
- Command arms lowered
- Wait for arms lowered and engaged in recycle bins
- Drive in reverse some distance
- Cycle arms up and down, continue to traverse in reverse
- After some number of cycles, command arms up
- Wait some time for arms to raise
- Command 90 degree counterclockwise rotation
- Wait for rotation to complete
- Traverse forward for specific number of inches to reach centerpoint of other two recycle bins
- Command 90 degrees clockwise rotation
- Wait for rotation to complete
- Command forward motion by some number of inches to position for picking up second set of barrels
- Wait for Teleop
- Shooting for simply acquiring all four barrels within a few seconds of teleop starting
5. Retrieve Two Recycling Containers, position for retrieving Two more
- Given starting position near landfill
- Event Sequence:
- Drive forward by some small distance
- Command arms lowered
- Wait for arms lowered and engaged in recycle bins
- Drive in reverse some distance
- Wait for Teleop
6. MegaHardThingWhereWeGetThreeTotes
- Given starting position, facing field left, with elevator positioned over first yellow tote
- Assume teammates are capable of clearing at least the right and middle recycle containers out of the way before we reach them
- Event Sequence:
- Command elevator lowered by some small distance to pick up first tote
- Wait for arms to lower and grasp first tote
- Command elevator up high enough for first tote to clear second tote
- Wait a brief time for tote to be lifted (might be zero)
- Will also be used to account for making sure the first tote is lifted high enough by the time we reach the second tote.
- Will also be used to delay forward motion until teammate has cleared away the rightmost recycle bin
- Linearly ramp up forward speed from zero to high speed, so as not to drop tote
- Ramp rate may be very sharp this first time, since there's only one tote on the stack
- Continue to drive forward at high speed while the elevator continues to lift
- After X distance, drive forward at low speed until LIDAR reads proper distance for picking up second tote
- Command elevator down to pick up second tote from ground
- First tote should be stacked on top of it
- Wait some time for elevator to engage second tote (now a two-tote stack)
- Command elevator up to pick up two-tote stack
- Wait some short time for elevator to lift two-tote stack off ground
- Ramp forward speed to high speed *Will need a slower ramp here, since we've got two totes stacked
- Continue to drive forward at high speed as elevator continues to lift two-tote stack high enough to clear third and final tote.
- After X distance, drive forward at low speed until LIDAR reads proper distance for picking up third tote.
- Command elevator down to pick up third tote from ground
- First two totes should be stacked on top of it
- Wait some time for elevator to engage third tote (now a three-tote stack)
- Command elevator up to pick up three-tote stack, just enough to give about two inches of ground clearance.
- Wait some short time for elevator to lift three-tote stack off ground
- Command 90-degree clockwise rotation
- Wait some short time for the rotation to complete
- Robot should now be pointed toward auto zone.
- Ramp forward speed to high speed
- Even slower this time, since we have a three tote stack
- Continue to drive forward for Y total distance
- Robot's center should now be in the center of the auto-zone.
- Wait a small time to ensure forward motion has stopped.
- Command a rotation counter-clockwise by 90 degrees
- Wait for rotation to complete
- Command elevator to lower three-tote stack to floor
- Wait for totes to be stable on floor
- Command drive in reverse for Z distance at low speed
- Low speed to avoid problems of running into the tote stack
- Distance should be about the length of the totes plus a few inches to ensure we are not in contact with them at all.
- Wait for Teleop