Files
NODEDC_MISSION_CORE/scripts/build_observation_blueprints.py
DCCONSTRUCTIONS be58d589e2 feat(fleet): add board observation center with live sources and maps
Add adaptive per-vehicle layouts, full-panel dragging, source controls and automatic preview recovery for RealSense, Insta360 X4 and XGRIDS K1 observation views. Integrate cached Cesium map layers through the private NAS gateway link, retain bounded sensor command receipts, and document validation and operational handoff.
2026-09-10 22:12:05 +03:00

28 lines
1.2 KiB
Python

"""Build K1 observation layouts with the repository's pinned Rerun SDK.
These assets contain renderer configuration only, never captured device data.
Run with .venv/bin/python scripts/build_observation_blueprints.py.
"""
from pathlib import Path
import rerun as rr
from rerun import blueprint as rrb
from k1link.viewer.rerun_bridge import _live_time_panel
destination = Path(__file__).resolve().parents[1] / "plugins/xgrids-k1/frontend/src/sensors"
for mode, position, up in (
("3d", [16.0, -16.0, 18.0], [0.0, 0.0, 1.0]),
("plan", [0.0, 0.0, 30.0], [0.0, 1.0, 0.0]),
):
view = rrb.Spatial3DView(
origin="/world", contents=["/world/**"], name="K1 · " + mode,
eye_controls=rrb.EyeControls3D.from_fields(
kind=rrb.Eye3DKind.Orbital, position=position,
look_target=[0.0, 0.0, 0.0], eye_up=up,
tracking_entity="/world/sensor_pose",
),
time_ranges=[rr.VisibleTimeRange("stream_time", start=rr.TimeRangeBoundary.cursor_relative(seconds=-12), end=rr.TimeRangeBoundary.cursor_relative())],
)
rrb.Blueprint(view, _live_time_panel(), auto_layout=False, auto_views=False, collapse_panels=True).save(
"nodedc_mission_core_spatial", destination / f"observation-{mode}.rbl"
)