ADE And FDE

Formula

trajectory_ade = mean(distance(predicted_i, ground_truth_i))

trajectory_fde = distance(predicted_last, ground_truth_last)

Hand-Computable Example

Prediction: (1, 0), (2, 2).

Ground truth: (1, 0), (2, 0).

Expected output: trajectory_ade = 1.0, trajectory_fde = 2.0.

Calculation: distances are 0 and 2, so ADE is (0 + 2) / 2 = 1.

Edge Cases

  • Missing prediction or ground truth trajectory returns 0.0.
  • Points are paired by index.

Limitations

ADE/FDE are geometric errors only. They do not encode traffic rules, feasibility, comfort, or downstream control safety.

Test References

  • tests/golden/test_openloop_metrics_golden.py
  • tests/test_openloop_metrics.py