Skip to content
BoKSA

Autonomous Vehicle Performance Reports

Autonomous Vehicle Performance Reports

Picture the roads on your Learning Group's city tiles. An embedded classmate has built an autonomous city car that follows a route through town, or a small bus, lorry, or crane that moves loads from one place to another on its own. You watch it drive: it goes straight down tile 1, turns left at the bend on tile 5, and on the way it keeps making small corrections to stay on track. Some corrections are tiny and expected. Others are large, frequent, or come at the same spot every run. Is the vehicle getting better or worse after the last firmware change? Does it drive straight lines well but struggle in bends? Where in the city does it need the most corrections? Today nobody can answer, because the vehicle's data scrolls past in a serial monitor and is gone.

In this challenge you design and build the full-stack side that turns that stream into performance reports. The vehicle (or crane) reports its intended state, for example "driving straight", "turning left", or "lifting", and every correction it needs to keep on track, with the reason and the size of the correction. Your back-end receives these messages, stores them per run, and computes performance metrics. Your front-end offers several reports that the Learning Group uses to judge and improve the vehicle: one run in detail, straight versus turning, run-to-run comparison, and safety and data quality. You work through research, advice, design, and realisation for your Sprint 3-4 Learning Goal. Follow the city Requirements. Evidence is individual, even though you integrate in the Learning Group.

Your Learning Goal title in Portflow

Use: Sprint 3-4 - Learning Goal - Autonomous Vehicle Performance Reports (adjust the sprint number if needed). See the Learning Goal page for the Portflow template.

Illustration

The animation shows one run in simplified form. The grey road is the intended path: first straight, then a left turn. The orange dotted line is what the vehicle actually drives. Each red circle is a correction that the vehicle reports, together with its intended state at that moment. The report panel counts the corrections per intended state while the run is in progress. At the end of the run the data is complete and the reports can be produced. The numbers in the animation are illustrative. Your reports show the real runs of your city's vehicle.

Run report (live) intended state: STRAIGHT intended state: TURN LEFT run complete → reports ready straight turn left grey = intended path · orange = actual path · red circle = reported correction

Challenge

Your Learning Group needs to know how well its autonomous vehicle performs, and whether it improves. The vehicle can be a car, bus, or lorry on the city roads (see Autonomous City Car) or a crane or arm that moves loads (see Robotic System). In both cases the embedded side already has a control loop and a fail-safe stop, and it exposes status and commands to full-stack. In this challenge you agree an extended message contract with the embedded side: the vehicle reports what it intends to do and every correction it makes to stay on track. You build the city's ingest, storage, report API, and report pages for that data, in the city's one shared back-end and one shared front-end on the city Pi.

You will deliver a working prototype and the documents that justify and explain it. Work in this order:

  1. Understand the problem. Which vehicle(s) does your city have, and which intended states do they know? Talk to the embedded classmate and to the people who will use the reports (the embedded developer tuning the controller, the Learning Group judging the demo, the coach). Find out which questions they want answered, for example: "Does the car need more corrections in bends than on straight roads?", "Did version 1.4 of the controller drive better than 1.3?", "Where in the city does the crane overshoot?" Write each question down; each report must answer at least one.
  2. Research. Compare realistic options for: how the vehicle should report intended state and corrections (event per correction vs periodic samples vs both; MQTT topics and payload format; sequence numbers and timestamps); how to store run data (relational tables, a time series database, or both) so reports stay fast; which performance metrics are meaningful for path following and for a crane (correction rate, correction magnitude, deviation, time in tolerance, settling time, overshoot), with sources from control engineering or autonomous-vehicle evaluation; and how to build reports in the front-end (chart library, server-side aggregation, export). Keep it short: enough to choose and to define the metrics, not a survey of every chart library.
  3. Advise. Recommend one message contract, one storage approach, one set of metric definitions, and the set of reports the city should have. State what you are not building in this period. Hosting on the city Raspberry Pi is already decided.
  4. Design. Specify the message contract (with the embedded side), the data model, the metric definitions as formulas, the report API, the report pages (wireframes), the fail-state for missing data, and the test plan. Write it so a classmate could add a fifth report without asking you how the data works.
  5. Realise. Build in small steps: first a vehicle simulator that publishes the agreed contract, then ingest and storage, then the metric calculations with tests against a known dataset, then the reports one by one. Connect the real vehicle as soon as it can publish; do not wait for it. Commit everything to the city GitLab project on main.

