Disc capacitance sort. Each disc is picked off an IN stack, inspected
at the vertical camera station, placed on the anode, inspected by the
robot camera, clamped by the cathode, its capacitance read on the
BK 879B (capacitance and dissipation factor D — the meter open / short
calibrated at the start of the run when calibrate_meter is on (off by
default), by the operator, while the run lowers the cathode on the bare
anode), then dropped into a PASS
or FAIL holder by the run's measurement window (c_min_nf..c_max_nf,
d_max; Sort in actions.py). A FLAT BT project: one disc
through the bench at a time, ROUTE at the bottom of actions.py.
Both cameras run one flow (_inspect): the detector finds the disc.
On the station camera the disc's edge is then found on its box, through
the yellow band (vision/disc_ring.yaml), and must be unchipped: its
edge's deepest dent no deeper than the run's ring_chip sensitivity
(a chip is a notch in the band). The band's inner edge is
found too, and the two must be concentric — the run's ring_offset
sensitivity. The robot camera measures its thin band's two circles too
(vision/disc_ring_top.yaml, ring) and judges them concentric by the
same ring_offset — no chip check there: from the top the chipped
discs' edges read whole. Last, the classifier judges the disc's masked face — a circle
10 px inside the band's inner edge (the face's own edge, both cameras),
grey outside — cut exactly as its training crops were
(vision/disc_cls.yaml, the face model disc_cls.pkl). Chip and concentric have an Ignore too: an ignored
check is skipped, and the circles are looked for only while a check
uses them. Every disc's measured dent, offset and
edge ÷ box ratio are in the records sheet, and the pendant's Last
inspection card shows the latest verdict on its own frame — the
detector's box, the two circles, a close-up of the edge's deepest dent, the face the classifier sees — the
frame held in memory by the runtime (rt.asset). A disc a camera fails also
keeps its card — the disc's square at 800 px and its numbers — in
records/<run>/fails/ (docs/out-holders.md) when the run's
save_fail_pictures is on (off by default). How sure the classifier must
be is the run's
classifier setting on the setup screen — how sure the model must be
that a disc is bad before it fails it: low (over 70 %), medium (over
50 %, the model's own call), high (over 40 %), or ignore (no
classifier at all — the detector still has to see a disc, the
capacitance reading alone sorts). A fail at either camera does not stop
the disc: every disc the bottom camera sees goes the full round — both
cameras, then the reading — and lands by everything that failed it. A
disc the bottom camera does not see goes straight to the fail column,
uncounted (the suction is never released mid-way); one the top camera
does not see on the anode is not measured.
The anode is never trusted empty: ClearAnode images it at run start
and after any pick that left a disc behind, blows it off from the
anode's blow anchor and looks again, one action run per attempt, and
pauses for the operator after ClearAnode.MAX_BLOWS blows of
ClearAnode.BLOW["seconds"]. After every pick off the anode,
CheckAnode looks once more; a disc still there makes the one in the
hand a stuck fail. No disc is picked while the anode holds one (Pick
needs anode_clear, as PlaceAnode does): the blow-off needs the hand
empty. A pass lands where it was picked, mirrored: In 2 A3 → Pass 2
A3 (_lane). The fail holder is lanes (LANES): A1–A2 a camera
(visual) fail, A3–A4 a reading outside the window, A5–A6 both, A7 stuck. Two "no disc"
verdicts in a row from one IN position (EMPTY_RUN_ENDS_COLUMN) end
that position: its remaining discs are voided, the run moves on. These
three are parameters at the top of actions.py and on ClearAnode.
apc/
├── main.py # canonical entry point — byte-identical to examples/*/main.py
├── launch.yaml # project_name, port, scene, recipes, actions, checks, hmi pointers (default/setup/pendant/replan), core_dir, records/replays/uploads/counts, folders
├── actions.py # predicates, setup(), Start → per-disc chain → Park, ROUTE
├── checks.py # vision / sensor checks (empty)
├── recipes.j2 # holders, stations, meter — recipe aliases + solved ref_joints
├── hmi/
│ ├── default.j2 # the kwargs: in_1 / in_2, one list of 7 per IN holder
│ ├── setup.js # run-setup screen, two steps — Bench (click each IN position full / empty), Final checks
│ ├── pendant.js # during-run screen — holders, tally, last reading
│ └── replan.js # the Replan choice on the bench — choose stack positions (every disc in them leaves), clear the bench, confirm
├── scene/
│ ├── core_500.j2 # chassis
│ ├── layout.j2 # holders, anode/cathode, cameras, meter
│ ├── calibration.j2 # layout.j2 with the probe rod mounted (calibrate.ipynb)
│ ├── bench.j2 # THIS unit: sim flags, rail offset, IPs, camera serials, meter port (git-ignored)
│ └── bench.example.j2 # the committed template for bench.j2 — copy, fill in
├── components/ # one folder per component: anode/, cathode/ — class + .glb together
├── vision/ # the detections: a config per model, the model beside it (below)
├── dev/camera/ # camera bring-up notebook
├── core/ # this bench: calibration, caches, motion book (git-ignored)
├── records/ # one folder per run: records.jsonl, records.csv — the per-disc sheet; fails/ — each visual fail's card (git-ignored)
├── replays/ # replay recordings (git-ignored)
├── uploads/ # operator input files — a file parameter's Open (git-ignored)
├── captures/ # the detections' pictures, one file per run per detection (git-ignored; saving off for now)
├── counts/ # rt.count's totals across every run — counts.json (git-ignored)
├── log/ # the project's console — workspace.log, written by the orchestrator (git-ignored)
└── docs/ # the bench's sheets (LCR meter startup, out holders — which position holds what) — source, a read-only Docs tab
The last six are data folders, never source: records:, replays:,
uploads: and counts: in launch.yaml say where the platform writes,
captures/ is where the detections' client_save_* paths point,
log/ is where the orchestrator keeps the project's console, and
folders: lists all six as file-browser tabs (Log read-only), plus
docs/ — source, not data — as a read-only Docs tab: a markdown sheet
renders in the pane, a PDF opens in it. The
orchestrator creates them at launch. Counted across runs (rt.count): disc.picked,
inspect.bottom / inspect.top (pass, fail, empty, read_failed),
measure (n, unavailable), disc.sorted (n = every disc processed to
the end, good, bad), disc.removed, run (completed, operator_park).
Each trained model sits beside the config that names it, checked in with
the project like the CAD: they are bench assets, not operator uploads.
A config's paths resolve against vision/ itself (vision-guide §5
"Config files"): the model beside it, the pictures in
../captures/<config name>/ (display.client_save_*, written on this
machine, one file per run per detection — every save is OFF, no image
is kept; label: 1 only draws on the live view); a key for a vlm config
goes beside it as *.key, git-ignored. vision/ is not a file-browser
tab.
| config | model | type | for |
|---|---|---|---|
disc_od.yaml |
disc.pkl |
od — disc detector, 416 px, int8 |
finding the disc in a station frame |
disc_ring.yaml |
— | elp on the yellow band (colour mask, the edge's dent) |
the station camera's circles: chip, concentric |
disc_ring_top.yaml |
— | ring — the thin band's two edges along rays |
the robot camera's circles: concentric, no chip |
disc_cls.yaml |
disc_cls.pkl — the face model, 640 px, int8 |
cls — pass / fail on the masked face |
the visual verdict, both cameras, last — drop the new weights here |
recipes.j2 registers six detections — bottom_od / bottom_ring /
bottom_cls on the station camera, top_od / top_ring / top_cls
on the robot camera — one Inspector recipe each. Each detection is
detection_preset: {config: vision/disc_od.yaml} — a relative path is
relative to the file it is written in: config: to recipes.j2, the
paths inside the config to vision/; the client ships the model's bytes to the vision unit at
register time (vision-guide §5).
Training: ~/Downloads/vision/training_notebooks/.
cd ~/Downloads/projects/apc && sudo python3 main.py # UI at :5010
cd ~/Downloads/workspace/workspace && sudo python3 -m workspace.bt.replay ~/Downloads/projects/apc --batch 1 --kw in_1=1,0,0,0,0,0,0A full IN position is stack_size discs — the one number in
hmi/default.j2, read by setup() and by the setup screen alike — so
the replay above plans one stack. The audit row per disc (rt.record) is seeded by
Create, filled by Measure and Sort, and closed with status at
Park; the platform caps records at 10 000 items per run.
Manual setup for the LCR meter before remote use:
- Hold power to turn on the meter.
- Hold the middle-right UTIL button until the utility menu appears.
- Menu opens on the beep option — press the down arrow to turn beep off.
- Press UTIL to cycle through the menu until you reach AoFF (auto-off).
- Press the down arrow until it reads OFF.
- Press the bottom-left L/C/R/Z button to return to the main menu.
- Verify there is a C in the top-left corner. If not, press L/C/R/Z until it cycles to C.
- Press the top-middle USB button — RMT should flash in the bottom-right of the screen. The meter is now in remote mode.