Visualiser proto contract parity: debug streaming, cluster fields, speed summary rename#334
Visualiser proto contract parity: debug streaming, cluster fields, speed summary rename#334
Conversation
There was a problem hiding this comment.
Pull request overview
Closes remaining Go-side gaps between the LiDAR visualiser’s internal model and the protobuf streaming contract ahead of v0.5.0, covering debug overlay streaming, cluster feature parity, and updated track speed summary semantics (median + percentiles).
Changes:
- Updates
Trackproto schema to rename speed field 24 tomedian_speed_mpsand addsp85_speed_mps/p98_speed_mps. - Extends Go adapter + gRPC serializer to propagate cluster feature fields (
height_p95,intensity_mean,sample_points) and debug overlays (gated byinclude_debug). - Adds/updates Go tests to assert positive end-to-end serialisation for debug overlays, cluster features, and new speed summary fields/percentile helper behaviour.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| proto/velocity_visualiser/v1/visualiser.proto | Renames track speed field to median semantics and adds p85/p98 percentile fields. |
| internal/lidar/visualiser/pb/visualiser_grpc.pb.go | Regenerated gRPC bindings reflecting updated proto. |
| internal/lidar/visualiser/pb/visualiser.pb.go | Regenerated Go proto bindings reflecting renamed/new fields. |
| internal/lidar/visualiser/object_class_conversion_test.go | Updates tests for renamed MedianSpeedMps field usage. |
| internal/lidar/visualiser/model_test.go | Updates model test fixtures for MedianSpeedMps. |
| internal/lidar/visualiser/model.go | Updates canonical Track model to include median/p85/p98 fields. |
| internal/lidar/visualiser/grpc_server_test.go | Adds positive tests for debug overlay serialisation and new cluster/track fields. |
| internal/lidar/visualiser/grpc_server.go | Serialises debug overlays + cluster feature fields + new speed summary fields into proto. |
| internal/lidar/visualiser/adapter_test.go | Adds unit tests for speedPercentiles() and flattenSamplePoints(). |
| internal/lidar/visualiser/adapter.go | Computes median/p85/p98 from speed history; propagates flattened sample points. |
| docs/plans/lidar-visualiser-proto-contract-and-debug-overlay-fixes-plan.md | Marks Go-side phases complete and updates checklist/status. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… and speed summary rename Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
e427ee8 to
8e23c4c
Compare
|
@copilot apply changes based on the comments in this thread fix ci |
…compat and classifier, fix British spelling, eliminate double-copy, update Swift source for proto rename Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
All review comments addressed and the macOS CI failure fixed in 59689c9:
|
|
@copilot fully remove average (mean) fields, no legacy-back compat. this is a breaking change to stabilise the schema for v0.5.x. ensure 98%+ coverage for lines updated in this pr |
…ange for v0.5.x schema stabilisation Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
Co-authored-by: ddol <445312+ddol@users.noreply.github.com>
Removed |
Implements the remaining Go-side gaps in the visualiser protobuf contract before v0.5.0:
FrameBundle.debugwas declared but never serialised, cluster feature fields were dropped during proto conversion, andTrack.avg_speed_mpscarried mean semantics where median/percentile summaries are needed.This is a breaking change for v0.5.x schema stabilisation —
AvgSpeedMpsis fully removed from the visualiserTrackmodel with no VRLOG backward compatibility.Proto schema
avg_speed_mps→median_speed_mpsp85_speed_mps(field 36),p98_speed_mps(field 37)make proto-gen-goDebug overlay serialisation
frameBundleToProto()now mapsFrameBundle.Debug→pb.DebugOverlaySet, gated byStreamRequest.include_debugCluster field parity
height_p95,intensity_mean,sample_points(previously dropped in proto conversion)flattenSamplePoints()converts[][3]float32→ flat[]float32for proto wire formatl4perception.WorldCluster.SamplePointsthrough the adapterSpeed summary computation
speedPercentiles()computes median/p85/p98 fromTrackedObject.SpeedHistory()using floor-index selection (sorts in-place — no extra copy sinceSpeedHistory()already returns a fresh slice)AvgSpeedMpsfully removed from the visualiserTrackmodel —MedianSpeedMpsis the sole central speed measureclassifyOrConvert()usesMedianSpeedMpsas the central speed input for replay classification (documented mapping)Swift source updates
avgSpeedMps→medianSpeedMpsinModels.swiftandVisualiserClient.swiftto match proto field renamep85SpeedMpsandp98SpeedMpsfields to SwiftTrackmodelRunTrack.avgSpeedMps(REST API model) is unchanged — it maps to the storage layer's running averageTests
TestFrameBundleToProto_DebugNotConverted(assertingDebug == nil) with positive round-trip assertionsDebugSerialized,DebugOmittedWhenNilData,ClusterFeatureFields,SpeedSummaryFields,SpeedPercentiles_*,FlattenSamplePoints_*,SortsInPlaceMedianSpeedMpsNot in scope
Swift binding regeneration (Phase D) requires macOS CI — proto stubs are generated at CI time via
make proto-gen-swift.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.