feat: build NODE.DC control station shell

This commit is contained in:
DCCONSTRUCTIONS
2026-07-16 01:20:09 +03:00
parent 8b5b90d8af
commit 6402601d6d
30 changed files with 5296 additions and 1792 deletions
+38 -26
View File
@@ -55,45 +55,57 @@ uv run k1link doctor
uv run pytest
```
## Live console and Foxglove
## NODE.DC Control Station and visualization adapters
Build the browser control surface once, then launch the whole local stand from
the repository root:
The browser application is now a universal NODE.DC Control Station rather than
a K1-specific Foxglove launcher. Its fixed shell contains six architectural
sections — Center, Fleet, Observation, Missions, Data and System — while the K1
BLE/Wi-Fi/live workflow remains isolated as the first real device adapter.
Install, type-check, build and serve the complete local application from the
repository root:
```bash
uv sync --group dev
cd apps/k1-viewer
npm install
npm run typecheck
npm run build
cd ../..
uv run k1link serve
```
Open `http://127.0.0.1:8000`. The API, credential form and Foxglove WebSocket
bind to loopback only. The console supports:
Open `http://127.0.0.1:8000`. The static application, REST/WebSocket control
plane and credential endpoint bind to loopback only. The current K1 adapter
still provides real CoreBluetooth discovery, one operator-triggered reviewed
BLE Wi-Fi provisioning write, read-only MQTT live capture, native `.k1mqtt` and
reviewed-TSV replay, raw-first evidence storage and measured preview metrics.
Physical K1 scanning is still started and stopped by the verified double-click;
the connector publishes no modeling command.
- real CoreBluetooth K1 discovery;
- one operator-triggered reviewed BLE Wi-Fi provisioning write;
- live read-only MQTT capture with raw-first evidence storage;
- replay of native `.k1mqtt` evidence and the reviewed four-column TSV capture;
- `/k1/points`, `/k1/pose`, `/k1/trajectory` and `/k1/metrics` for Foxglove;
- measured Mac-side MQTT-receive-to-Foxglove-publish latency and bounded
latest-wins preview dropping.
The Observation spatial workspace embeds the open-source Rerun Web Viewer
inside the NODE.DC shell. It can open a compatible RRD file over HTTP(S) or a
Rerun gRPC/proxy source such as `rerun+http://127.0.0.1:9876/proxy`. It does not
use an external hosted viewer UI.
For live mode, start the session in the console and use the verified physical
double-click on K1 to start or stop scanning. The connector deliberately does
not publish modeling commands yet. For the recorded proof, replay this ignored
local file at `1x` with loop enabled:
There is one important current boundary: the automatic K1 MQTT → Rerun
RRD/gRPC contract is **not implemented yet**. Starting a K1 live or replay
session updates real state and metrics, but it does not by itself populate the
embedded Rerun viewport. The scene controls for point size, gradients,
accumulation, layers, timeline and layout are presently a product UI contract;
their Rerun Blueprint/playback adapter is also still pending. No synthetic
point cloud, trajectory, camera frame or latency value is generated to conceal
these missing links.
```text
sessions/20260715T122850Z_live_power_cycle/captures/mqtt_scan_full_payloads_03.tsv
```
Foxglove remains the full 3D workspace rather than being reimplemented in the
React console. In its 3D panel, select `/k1/points`, color by `intensity` (or
`z`/`<distance>`) and choose Turbo, Rainbow or a custom gradient. Add
`/k1/trajectory` for the cyan path and `/k1/pose` for the current pose. See the
[live viewer runbook](docs/06_K1_LIVE_VIEWER.md) for timing semantics and current
limitations.
The existing Python MQTT → Foxglove pipeline remains in place as the verified
legacy visualization adapter. It still publishes `/k1/points`, `/k1/pose`,
`/k1/trajectory` and `/k1/metrics`, and preserves the measured
MQTT-receive-to-Foxglove-publish latency plus bounded latest-wins preview
dropping. It is retained for evidence, regression and diagnostics, not as the
target Control Station interface. The historical
[live viewer runbook](docs/06_K1_LIVE_VIEWER.md) records that proven path and its
timing semantics; the current frontend contract is documented in
[`apps/k1-viewer/README.md`](apps/k1-viewer/README.md).
`doctor` is intentionally non-invasive. It checks the local Python environment
and reports external tools; it does not request Bluetooth permission, scan the