---
# System prepended metadata

title: OSM × Sionna RT Radio-Map Demo — Project Brief

---

# OSM × Sionna RT Radio-Map Demo — Project Brief

## Objective

Build a **minimal, GPU-ready** Python demo that:

* downloads a **300 m × 300 m** OSM cutout around a given $(\text{lat},\text{lon})$,
* **extrudes building footprints** into a mesh,
* constructs a **Sionna RT** scene and computes a **path-gain radio map** on a horizontal plane,
* provides an **interactive viewer** where an agent moves via ←/→/↑/↓ and reads the local path-gain (dB).
  (Path-gain radio maps are a first-class feature in Sionna RT; path-loss = −path-gain in dB.) ([NV Labs][1])

## Functional goals

* **Data ingest:** Query OSM for **building** features in a 300 m square centered at the coordinate; keep polygons/multipolygons only. ([osmnx.readthedocs.io][2])
* **Geometry:** Project to a local metric CRS; **extrude** footprints to prisms (use `height` or `building:levels×h_level`, fallback default). Mesh must be watertight. ([trimesh.org][3])
* **Scene & materials:** Load meshes into Sionna RT/Mitsuba, assign **ITU radio materials** (e.g., concrete). ([NV Labs][4])
* **Radio map:** With a single TX at $(0,0,z_\text{tx})$, compute **path-gain** on a plane $z=z_\text{rx}$ over the square; export and display heatmap (dB). ([NV Labs][1])
* **Interaction:** Matplotlib window showing heatmap + agent marker; arrow keys move agent by $\Delta=1\,\mathrm{m}$ (configurable) and update the readout.
* **Performance:** Prefer **CUDA** variant of Mitsuba/DrJit when available; CPU fallback allowed. ([GitHub][5])

## Deliverables

* `demo.py` (single file), `README.md`, `requirements.txt`.
* CLI: `python demo.py --lat <LAT> --lon <LON> [--size 300 --grid 2 --tx_height 10 --rx_height 1.5]`.
* On launch: renders radio-map; agent is controlled by arrow keys; readout shows $(x,y)$ and path-gain in dB.

## Tooling (pin these to recent, stable versions)

* **Sionna RT (≥1.1)** — differentiable radio-propagation RT with **Radio Maps** (path-gain/RSS/SINR). ([NV Labs][4])
* **Mitsuba 3 + DrJit** — backend renderer; use **CUDA** variant if present. ([mitsuba.readthedocs.io][6], [GitHub][5])
* **OSMnx (≥2.0)** — fetch features “around a point” (buildings) from OSM into GeoDataFrames. ([osmnx.readthedocs.io][2])
* **Trimesh** — polygon **extrusion** → triangle mesh. ([trimesh.org][7])
* **Shapely 2 / GeoPandas / PyProj** — geometry, CRS, projections. (Used by OSMnx.) ([osmnx.readthedocs.io][2])
* **Matplotlib** — heatmap + keyboard interaction.

## Acceptance checks

* Given a valid $(\text{lat},\text{lon})$ in a built-up area, the script completes without errors and shows a heatmap within ≤ \~30 s on a CUDA-capable laptop GPU.
* Moving the agent updates the on-screen value and corresponds to the correct cell on the map.
* Exported artifacts: `assets/buildings.ply`, `assets/ground.ply`, and an optional `assets/pg_db.npy`/`png`.

## Notes

* Path-gain is the map’s core metric per Sionna RT; TX power/noise can be layered later to derive RSS/SINR if needed. ([NV Labs][1])
* Keep the repo **KISS**: no Blender, no XML scene files, no web tiles. Use in-code mesh loading and ITU materials to avoid plugin fragility. ([NV Labs][4])

[1]: https://nvlabs.github.io/sionna/rt/tutorials/Introduction.html?utm_source=chatgpt.com "Introduction to Sionna RT - NVlabs"
[2]: https://osmnx.readthedocs.io/en/stable/user-reference.html?utm_source=chatgpt.com "User Reference - OSMnx 2.0.6 documentation"
[3]: https://trimesh.org/?utm_source=chatgpt.com "trimesh 4.7.4 documentation"
[4]: https://nvlabs.github.io/sionna/rt/index.html?utm_source=chatgpt.com "Ray Tracing (RT) — Sionna 1.1.0 documentation - NVlabs"
[5]: https://github.com/mitsuba-renderer/mitsuba3?utm_source=chatgpt.com "Mitsuba 3: A Retargetable Forward and Inverse Renderer"
[6]: https://mitsuba.readthedocs.io/?utm_source=chatgpt.com "Mitsuba 3 - Read the Docs"
[7]: https://trimesh.org/trimesh.creation.html?utm_source=chatgpt.com "trimesh.creation - trimesh 4.7.4 documentation"
