DEWBOT VI Code Functional Specifications
This page describes the final functional specifications for all of DEWBOT VI's code. Our competition code currently (12-July-2010) preforms to these specifications and is permanently downloaded in both the robot and the spare cRio.
Contents
Key
P#=Priority (number), this code is not tested
D#=Done (number), untested (number indicates debug priority order)
T=Tested individually, but not in consolidated code
W=Working, tested in consolidated code
C=Confirmed in competition (but not in not-yet existent IRI consolidated code)
Pre-Match Routine
Update: As of 11 July 2010, 1-3 happens in autonomous.
The overall routine does not need to be hard coded, just the individual steps. (Though if you're bored...P6.)
1. (C) Calibrate wheels
2. (W) Set wheel angles
- Home zone, n = 1, implies 30° CW (really cool)
- Mid zone, n = 2, implies 9.5° CW (quite possible)
- Away zone, n = 3, implies 0° CW (marginally problematic)
2. (C) Check if kicker is fully armed (cocking arms down, latch closed, limit switch triggered)
- Arm if necessary
- Ensure limit switch triggers
- (P4) If limit switch still does not trigger...
3. (W) Extend Lo bar if necessary
4. (C) Ensure upstream air pressure is 120 psi (minimum xx) and downstream is 60 psi (minimum yy)
Autonomous
(W) Forward-Sensor Mode
Note: This was a stepping stone to ensure we had something if angled autonomous didn't work out. Now it's effectively n=3 in Angled Autonomous.
1. (C) Link up, turn on
2. Prepare robot
- Check that kicker is armed; arm if necessary
- Calibrate wheels
- Set infrared sensors' baselines
- Turn on possessor going inwards?
3. Drive
- Drive forward at xx ft/s (current autonomous speed)
- Read IR sensors
4. Wait for one or both values (or the average of several readings) to change by yy tolerance
- Do not kick until 0.25s after arming.
- If the value doesn't change during autonomous, don't worry.
- (P2) Is there a way to know this didn't happen after the fact? In order to diagnose the issue if and when we don't kick. This could also be helpful in telop (P3). Initial answer (Paul): Theoretically? don't know, maybe. Now? no so much.
5. (C) Fire (unlatch kicker)
- Ignore IR sensor values when the kicker is unlatched
6. (C) Rearm (raise cocking arms, wait for limit switch to trigger, close latch, lower arms)
7. Loop from step 3 to 6 for duration of autonomous
- Need to confirm we won't run into anything.
(W) n-Ball & Angled Drive Autonomous (Default)
Differentiation is based on pre-set wheel angles and robot & ball placement.
1-2. Same as Forward-Sensor. Also in 2:
- Read n switch (specifies number of balls, 1-3, based on starting zone/autonomous plans)
- (W) Set/confirm wheel angles
- Home zone, n = 1, implies 30° CW (really cool)
- Mid zone, n = 2, implies 9.5° CW (quite possible)
- Away zone, n = 3, implies 0° CW (marginally problematic)
3-6. Same as Forward-Sensor
Non-Code: Drive team needs to practice placement of robot and soccer balls.
Note: Tape guides are done. We really don't need to stop kicking after n balls.
(P6) Anti-469
Just an idea...
1-2. Same as Forward-Sensor
2. Move rightward at a 45 degree angle, wedge in the tunnel enough to block to block but not enough to fully cross the line. (Can the line sensors work?)
i.e. Do what the mid zone blue robot does here. (The red robot is 469. Blue still lost, but by much less than most did. 11-14 instead of 18-5, 13-0, 21-0, 26-1...)
--Siri 16:17, 8 July 2010 (UTC)
(P5) Other Nice Versions
- Be able to delay the start of driving (step 3).
(C) Drive Modes
Ability to specify mode.
Crab mode: angle all wheels based on arcade joystick input
Snake mode: angle back and front wheels sets based on dual arcade joystick inputs
Rotate mode: angle wheels to rotate around the front of the robot/ball
Kicker Modes
Ability to specify mode. (4? on Joystick)
(W) Semi-Auto
(default - great!)
- 1. Wait for broken beam and fire inputs
- 2. When one happens...
- Check that kicker is armed and arm if necessary
- Possible Issue: If something triggers the beam break on the bump, the kicker will arm. So maybe don't do this...
- Possible Issue: If something triggers the beam break on the bump, the kicker will arm. So maybe don't do this...
- Check that kicker is armed and arm if necessary
- 3. When the beam breaks...
- 4. When the beam is broken and the driver has pressed fire...
- Wait until at least 0.25s after arming to fire.
- Fire
- Do not read beam break sensor while the kicker is unlatched
- 5. Rearm
(C) Manual Override
- 1. Receive fire input
- 2. Check that kicker is armed, arm if necessary
- 3. Fire
- 4. Rearm
Relax Kicker Routine
- 1. (W) Retract Lo Bar
- 2. (C) Relax Kicker: Raise cocking arms, unlatch kicker, lower arms
Arm Kicker Routine
- 1. (C) Arm Kicker: raise cocking arms, wait for limit switch to trigger, lower cocking arms
- 2. (W) Check that Lo Bar is extended, extend Lo Bar (or only run extension routine when exiting relaxed mode)
Possessor Modes
Indicate possessor status: in/out/off and ball possession: ball/no ball on the dashboard throughout telop.
Default possessor speed: xx f/s
(C) Gather & Hold ball: run inwards at xx f/s
(C) Release ball(s): run outwards
(W) Raise Lo bar manually
(W) Raise Lo bar when kicker relaxes (see kicker modes)
Issues/Questions
What we know but should to write down (preferably here):
- Minimum starting up- and downstream psi
- We need a map of the operator joystick.
- Which way did we settle on for the possessor on the xbox: right=in or left=in?
- Current drive speed in autonomous
What we need to determine
- Possessor speed/use in autonomous (can vary by n switch)
- Desired drive speed in autonomous (can vary by n switch)
- When to stop/do we run into anything?
- Practice robot and ball placement for all three zones.
- Do/when do we want to check the status of the kicker (armed/relaxed), Lo Bar (extended, retracted), wheels (calibration/angles in autonomous), etc? What (processing power, time, etc) does this take?
Answered
- Possessor intake speed/torque. Answer: 3/4 on joystick.
- Possessor holding torque/duty cycle. Answer: None!
- Pre-kicking possessor status (do we need to grip it less?) Answer: Nope.
Item List
Confirmed in Competition
- (Re)Arm kicker
- Calibrate wheels
- Drive modes (crab, snake, rotate)
- Check air pressure
- Fire
- Gather & hold balls (possessor in, need speed)
- Link up, turn on
- Manual (override) kicking
- Relax kicker
- Release ball (run possessor outwards, need speed)
Working in Consolidated Code
- Extend Lo Bar manually
- Retract Lo Bar manually
- Retract Lo bar when kicker relaxes
- Extend Lo bar when kicker relaxes
- Forward-sensor mode
- Semi-auto kicking
- n-ball & angled drive autonomous
- Set wheel angles pre-match
- Ignore n switch after initial reading (ensure a stray ball hitting it does not affect autonomous plans)
Also done: pre-programming code into the spare cRio.
Priority (not done)
- 2. Procedure to know beam break values during autonomous after the match
- 3. Procedure to know beam break values during teleop after the match.
- 4. Procedure if limit switch will not trigger
- 5. Anti-469 autonomous
- 5. Hard-coded pre-match routine
Previous Autonomous Critique (1-June-2010)
Not effective yet. Main points seem to be:
- Sensor for kicking does not seem to be reliable.
- Angles for off-axis shooting need to be checked. They appear to shoot off-field is the robot is aligned to drive along the central ball column. I'll check, but we should test too.
- Keeping in a straight line by blind dead reckoning is often ineffective.
- Keeping the possessor off seems to work better (insofar as something which doesn't work can be said to work better).
- My initial angle calculations for autonomous were incorrect, as observed at (BR)2. My bad. the real angles can be found (with math) in Auto Angles (xls format).
- Without special (BR)2 rules, reasonable autonomous sequences are:
- Autonomous Near Field - choice of either:
- Set ball C2-R1
- Set wheels to 30° CW
- Set robot to drive down C(olumn)2 (use tape guide on robot top for alignment)
- Stop after 1 kick (not critical)
- or:
- Set ball C2-R1
- Set wheels straight with Calibration (delay is beneficial here)
- Set robot to drive through ball towards goal
- Stop after 1 kick (critical)
- Autonomous Mid-Field:
- Set balls at C2-R1 & C2-R2
- Set wheels to 9.5° CW
- Set robot to drive down C2 (using a 2nd guide tape)
- Autonomous Far-Field
- Set balls at C1-R3, C1-R2 & C1-R1
- Set wheels to 0° (mathematically, this is 2.5° CW, but this proves negligible. Or rather it would, if it didn't appear to confuse the bot.)
- Set robot to drive down C1
- Where not specified, wheels should be pre-calibrated, wheel angles pre-set, and kicker pre-armed by tether prior to the match. This requires planning with alliance partners before queuing up for the next match.--Clem 1-June-2010
- As of 11 July 2010, we have to set wheel angles in autonomous because wheels won't retain robot orientation without active PID control.
- As of 11 July 2010, we have to set wheel angles in autonomous because wheels won't retain robot orientation without active PID control.