What the vehicle reports

The contract is yours to agree with the embedded side. This is a starting point, not the answer. The vehicle reports at least three kinds of messages, all tagged with a run id and a sequence number:

  • Run lifecycle: run_start (vehicle, route or job, firmware version, controller version and parameters) and run_end (result: completed, aborted, fail-safe stop).
  • Intended state changes: the vehicle tells what it is trying to do from now on, for example straight, turn_left, turn_right, stop, or for a crane lift, slew, lower, place. Optionally with a target, such as the route segment, the target heading, or the target joint angle.
  • Corrections: every time the controller corrects, the vehicle reports what it corrected (steering, throttle, brake, joint), how much (magnitude and unit), why (for example lateral_drift, heading_error, overshoot, sway), and the error it saw at that moment (for example lateral deviation in mm or heading error in degrees), together with its current intended state.

Example correction message (MQTT topic city/<city>/vehicles/<vehicle-id>/corrections):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "schema": 1,
  "vehicleId": "car-02",
  "runId": "2026-11-17T10:42:05Z-car-02",
  "seq": 418,
  "ts": "2026-11-17T10:42:31.284Z",
  "intendedState": "turn_left",
  "segment": "tile-5-bend",
  "correction": { "actuator": "steering", "magnitude": -6.5, "unit": "deg", "reason": "overshoot" },
  "error": { "lateralMm": 14, "headingDeg": 7.2 }
}

The same idea works for every vehicle type. Agree the vocabulary for your vehicle:

Vehicle Example intended states Example corrections and errors
Car, bus, lorry straight, turn_left, turn_right, stop, dock (bus stop, loading bay) steering, throttle, brake; lateral deviation, heading error, stop-position error
Crane or arm lift, slew, lower, place, home joint angle, speed, sway damping; position error, overshoot, sway amplitude

Minimum scope (Sprint 3–4)

Your contribution must include:

  • A message contract, agreed with the embedded side (or with your coach if no embedded classmate builds a vehicle), documented with topics, fields, units, and examples, for: run start and end, intended state changes, corrections, and fail-safe or override events. Every message has a run id, a sequence number, a timestamp, and a schema version.
  • A vehicle simulator in the city repo that publishes runs following the contract, with configurable behaviour (for example "drives straight well, overshoots in bends", "more corrections after a version change", "loses the link halfway"), so you can develop and demo every report without the real vehicle. Committed recorded runs from the real vehicle count as well, once they exist.
  • Ingest in the city's shared back-end: messages are validated against the contract, invalid messages are rejected and logged (not silently stored), and valid messages are stored with metadata.
  • A normalised data model for vehicles, runs, intended-state intervals, corrections, and events, so that every correction can be linked to the run, the intended state, and the route segment or job it belongs to.
  • Metric definitions written as formulas in your design and implemented in the back-end, at least:
    • correction rate per intended state (corrections per metre, per second, or per manoeuvre; you define which)
    • correction magnitude per intended state (mean and p95)
    • error per intended state (for example lateral deviation or position error: mean, p95, max)
    • time in tolerance: percentage of the run time in which the reported error stays within an agreed tolerance
  • A report API (REST) that returns the aggregated data per report, with filters for at least vehicle, run or date range, and firmware/controller version. Aggregation happens on the server, not by sending every raw row to the browser.
  • At least four reports in the city's shared front-end:
    1. Run report: one run on a timeline: intended states as coloured bands, corrections and errors plotted on top, fail-safe events marked, and a summary (duration, result, number of corrections, time in tolerance).
    2. Manoeuvre report: performance per intended state across the selected runs, for example straight vs turning: correction rate, magnitude, error, and time in tolerance side by side. This report answers "where does the vehicle struggle?".
    3. Comparison report: two or more runs, or two firmware/controller versions, side by side, with the difference per metric and a clear better / worse indication. This report answers "did the change help?".
    4. Safety and data-quality report: fail-safe stops, overrides, aborted runs, link losses, and data completeness per run (missing sequence numbers, runs without run_end).
  • Each report shows which data it is based on (vehicle, runs, period, versions, number of messages) and links to the metric definitions, so a reader can trust and reproduce the numbers.
  • A fail-state for missing data: a run without messages for longer than an agreed time is marked interrupted; incomplete runs are flagged in every report and excluded from averages unless the user chooses to include them. "No corrections reported" must never look the same as "no data received".
  • Automated tests for the metric calculations against a small known dataset (fixture run) with hand-calculated expected values.
  • Decisions, contract, metric definitions, and a short "how to add a report" how-to in English Markdown (city MkDocs / repo), with references.

