estimating-cut-grid-from-pieces
Estimates a jigsaw's real cut grid (cols x rows) and cell size from the piece count printed on the box, the board's size or the box picture's aspect, and the corner-to-corner side lengths of a few measured pieces (top- down masks with depth scale, corners found as in matching-a-piece-to-placed-neighbours). Every grid with c x r within 10 % of the count is scored against the pieces' sides (with the side pairs mixed both ways unless each piece's turn is known), under one shared scale factor, a prior on how manufacturers round the count and, if given, a full count of edge pieces (2(c + r) - 4). Returns the grid, its posterior confidence and the runner-up. Use before localizing-a-piece-in-a-reference-image or matching-a-piece-to-placed-neighbours, which both take the grid as input, when the real grid has not been counted; CPU only, under 0.1 s plus a few ms per piece.
piece_count intgrid_cols int, grid_rows int, cell_width float, cell_height float, confidence float, runner_up_cols int, runner_up_rows introbot.get_observationExits
What the skill reports when it ends; a policy branches on these.
estimated At least min_pieces (6) pieces were measured, the best grid's posterior probability is at least min_confidence (0.9) and a given edge-piece count agrees with it (within 3 sigma). grid_cols, grid_rows and the cell size are the answer.ambiguous Pieces were measured but the best grid is under min_confidence, or a given edge-piece count disagrees with it; grid_cols / grid_rows are the best guess and `candidates` ranks the alternatives. Give each piece's turn (angle_deg), measure more pieces, or count the edge pieces.insufficient_pieces Fewer than min_pieces usable pieces (the prior-only best guess is still returned), no board size / aspect / reference, a piece count under 4, no camera for measure_view, or the corner skill is not installed; `detail` says which.Scripts
Use it
Take this bundle (and the tools it calls) into a registry for your task, then point your policy generator at it:
git clone https://github.com/runtime-si/RoboSkillHub
cd RoboSkillHub && uv sync
uv run --no-sync roboskillhub search "estimates a jigsaw's real cut grid (cols x rows) and cell…" --why
uv run --no-sync roboskillhub view --bundles estimating-cut-grid-from-pieces --out my_registrySee Get started for searching by task and robot, locking what a policy uses, and fetching it on the robot.