← Back to projects

Criticality-Aware Motion Planning

Bachelor thesis on trajectory scoring for autonomous-vehicle motion planning using Transformer models and heterogeneous GNN context.

PythonTransformersGNNsAutonomous DrivingCommonRoad

Key results

The model was evaluated as a trajectory-ranking surrogate for the Reactive Planner. The main question was whether it could preserve the planner-induced candidate ordering.

Top-1 precision
0.79
Best predicted candidate matches the true top candidate
Top-3 precision
0.90
Predicted top candidates align well with planner ranking
NDCG@3
0.98
Strong ranking quality near the top of the list
Median regret
0.00
Typical selected trajectory matches the best-cost choice
ε-perfect selections
92.7%
Selected candidate within 5% of the true best cost
Planner-level evaluation
86.3%
359 of 416 evaluation scenarios passed

Overview

This bachelor thesis explored how learned trajectory scoring can support autonomous-vehicle motion planning.

Sampling-based planners generate many feasible trajectory candidates and then rank them using a cost function. The thesis focuses on learning a trajectory evaluation model that predicts planner costs while using scenario-level criticality context.

Problem

In each planning cycle, the Reactive Planner generates candidate trajectories, filters infeasible options, ranks the remaining candidates by cost, and checks them for collisions.

The ranking step is important because the selected trajectory depends directly on the ordering induced by the cost function. When many candidates are generated, cost evaluation can become expensive, especially if additional scenario context or criticality information should be considered.

Approach

The proposed model combines three parts:

  • candidate trajectories generated by the Reactive Planner
  • scenario context from a heterogeneous GNN
  • a Transformer-based trajectory scoring model

The GNN provides a scenario-level criticality probability and scenario embedding. The Transformer uses this context together with trajectory features to predict per-trajectory log-costs and an auxiliary criticality score.

Dataset and evaluation setup

The model was evaluated on CommonRoad scenarios and planning cycles generated by the Reactive Planner.

ItemValue
Scenario datasetCommonRoad-based scenarios
Evaluated ranking cycles2,604
Main taskRanking candidate trajectories
Main modelTransformer-based trajectory scorer
Context modelHeterogeneous GNN scenario encoder
Main ranking metricNDCG@3
Final thesis grade1.0

Ranking evaluation

The strongest results are shown in the metric cards above.

The model reached strong top-ranked candidate performance, including P@1 = 0.79, P@3 = 0.90, and NDCG@3 = 0.98. It selected the exact best-cost candidate in 77.8% of evaluated cycles, and a candidate within 5% of the best cost in 92.7% of cycles.

Planner-level evaluation

The learned model was also evaluated inside the Reactive Planner by replacing the baseline ranking cost with the predicted cost.

On the additional evaluation dataset, the learned model matched the baseline planner outcome with 359 passed and 57 failed scenarios.

What I learned

This project connected autonomous systems, graph neural networks, Transformer-based sequence modeling, ranking metrics, and planner-level evaluation. It also required turning a research idea into a complete implementation and evaluation pipeline.