If you have time, add one or more of:

  • Location report: corrections and errors per tile or route segment, drawn on a simple top view of the city tiles (a grid of the five tile types, not a real map).
  • Live view: the run report updating while the vehicle drives (WebSocket or Server-Sent Events).
  • Export: a report as PDF or CSV, or a shareable link that reopens the report with the same filters.
  • Settling time and overshoot after each turn or crane movement: how long until the error is back within tolerance.
  • Regression warning: the comparison report automatically flags a metric that got worse by more than an agreed threshold after a new version.
  • Replay: step through a run message by message, synchronised with a video recorded by the embedded side.
  • Second vehicle type: the same reports for a car and a crane, driven by the vocabulary in the contract rather than by hard-coded state names.

Out of scope for this challenge

These are not part of this challenge:

  • Building or tuning the autonomy itself: perception, control loop, and firmware are embedded work. You use what the vehicle reports. You may advise the embedded side based on your reports.
  • Controlling the vehicle from the reports. The city's existing override stays where it is; reports are read-only.
  • Machine learning, anomaly detection, or predictions on the run data. Clear metrics and good reports are the task.
  • Real maps, GPS, or 3D visualisation of the city. A schematic of the tiles is enough.
  • A BI or dashboard tool (for example Grafana or Metabase) as the reports. You may use one for your own monitoring, but the reports live in the city's own front-end with your own report API.
  • A separate private stack. Reports, API, and ingest are part of the city's shared back-end and front-end.

Demo and safety context

Treat the vehicle data as evidence that people make decisions on:

  • Default to "incomplete". When the vehicle stops reporting, the run is shown as interrupted, not as a perfect run with zero corrections. Gaps in the data are visible in every report.
  • Reject, do not guess. Messages with an unknown schema version, missing run id, or impossible values (for example a negative timestamp jump or an unknown intended state) are rejected and counted, not repaired silently.
  • Do not disturb the vehicle. Your ingest only subscribes; it never publishes commands. A crashing report must not affect the vehicle's control loop or the city's override path.
  • Keep demo data apart. Simulated runs are marked as simulated and can be filtered out, so they never mix with real runs in a comparison.
  • Clear demo script. Anyone in your Learning Group can show: "start a simulated run → the run report fills in", "open the manoeuvre report → turns need more corrections than straight lines", "compare two controller versions → the better one is marked", "stop the simulator halfway → the run is marked interrupted and the data-quality report shows the gap", and, when available, "the same reports for a run of the real vehicle".

Starting points

