Skip to content

Spencer/simple state cc improvements#143

Merged
spencerhhubert merged 10 commits into
mainfrom
spencer/simple-state-cc-improvements
May 29, 2026
Merged

Spencer/simple state cc improvements#143
spencerhhubert merged 10 commits into
mainfrom
spencer/simple-state-cc-improvements

Conversation

@spencerhhubert

Copy link
Copy Markdown
Contributor

No description provided.

spencerhhubert and others added 4 commits May 26, 2026 17:56
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Groundwork for supporting alternate feeder flows alongside the current
drop-zone-reactive cascade behavior. Adds a FeederMode enum with a single
variant (DROP_ZONE_REACTIVE_REV01) and dispatches state-map construction
through it in FeederStateMachine. No toml field is required — the default
is set in FeederConfig.__init__ and the state machine falls back via
getattr, so existing machine.toml files keep working unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Backend now returns one entry per (fourcc, width, height, fps) from
v4l2-ctl instead of deduplicating to max fps per resolution — so the
UI reflects what the camera actually advertises.

Frontend collapses the resolution and frame rate into a single Mode
selector (e.g. "1280×720 @ 30 fps"), keeping Pixel Format separate.
Selection is constrained to real camera-reported modes only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Before running the rev01 spoke-home, detect any pieces on the channel
using the same bboxesOnChannel() path the runtime state machine uses.
If pieces are present, sweep 360 output degrees at rotate_speed_usteps_per_s
to clear them before the homing procedure runs.

UNTESTED

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sorter-v2-docs Ready Ready Preview, Comment May 26, 2026 11:20pm
sorteros-setup Ready Ready Preview, Comment May 26, 2026 11:20pm

spencerhhubert and others added 5 commits May 26, 2026 19:17
Siloed module + UI that sweeps C-channel pulse params to find the fastest
settings that don't lose the vision track of a piece in transit. Per trial:
pulse C1 to dispense one piece onto C2's tracker, run C2 at the trial's
stress params, and classify the outcome — delivered (reached C3), exited
(reached the exit zone = made it), track_lost (vanished mid-channel = too
fast), no_exit (never left C2 = too gentle). Reaching the exit zone while
tracked counts as immediate success; the sweep continues through all trials
regardless of any single loss.

Work in progress — not yet validated end-to-end on hardware.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… flow (WIP)

feederTrackGidInExitZone now mirrors the regular feeder analyzer instead of
rolling its own track loop: it builds ChannelDetections via
_channelDetectionsFromTracks and applies the same exit test as
analyzeFeederChannels (_bboxExitOverlapRatio > 0 OR bbox-center-crossed).
Drops the bespoke coasting-inclusive iteration.

Work in progress — not yet validated end-to-end on hardware.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Purpose: prevent the firmware/backend stop path from turning an already-stopped stepper into a reverse creep when move_at_speed(0) is issued redundantly.

Includes: firmware handling for zero-speed moveAtSpeed requests and backend guards that skip redundant stop commands when a stepper already reports stopped.

Status: untested on-machine behavior beyond build/flash/health verification.
New compartmentalized feeder mode that replaces pulsing with repeated
"move to angle at max speed, then re-check vision" cycles. When a piece
sits in a channel's exit zone, compute the degrees to carry it past the
exit edge plus an overshoot constant; otherwise advance by a fixed step.
Cascade gating prevents advancing onto an occupied downstream drop zone.

- FeederMode.GO_TO_ANGLE_REV01 + [feeder] mode TOML parse + SM routing
- subsystems/feeder/go_to_angle/: config, geometry, flow
- toml_config get/set + /api/tuning/feeder-go-to-angle endpoints
- frontend tuning page at /tuning/feeder-go-to-angle

Work in progress: geometry and direction sign need live tuning on hardware.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
analyzeFeederChannels takes detections first (no gc); the WIP flow was
passing gc, crashing the feeder loop on entry to FEEDING.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@spencerhhubert spencerhhubert merged commit 8326808 into main May 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant