feat: B01 grid-layer decomposition + Q10 vector overlay decoding#850
Open
tubededentifrice wants to merge 1 commit into
Open
feat: B01 grid-layer decomposition + Q10 vector overlay decoding#850tubededentifrice wants to merge 1 commit into
tubededentifrice wants to merge 1 commit into
Conversation
Two standalone, device-agnostic map-parsing primitives with no dependencies on the rest of the package: - b01_grid_layers: decompose an occupancy grid into background/wall/ per-room floor layers, render each as a transparent PNG, and fit a GridCalibration (resolution/origin) from a known path via solve_calibration(). - b01_q10_overlays: decode Q10 restricted-zone blobs into no-go, no-mop, and virtual-wall overlays. Both are pure transforms (grid/bytes in, structured data out) and are fully covered by self-contained tests that build their inputs inline, so no binary fixtures are needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Splits out the standalone, low-level map-parsing primitives from #848 so they can be reviewed in parallel, without waiting on #846 and #847. Both modules are pure transforms with no dependencies on the rest of the package, and their tests build all inputs inline (no binary fixtures).
This is branched directly off
main— independent of #846/#847/#848. Once it merges, #848 rebases on top and shrinks to the parts that genuinely depend on the Q10 map parser (calibration wiring, parser integration, CLI, Q7 reuse).Changes
roborock/map/b01_grid_layers.py— device-agnostic occupancy-grid decomposition: split a grid into background / wall / per-room floor layers (via a caller-suppliedclassifycallable), render any class or room as a transparent RGBA PNG, and fit aGridCalibration(resolution / origin / y-sign) from a known path withsolve_calibration().roborock/map/b01_q10_overlays.py— decode Q10 restricted-zone blobs into no-go, no-mop, and virtual-wall overlays.Testing
uv run pytest tests/map/test_b01_grid_layers.py tests/map/test_b01_q10_overlays.py— 12 passeduv run pre-commit run --files ...— ruff format, ruff, mypy all pass