Before the robot is used
Safety: DO NOT RUN BlueNectarStudy on the physical robot, including as a wheels-raised trial. Keep it disabled and do not deploy it. It contains actual motor commands, omits the side/rear wall guard, and cannot be guarded by WallGuardStudy in another OpMode. The 3-inch lens gap is an estimate from a longer-distance calibration, unverified close-up; the front can protrude beyond the lens. Use source inspection, paper traces, and independently supplied stationary evidence only.
Required hardware & dependencies
- Four mecanum drive motors named front_left_drive, front_right_drive, back_left_drive, and back_right_drive; verify each configured name against its physical cable and wheel.
- FTC Robot Controller, Driver Station, secure battery, and a notebook. Motor direction settings are specific to the source and mounting, not universal wiring instructions.
- Source reference only: forward Limelight 3A named limelight with blue color pipeline 0. The rear Logitech camera is not an input to this excerpt.
- Source reference only: four wheel encoders, assumed 115 ticks/inch, and a 2.8-inch blue ball. These constants are not validated by this lesson.
- For learning: printed Blocks, notebook, calculator, and prerecorded or stationary measurement evidence that does not require executing this excerpt.
Source remains BlueNectarStudy.blk, DISABLED study-only. Native dependencies are Limelight 3A named limelight, a blue color pipeline 0, and four drive motors with encoder properties. No helper ZIP is provided. Review screenshots/Blocks and paper traces only; do not enable, deploy, or run this excerpt on the physical robot. The omitted wall guard and unverified close-range calibration cannot be supplied by another OpMode.
Robot setup checklist
- Open the disabled BlueNectarStudy.blk for inspection only. Verify the DISABLED flag, real applyPower writes, and absence of distance-sensor checks; do not change enablement.
- Review native Limelight result and ColorResults Blocks, pipeline 0 contents, contour-area units, Y-pixel band, and the documented single longer-distance calibration. No helper ZIP or deployed guarded program is supplied by this page.
- Mark lens position, assumed radius, robot-front offset, encoder scale, and unverified close-range behavior on a diagram. Do not infer a safe route from a 4.4-inch center estimate.
- Prepare synthetic paper results for age, angle, contour, continuity, loss, encoder-cap, and timeout cases. Treat counter values as loop checks unless distinct image evidence is separately provided.
90-minute teaching sequence
- 0-15 min
Establish the no-run constraint and identify real outputs plus omitted guards.
Look for: Students distinguish this study from read-only WallGuardStudy.
- 15-35 min
Filter result eligibility and contour candidates, then calculate range and gap.
Look for: Strict age boundary, inclusive height band, selected contour not global Ta, estimate not clearance.
- 35-55 min
Trace visibility warmup, centered checks, steering saturation, and continuity.
Look for: First possible fifth centered count at check 9, no frame deduplication, exact lock boundaries.
- 55-75 min
Classify immediate loss zero, grace timeout, edge, encoder cap, movement check, and range branch.
Look for: done is not a universal success flag; max ticks is not an individual-encoder health check.
- 75-90 min
Quiz, clearance diagram, and exit ticket.
Look for: No physical run proposed; close-up accuracy and robot-front clearance remain unverified.
Observation notebook
Paper notebook: frame eligibility, chosen contour, commands, and outcome| Result / contour | seen / tracking match | Estimated range / gap | Left / right request | Reason / caveat |
|---|
| Valid pipeline 0, age 249 ms, area 0.04, Y230 | true if continuity passes | 14.2 / 12.8 in | At tx +5: 0.28 / 0.08 | Model estimate, not measured clearance |
|---|
| Same conditions, age 250 ms | false | Stored numbers may remain | 0 / 0 | Immediate zero; loss timer may start |
|---|
| Cap 1127 ticks reached, range 6 | true | 6 / 4.6 in | 0 / 0 | STOPPED: encoder safety limit |
|---|
| Accepted contour, range <=4.4 | true | Estimated gap <=3 in | 0 / 0 | Estimated completion only; no close-up proof |
|---|
Record source reason text separately from done/abort flags. Note repeated-result risk, lens/front offsets, and missing wall checks. These rows are paper traces, not physical trial instructions.
Troubleshooting · stop before investigating
- No contour is accepted despite blue pixels.
- On paper check validity, age <250, pipeline 0, nonempty contours, Y 215-260, area <=0.75, and chosen area >=0.001. Global Ta is not the range input.
- Centering checks accumulate faster than processed images.
- The source has no frame identity test; repeated under-250-ms results can increment counters. Do not call them verified distinct frames.
- A larger blue patch causes seen to become false.
- Selection picks the largest eligible contour before continuity rejection. Check >12-degree jump and 0.4-2.5 area ratio; there is no smaller-candidate fallback.
- done is true but the reason says STOPPED.
- The encoder cap uses done to terminate. Distinguish this reason from the seen-and-range<=4.4 estimated completion branch.
- One encoder stays zero without the movement check failing.
- MAX of four changes can exceed 5 even with a frozen wheel. This is not a per-wheel health or continuous stall detector.
- The estimated lens gap seems safe for the robot front.
- Reject that inference. The front may protrude beyond the lens, calibration is not close-up validated, and the excerpt must not be run.
Exit ticket & assessment
- State the no-run rule and contrast the two disabled study programs.
- Calculate clipped steering for tx -12 degrees.
- Explain why encoder-cap done is not success and why 4.4 inches is not verified robot clearance.
Assessment: Require correct result/contour gates, steering saturation, continuity boundaries, immediate zero-on-loss, and stop classification. A pass also requires the explicit physical no-run constraint, missing guard, repeated-frame limitation, aggregate-encoder limitation, and unverified lens/front clearance distinction.
Extension challenge: Analyze an independently collected stationary dataset to compare estimated range with tape range at several distances, especially close-up, and quantify lens/front offsets. Do not run, modify, or deploy this excerpt to collect it.
Teacher key · discuss after students predict
Contour and range practice
Age 249 passes, 250 fails. Area 0.04/Y230 wins; 0.16/Y300 and 0.80 exceed height/area limits, and 0.03/Y215 is smaller. Range = 14.2 inches and gap estimate = 12.8 inches.
Steering practice
tx +5 gives c +0.10 and 0.28/0.08; -5 gives -0.10 and 0.08/0.28; +12 and +25 clip to +0.18 and 0.36/0. Source centering rejects exactly 25, while approach steering accepts it.
Continuity practice
12/0.04 and 0/0.25 pass boundaries; 12.1/0.10 and 0/0.251 fail. A failed selected candidate sets seen false with no fallback or last-value update.
Stop practice
Cap is 1127 ticks. Loss commands zero at 2.0 and aborts when elapsed >=0.35; maximum 4 ticks at 1.2 seconds can trigger movement failure if seen and not done/abort. Cap at range 6 is a STOPPED reason. A seen range<=4.4 reports only estimated lens-gap completion.
Center and clearance limits
First four accepted center checks are visibility warmup, so five centered increments can finish at check 9; repeated frames are not excluded. Radius is 1.4 inches, but a robot front beyond the lens reduces real clearance. One longer-distance calibration does not verify this close-up stop.