Use these concrete first steps early in Sprint 3:

  1. Read the city Requirements and agree your challenge with the Learning Group (no duplicate challenges). Find out who works on Autonomous City Car, Robotic System, or another vehicle, and who owns the shared back-end and front-end (for example the City Sensor Dashboard).
  2. Interview the report users. Ask the embedded classmate and your coach which questions they want answered about the vehicle. Write the top five questions down.
  3. Draft the contract together. Sit with the embedded classmate for one hour: list the intended states and the corrections their controller already knows. Write one example message of each kind.
  4. Hello simulator. Write a small script that publishes one run of fifty messages to a local MQTT broker: run start, a straight section with a few corrections, a turn with more corrections, run end.
  5. Hello report. Store that run and draw one chart: corrections per intended state. Check the numbers by hand.
  6. Define "on track". Agree the tolerance with the embedded side, for example "lateral deviation ≤ 10 mm" or "crane position error ≤ 5 mm". Your time-in-tolerance metric depends on it.
  7. Draft your research question. Example: Which message contract, metrics, and report set let the Learning Group judge and improve the path-following performance of the city's autonomous vehicle, separately for straight driving and turning?
  8. Create your Learning Goal in Portflow. Link the product deliverables you plan to submit. Follow Learning Goal.

Suggested sprint timeline

The Learning Group does not use Scrum, but you still follow the sprint rhythm of the Group Project: two sprints for this challenge (Sprint 3-4).

In the first sprint you focus on research and advice: the report questions, the contract, the metrics, and a simulator with a first report as experiments. In the second sprint you focus on design and realisation of the full set of reports, the fail-state, the tests, and the connection to the real vehicle.

Sprint Focus Outcome
3 Research & advise (+ early experiments) Research report; advisory report; report questions from users; message contract agreed with the embedded side; metric definitions and tolerance; simulator publishing runs; ingest and storage of one run; first report (run report) working
4 Design & realisation (all reports) Design (contract, data model, metric formulas, report API, wireframes, fail-state); manoeuvre, comparison, and safety/data-quality reports; tests on the fixture run; real vehicle (or recorded real runs) connected; demo; Portflow evidence linked; reflection

Tools, frameworks, and hardware

Area Suggestions
Host City Raspberry Pi (server room, 6th floor WBH) running the shared back-end and front-end in Docker
Vehicle link The city's MQTT broker (for example Mosquitto); topics per vehicle; JSON payloads with a JSON Schema for validation
Simulator Python (paho-mqtt) or Node (mqtt) script with scenario files; replay of recorded real runs
Back-end The city's back-end stack (for example Node/Express, NestJS, Spring Boot, FastAPI); schema validation (Ajv, Zod, Pydantic, Jakarta Validation)
Storage The city's database: PostgreSQL or MariaDB with window functions and views for the aggregations; optionally a time series database for the raw samples
Front-end The city's front-end framework; chart library such as Chart.js, ECharts, Recharts, or D3: justify in research
Testing Unit tests for metrics on a fixture run; API tests per report endpoint; a contract test that the simulator and the validator agree
Documentation English Markdown on city MkDocs + repo; cite sources for metrics and decisions

Profile knowledge worth revisiting:

Products

Your challenge evidence is a set of products: studio deliverables tied to learning outcomes. Submit them in Portflow and link them from your Learning Goal.

Analyse & Advise

Product What you deliver Template
Research Short analysis of the report questions of the users; options for the message contract (events vs samples, topics, payload); storage for run data; performance metrics for path following and crane movement with sources; chart and report options for the front-end; comparison with criteria Research product
Advice Decision document for the Learning Group: the contract to adopt with the embedded side, the storage approach, the metric definitions and tolerance, the set of reports and the question each answers, the fail-state for missing data, and implementation order (simulator → ingest → metrics → reports → real vehicle). Pi hosting in the server room is given. Advisory report

Suggested titles for Portflow

  • Research: Measuring and reporting the path-following performance of an autonomous city vehicle
  • Advice: Message contract, metrics, and report set for autonomous vehicle performance

The advice report should build on the research report. Do not repeat the full comparison tables; refer to them and summarise. If the research grows into a study of autonomous driving in general, it is too big. Cut it so you still build the reports.

Design & Realise

Deliver two products for Design & Realise. The Design Document sets the requirements. The Realisation Document proves each requirement is built. Copy those templates. The lists below are what this challenge adds inside those two documents. Submit both in Portflow and link them from your Learning Goal.

