feat(planning): consolidate recorded-route localization and spatial scene

Preserve the completed teach-and-repeat laboratory stage: reference preparation, cascaded acquisition, local tracking and recovery, recording lifecycle, replay qualification, and persistent Rerun scene controls. Document the open grid-picking regression and Rerun upgrade contract. No autonomous driving or loop-closure optimization is claimed.
This commit is contained in:
DCCONSTRUCTIONS
2026-09-21 08:47:19 +03:00
parent be58d589e2
commit e515ab1b8c
189 changed files with 19074 additions and 758 deletions
@@ -71,8 +71,10 @@ export function runSpatialActiveStreamForceFinish(
export function K1SpatialControlsView({
controller,
spatialActivity,
}: {
controller: XgridsK1Controller;
spatialActivity?: DevicePluginConnectionProps["spatialActivity"];
}) {
const {
state,
@@ -169,6 +171,13 @@ export function K1SpatialControlsView({
busy: false,
}
: k1SpatialPhasePresentation(acquisition, softwareCommanded);
// The workflow may continue the normal acquiring phase only. Calibration,
// recovery, authority failure and stopping always retain device-owned copy.
const presentedPhase = spatialActivity
&& acquisition.state === "acquiring" && dataAuthoritative
&& !physicalStopInFlight && !terminalPhysicalStopRequired && !cleanupPending
&& spatialActivity.sessionId === state.connection_supervisor?.observed.data_plane.session_id
? spatialActivity : phase;
const telemetry = deviceTelemetry(dataAuthoritative ? state.metrics : undefined);
const stopDisabled = pendingAction !== null
|| stopping;
@@ -190,7 +199,7 @@ export function K1SpatialControlsView({
);
const actionFailure = runtimeActionFailure ?? spatialActionFailure(authorityFailure);
return (
<K1SpatialSession phase={phase} telemetry={telemetry}>
<K1SpatialSession phase={presentedPhase} telemetry={telemetry}>
{actionFailure ? (
<div className="xgrids-k1-spatial-controls__error" role="alert">
<strong>{actionFailure.title}</strong>
@@ -240,7 +249,7 @@ export function K1SpatialControlsView({
);
}
export function K1SpatialControls(_props: DevicePluginConnectionProps) {
export function K1SpatialControls(props: DevicePluginConnectionProps) {
const controller = useXgridsK1Controller();
return <K1SpatialControlsView controller={controller} />;
return <K1SpatialControlsView controller={controller} spatialActivity={props.spatialActivity} />;
}
@@ -4,7 +4,7 @@
max-width: 100%;
align-items: center;
gap: 0.85rem;
border: 1px solid rgb(255 255 255 / 0.1);
border: 0;
border-radius: 1rem;
background: rgb(9 10 13 / 0.88);
padding: 0.55rem 0.65rem 0.55rem 0.75rem;
@@ -27,20 +27,16 @@
gap: 0.15rem;
}
.xgrids-k1-spatial-controls__phase strong,
.xgrids-k1-spatial-controls__phase small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.xgrids-k1-spatial-controls__phase strong {
font-size: 0.66rem;
font-size: var(--nodedc-font-size-xs);
}
.xgrids-k1-spatial-controls__phase small {
color: var(--nodedc-text-muted);
font-size: 0.53rem;
font-size: var(--nodedc-font-size-xs);
white-space: normal;
overflow-wrap: anywhere;
line-height: 1.35;
}
.xgrids-k1-spatial-controls__telemetry {
@@ -99,7 +95,6 @@
@media (max-width: 960px) {
.xgrids-k1-spatial-controls {min-width:0}
.xgrids-k1-spatial-controls__phase small,
.xgrids-k1-spatial-controls__telemetry,
.xgrids-k1-spatial-controls__error small {display:none}
}
@@ -96,7 +96,7 @@ export function K1SpatialSession({phase,telemetry,children}:{phase:PhasePresenta
aria-busy={phase.busy}
data-busy={phase.busy ? "true" : undefined}
>
<div className="xgrids-k1-spatial-controls__phase">
<div className="xgrids-k1-spatial-controls__phase" role="status" aria-live="polite" aria-atomic="true">
{phase.busy ? <ActivityIndicator size="compact" /> : null}
<span>
<strong>{phase.label}</strong>
@@ -1105,7 +1105,6 @@ box-sizing: border-box;
min-width: 0;
}
.xgrids-k1-spatial-controls__phase small,
.xgrids-k1-spatial-controls__telemetry,
.xgrids-k1-spatial-controls__error small {
display: none;
@@ -70,6 +70,7 @@
"src/k1link/sessions/camera_frame.py",
"src/k1link/sessions/equipment.py",
"src/k1link/sessions/lab_cache.py",
"src/k1link/sessions/live_planning.py",
"src/k1link/sessions/media.py",
"src/k1link/sessions/models.py",
"src/k1link/sessions/plugin_contract.py",