Skip to content

feat: B01 grid-layer decomposition + Q10 vector overlay decoding#850

Open
tubededentifrice wants to merge 1 commit into
Python-roborock:mainfrom
tubededentifrice:b01-grid-layers-overlays
Open

feat: B01 grid-layer decomposition + Q10 vector overlay decoding#850
tubededentifrice wants to merge 1 commit into
Python-roborock:mainfrom
tubededentifrice:b01-grid-layers-overlays

Conversation

@tubededentifrice

@tubededentifrice tubededentifrice commented Jun 15, 2026

Copy link
Copy Markdown

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-supplied classify callable), render any class or room as a transparent RGBA PNG, and fit a GridCalibration (resolution / origin / y-sign) from a known path with solve_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 passed
  • uv run pre-commit run --files ... — ruff format, ruff, mypy all pass

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.
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