feat(lab): separate current increment from rolling map
This commit is contained in:
@@ -151,6 +151,52 @@ test("M4.6 binds exact CAMERA and metric 3D evidence to one replay frame", async
|
||||
assert.equal(frame.pointCloudSampleCount, 2);
|
||||
});
|
||||
|
||||
test("M4.6 v2 keeps CURRENT INCREMENT separate from ROLLING MAP", async () => {
|
||||
const frame = await fetchM4ThreatVisual(resultId, 14, {
|
||||
fetcher: async () => new Response(JSON.stringify({
|
||||
schema_version: "missioncore.perception-threat-visual-frame/v2",
|
||||
result_id: resultId,
|
||||
ordinal: 14,
|
||||
sequence: 1880,
|
||||
frame_id: "frame-001880",
|
||||
source_time_ns: 223304857292,
|
||||
point_cloud_body_xyz_m: [[1, 0, 0.1]],
|
||||
point_cloud_source_count: 1652,
|
||||
point_cloud_sample_count: 1652,
|
||||
point_cloud_layer: "current-increment",
|
||||
rolling_map_component_count: 10,
|
||||
metric_obstacles: [{
|
||||
component_id: "rolling-sphere-near",
|
||||
state: "retained",
|
||||
motion: "unknown",
|
||||
centroid_body_xyz_m: [0.76, -0.27, 0.38],
|
||||
cell_centers_body_xyz_m: [[0.52, -0.3, 0.08]],
|
||||
assessment: {
|
||||
component_id: "rolling-sphere-near",
|
||||
decision: "threat",
|
||||
corridor_intersection: "intersects",
|
||||
relative_speed_mps: null,
|
||||
closest_approach_m: 0.1,
|
||||
ttc_seconds: null,
|
||||
reason_codes: ["retained-corridor-intersection"],
|
||||
},
|
||||
}],
|
||||
camera_proposals: [],
|
||||
rig: { length_m: 1, width_m: 0.6, nominal_sensor_height_m: 1.25 },
|
||||
corridor: {
|
||||
forward_length_m: 8,
|
||||
rear_margin_m: 0.5,
|
||||
half_width_m: 0.5,
|
||||
prediction_horizon_seconds: 5,
|
||||
},
|
||||
}), { status: 200 }),
|
||||
});
|
||||
assert.equal(frame.pointCloudLayer, "current-increment");
|
||||
assert.equal(frame.rollingMapComponentCount, 10);
|
||||
assert.equal(frame.metricObstacles[0].state, "retained");
|
||||
assert.equal(frame.metricObstacles[0].assessment.decision, "threat");
|
||||
});
|
||||
|
||||
test("M4.6 full video preserves camera-only unknown and nearest-frame selection", async () => {
|
||||
const overlay = await fetchM4ThreatVideoOverlay(resultId, {
|
||||
fetcher: async () => new Response(JSON.stringify({
|
||||
@@ -198,4 +244,6 @@ test("M4.6 viewer reuses shared video and metric evidence renderers", async () =
|
||||
assert.match(visual, /label: "3D"/);
|
||||
assert.match(videoScene, /<RecordedFmp4Player/);
|
||||
assert.match(metricScene, /OrbitControls/);
|
||||
assert.match(metricScene, /CURRENT INCREMENT/);
|
||||
assert.match(metricScene, /ROLLING MAP/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user