Skip to content

Rasterize layered map updates for faster composition - #4

Merged
SamuelFoo merged 4 commits into
feat/layered-global-mapfrom
feat/rasterize-region-updates
Jul 27, 2026
Merged

Rasterize layered map updates for faster composition#4
SamuelFoo merged 4 commits into
feat/layered-global-mapfrom
feat/rasterize-region-updates

Conversation

@SamuelFoo

@SamuelFoo SamuelFoo commented Jul 27, 2026

Copy link
Copy Markdown
Owner

New feature implementation

Implemented feature

This PR follows up on SamuelFoo/next_gen_prototype#3 by rasterizing region updates when they arrive instead of retaining region geometry and rasterizing it again during every map composition.

The server stores contributions by source, map, update type, and grid cell.

Implementation description

This PR adds:

  • transformation and rasterization of region updates
  • per-source cell contributions with TTL and update ordering
  • preservation of clear-before-obstacle and reset_source behavior
  • removal of expired contributions without re-rasterizing regions
  • invalidation of dynamic cells when static-map geometry changes
  • a bounded FIFO queue for updates received before the static map
  • tests for refresh, expiry, source ordering, geometry changes, and queue limits
  • deterministic reset, rolling-overlap, and rolling-moving benchmarks

Benchmark results

  • Baseline: 4d121ce (feat/replan-obstacle-demo)
  • Candidate: 36c8099 (feat/rasterize-region-updates)
  • Workload: 240 updates × 8 measured rounds, 2 warm-up rounds
  • Input: 90 beams from 2 sources
  • Checksums match
Scenario Revision Throughput (updates/s) Peak RSS (MiB) Checksum
reset Baseline 581.6 6.75 124660162742684993
reset Candidate 498.0 9.25 124660162742684993
rolling-overlap Baseline 34.9 7.16 14420565338181443581
rolling-overlap Candidate 648.9 9.24 14420565338181443581
rolling-moving Baseline 34.7 7.16 8736190734789952998
rolling-moving Candidate 559.6 11.32 8736190734789952998

Run the benchmark scenarios with:

ros2 run rmf_layered_map_server layered_map_benchmark \
  --label candidate --scenario reset

ros2 run rmf_layered_map_server layered_map_benchmark \
  --label candidate --scenario rolling-overlap

ros2 run rmf_layered_map_server layered_map_benchmark \
  --label candidate --scenario rolling-moving

Matching checksums confirm that two revisions produce the same composed maps before their performance results are compared.

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: GPT-5

@arjo129 ready for review!

Store per-source cell contributions instead of retained region geometry. Preserve expiry precedence and discard cells when static map geometry changes.

Signed-off-by: SamuelFoo <fooenzesamuel@gmail.com>
Buffer up to 1024 validated region updates in FIFO order and replay them when the static grid arrives. Drop the oldest update when the queue is full.

Signed-off-by: SamuelFoo <fooenzesamuel@gmail.com>
Replay deterministic reset, overlapping, and moving update traces. Report phase latency, throughput, peak RSS, and a composed-grid checksum for A/B comparisons.

Signed-off-by: SamuelFoo <fooenzesamuel@gmail.com>
Explain cell-based refresh and pre-map queue behavior. Add commands for the three benchmark scenarios and checksum-based A/B comparison.

Signed-off-by: SamuelFoo <fooenzesamuel@gmail.com>
@SamuelFoo
SamuelFoo force-pushed the feat/rasterize-region-updates branch from 36c8099 to ba2eb91 Compare July 27, 2026 21:39
@SamuelFoo
SamuelFoo merged commit 3883286 into feat/layered-global-map Jul 27, 2026
@SamuelFoo
SamuelFoo deleted the feat/rasterize-region-updates branch July 27, 2026 21:41
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