Product What you deliver Template
Design Document In the Design Document, cover: context, city Requirements link-in, report questions from users, architecture (vehicle or simulator → broker → ingest → database → report API → report pages), message contract, data model, metric formulas and tolerance, report API, wireframes of the four reports, fail-state for missing and invalid data, and test plan Design Document
Realisation Document Prove each requirement with the simulator, ingest, report API, and four reports running in the city Compose stack on the city Raspberry Pi, code on city GitLab main, tests on the fixture run, and validation evidence: screenshots or video of each report for simulated and (when available) real runs, the interrupted-run fail-state, and rejected invalid messages Realisation Document

Suggested titles for Portflow

  • Design: Autonomous Vehicle Performance Reports — contract, metrics, and report design
  • Realisation: Autonomous Vehicle Performance Reports — reports prototype and validation

Design Document — what to specify

Put the items below in your Design Document as requirements, or as a diagram a requirement points to. A peer should be able to add a report or connect a new vehicle without guessing:

  • Requirements. The report questions from the users, each traced to the report that answers it; at least one requirement from the end user (for example the embedded developer who tunes the controller).
  • Architecture. Vehicle or simulator, broker, ingest service, database, report API, front-end; where each runs; the protocol at each boundary.
  • Message contract. Topics, message types, fields, units, allowed intended states and correction reasons, schema version, and one example per type. Agreed with (and signed off by) the embedded side.
  • Data model. Vehicles, runs, intended-state intervals, corrections, events; keys and indexes; how a correction is linked to its intended state and segment.
  • Metric definitions. Each metric as a formula with units, the tolerance, and which runs count (completed only, or all).
  • Report API. Endpoints per report, filters, response format, and an example response.
  • Report pages. Wireframes of the four reports, the filters, how the data basis is shown, and how incomplete runs are marked.
  • Fail-state. Interrupted-run timeout, handling of gaps in sequence numbers, rejected messages, and how each is shown.
  • Test plan. For example: "fixture run → correction rate on straight = 0.20 /m as calculated by hand", "message with unknown intended state → rejected and counted", "simulator stops halfway → run marked interrupted after 10 s", "compare v1.3 and v1.4 → the version with the higher time in tolerance is marked better", "simulated runs filtered out → only real runs in the comparison".

Realisation Document — what to prove

For each requirement, the Realisation Document needs proof it was engineered. For this challenge, include:

  • The simulator, ingest, data model (migrations or init scripts), report API, and report pages on city GitLab main, running in the shared Compose stack on the city Pi.
  • The contract document and the validation schema, and evidence that the embedded side agreed it (for example a merge request review or a signed-off page).
  • The fixture run and the automated tests that check every metric against hand-calculated values, with the test output.
  • Screenshots or a short video of each of the four reports, with the filters used, for simulated runs and, when available, for real or recorded runs of the vehicle.
  • Proof of the fail-state: an interrupted run, a run with gaps, and rejected messages, as shown in the reports.
  • README: how to start the simulator with a scenario, how to connect a real vehicle, how to open each report, and how to add a new report.
  • Honest known limitations (for example "only simulated runs, the real car was not ready", "correction rate per metre needs the vehicle's speed, which is estimated", "comparison uses three runs per version only").

Quality indicators

When assessing this challenge as a whole, the following indicators are used. Use them as a self-check before you submit.

Problem fit

  • The report questions of the users ("does the vehicle struggle more in bends?", "did the new version help?") are described in plain language, and each report answers at least one of them.
  • Scope is explicit: this challenge delivers a message contract, ingest and storage, metrics, and several reports for the vehicle's performance, not the autonomy itself and not a remote control.
  • The work respects the city Requirements (shared GitLab project on main, shared back-end and front-end in Docker on the city Pi, normalised data with metadata, documented decisions with references, no waiting on classmates).

