Skip to content

feat: compose Q10 maps in a pure renderer#885

Merged
allenporter merged 3 commits into
Python-roborock:mainfrom
tubededentifrice:agent/q10-map-renderer
Jul 19, 2026
Merged

feat: compose Q10 maps in a pure renderer#885
allenporter merged 3 commits into
Python-roborock:mainfrom
tubededentifrice:agent/q10-map-renderer

Conversation

@tubededentifrice

@tubededentifrice tubededentifrice commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Next PR in the #848 split, following #881 and #884. This adds the pure Q10 map-composition layer on top of the merged low-level decoding and cleanup work.

Source lifecycle and API

render_q10_map accepts the three independently updated source snapshots plus static config:

  • Q10MapPacket — latest 01 01 map-protocol response; owns grid layers, header calibration, rooms, and erase zones.
  • Q10TracePacket | None — latest 02 01 trace-protocol response; owns path points, robot position, and heading.
  • Q10MapOverlays — latest decoded restricted-zone and virtual-wall snapshot from DPS.
  • B01Q10MapParserConfig — static parser/render configuration.

It returns one fully composed PNG. Calibration, layers, projected MapData, and drawing state remain internal; there is no separate Q10MapRender data model or alternate draw_path_on_map image path.

Changes

  • Derive calibration internally from the map and trace packets.
  • Apply erase zones before rasterization.
  • Project and draw trace path/position/heading and DPS overlays in one render operation.
  • Keep all calibration, placement, and pixel work out of device traits.
  • Cover the source boundary and observable image behavior directly in map-module tests.

This PR intentionally contains no device-trait, subscription, or CLI orchestration changes. Those remain in the next stacked PR.

Validation

  • Focused map suite — 73 passed
  • pytest -q — 790 passed, 86 snapshots passed
  • pre-commit run --show-diff-on-failure --color=always --all-files — all hooks passed, including ruff and mypy

@tubededentifrice
tubededentifrice force-pushed the agent/q10-map-renderer branch from 303fe71 to 4da996c Compare July 19, 2026 17:13
@allenporter

Copy link
Copy Markdown
Contributor

Thank you for the offline iteration, the new paths look great. Thank you @tubededentifrice for adding these new capabilities!

@allenporter
allenporter merged commit deeb775 into Python-roborock:main Jul 19, 2026
7 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