Add vector infrastructure maps and persistent location experience
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Urban infrastructure mapping
|
||||
|
||||
Independent offline batch module. It renders a bounded Gaussian tile, runs the
|
||||
pinned Mapillary Mask2Former on perspective views, projects depth-visible ground
|
||||
observations into a metric atlas, and exports closed XYZ contours as JSON and 3D DXF.
|
||||
The orthographic view supplies a height reference and visual inspection image;
|
||||
it is not passed to the street-view semantic model. Model preprocessing is the
|
||||
original downloaded processor configuration.
|
||||
|
||||
## Run on a GPU worker
|
||||
|
||||
Requires Linux containers, NVIDIA Container Toolkit, a CUDA-compatible NVIDIA GPU,
|
||||
Docker Compose with GPU support, and the base CUDA/PyTorch image supplied separately.
|
||||
Qualified on Worker006 (Windows/WSL Docker, RTX4090). On this worker, use
|
||||
`DOCKER_BUILDKIT=0 docker compose build mapper`: its BuildKit image exporter
|
||||
currently fails through a Windows credential helper in SSH sessions; the classic
|
||||
builder completes from the same versioned Dockerfile without changing host settings. No CPU or Mac inference fallback.
|
||||
CUDA kernels target Ada (8.9); rebuild with a suitable architecture for another GPU.
|
||||
Do not schedule alongside a simulation that needs the same GPU.
|
||||
|
||||
1. Build `docker compose build mapper` on the worker. The default base image is
|
||||
`ndc-mission-core-m48t-upstream-parity:1.9.4-cu130`; set `MAPPING_BASE_IMAGE` for a
|
||||
supplied compatible runtime. The accepted base identity is recorded in qualification.
|
||||
2. Set `MAPPING_INPUT`, `MAPPING_MODEL`, `MAPPING_OUTPUT` to absolute worker directories.
|
||||
The first two mounts are read-only. Place the job contract in `MAPPING_OUTPUT/job.json`.
|
||||
3. Run `docker compose run --rm mapper`. Runtime network is disabled. Model files
|
||||
must already be downloaded and checksummed; the container does not fetch weights.
|
||||
4. Run synthetic checks with `docker compose run --rm --entrypoint python3 mapper -m unittest test_mapping`.
|
||||
5. Publish `urban-map.json` using the existing worker bearer credential to
|
||||
`POST /api/v1/ai-polygon/worker/worlds/{world_id}/urban-map`.
|
||||
The API rejects a different world or collider revision. No credentials belong in jobs.
|
||||
|
||||
The job uses schema `missioncore.urban-mapping-job/v1`: source PLY filename/SHA-256,
|
||||
world and collider SHA-256, a rigid `source_to_world` matrix; model repository,
|
||||
revision and per-file SHA-256; XY bounds; optional cell size (default 0.1 m), halo,
|
||||
confidence and observation quorum; one vertical orthographic reference plus
|
||||
perspective cameras with eye/target/up, image size and horizontal field of view.
|
||||
Use scene-local metres with Z up. This is not a georeferenced GIS dataset.
|
||||
Bounds are limited to one million cells, 32 views and 2048 pixels per dimension.
|
||||
Camera placement must be reviewed: an eye inside a building is not a valid survey.
|
||||
|
||||
`--stage render|infer|atlas` supports repeatable phases. Every downstream phase checks
|
||||
camera/source/model identity and input hashes; stale cached frames are rejected.
|
||||
Source code hashes, output hashes and elapsed time are saved in the final receipt.
|
||||
Retain the accepted job, receipts and previews outside Git, in simulation qualification.
|
||||
|
||||
## Interpretation
|
||||
|
||||
The 3D export currently contains ground infrastructure: carriageway, sidewalk,
|
||||
pedestrian/bicycle areas, curbs, curb cuts, parking and markings. Per-view overlays
|
||||
also show the model's building, pole and sign classes; these are not surveyed 3D
|
||||
building footprints or a connected intersection graph. An output format compatible
|
||||
with XYZ polygon features allows future providers without changing the viewer.
|
||||
|
||||
Labels are observations, never route permissions. Gaussian expected depth is
|
||||
approximate and view-dependent. Occluded, low-confidence and conflicting areas
|
||||
remain unknown; vectorization preserves holes and does not bridge gaps. Tiny
|
||||
components below 0.08 square metres are omitted. The 0.1 m cell size is sampling
|
||||
resolution, not a claim of 10 cm survey accuracy. Crosswalk markings can be confused
|
||||
with other road markings. Review coverage and contours before route integration.
|
||||
|
||||
In planning, the infrastructure toggle is independent of Gaussian/collision layers.
|
||||
Contours do not enter picking, collision or rover control. Hiding the layer leaves
|
||||
the original scene and route unchanged. Delete only a map's `latest.json` pointer
|
||||
to unpublish it; immutable previous versions remain available for rollback.
|
||||
Reference in New Issue
Block a user