Analyse & Advise products

  • Research and advice reports meet the research and advisory report quality indicators.
  • The metrics are supported by sources (control engineering, vehicle evaluation, or comparable), not only invented.
  • The advice states one clear contract, storage approach, metric set, and report set, and builds on the research.

Design

  • The Design Document meets that product's quality indicators: a short plan, testable requirements with sources, and at least one requirement that comes from the end user.
  • The message contract distinguishes intended state from corrections, has units, ids, sequence numbers, and a schema version, and is agreed with the embedded side.
  • Every metric is defined as a formula with units and a tolerance, so two people calculate the same number.
  • The four reports are designed with wireframes, filters, a visible data basis, and a visible marking of incomplete data.
  • The fail-state for missing and invalid data is designed explicitly.

Realisation

  • The Realisation Document meets that product's quality indicators: every MUST requirement has proof it was built, including feedback and the end-user requirement.
  • The simulator, ingest, report API, and reports run in the city's shared Compose stack on the city Pi.
  • All four reports work with filters and show straight vs turning (or the crane's movement types) separately.
  • Metric calculations happen in the back-end and are covered by automated tests against a fixture run.
  • Invalid messages are rejected and counted; interrupted runs and gaps are visible in the reports.
  • Reports were shown with real or recorded vehicle data, or the reason why not is documented and the simulator follows the agreed contract exactly.
  • Code is readable: meaningful names, constants for tolerances and timeouts, no unexplained magic numbers.

Professional practice

  • Learning Goal in Portflow uses the correct naming format and links to all product evidence.
  • You worked with the embedded side on the contract, and with the report users on the questions, and both are visible in the evidence.
  • End-of-sprint reflection connects results to your learning question and to full-stack practice (contract-first design, data modelling, reporting, data quality).
  • Documentation is in English Markdown and usable by other city students.
  • You did not block on classmates: the simulator and recorded runs kept you moving.

Focus points

Watch out for these common issues while you work:

  • Corrections without context. A list of steering values is not a report. Every correction needs the intended state it happened in, or you cannot compare straight driving with turning.
  • No data looks like a perfect run. If the vehicle goes silent, zero corrections is not good news. Mark the run as interrupted.
  • Averages hide the problem. A mean deviation of 3 mm can hide one bend where the car leaves the road. Show p95 and max as well.
  • Comparing unfair runs. A run on a short straight route and a run through three bends cannot be compared directly. Compare per intended state, per metre or per manoeuvre, and show how many runs each number is based on.
  • Contract drift. The embedded side renames turn_left to left and half the data disappears from your reports. Version the contract, validate every message, and count rejects.
  • Aggregating in the browser. Sending every raw message to the front-end works for one run and breaks for twenty. Aggregate in the back-end.
  • One giant dashboard. The challenge asks for reports that each answer a question, not one page with every chart you can draw.
  • Simulator only. A simulator is a means, not the goal. Plan early when you will connect the real vehicle or get recorded runs from it.
  • Waiting for the vehicle. The real vehicle may be ready late. Build with the simulator from day one.
  • Advice without analysis. Coaches will send back an advice report that invents new comparisons not present in research.
  • Design–code drift. When you change the contract, metrics, or reports, update the Design Document first, then the proof in the Realisation Document.

Key points

  • Core task: receive intended state and corrections from an autonomous car, bus, lorry, or crane, store them per run, and produce performance reports.
  • Agree a versioned message contract with the embedded side; build a simulator so you never wait for the vehicle.
  • Define metrics as formulas (correction rate, magnitude, error, time in tolerance) and test them against a fixture run.
  • Deliver at least four reports: run, manoeuvre (straight vs turning), comparison between runs or versions, and safety and data quality.
  • Missing data is visible: interrupted runs and gaps are never shown as perfect runs.
  • Deliver four products: research, advice, a design document, and a realisation document.
  • Work research → advice → design → realise; Sprint 3 emphasises research, advice, the contract, and a first report; Sprint 4 emphasises design, realisation, all reports, and the real vehicle.
  • Link everything to your Learning Goal in Portflow and reflect at the end of Sprint 3-4.