Skip to content

kinematics: an empty band is no hand even when min_zones is 0 - #239

Merged
pierre-rouanet merged 1 commit into
pollen-robotics:mainfrom
hadelan:fix/empty-band-min-zones
Sep 9, 2026
Merged

pierre-rouanet merged 1 commit into
pollen-robotics:mainfrom
hadelan:fix/empty-band-min-zones

Conversation

@hadelan

@hadelan hadelan commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Split out from #199.

min_zones = 0 is a legal config value, and it made the length check pass on an empty band — straight into the low-percentile index, which panics on an empty Vec. The check is now floored at one zone.

Comes with a regression test. cargo test -p kinematics and cargo fmt --check are green.

min_zones = 0 is a legal config value, and it makes the length check pass
on an empty band — straight into the low-percentile index below, which
panics on an empty Vec. Floor the check at one zone: no zones is no hand,
whatever the configured floor is.
@pierre-rouanet
pierre-rouanet merged commit 5b8ee31 into pollen-robotics:main Sep 9, 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.

2 participants