Domain Metrics

Formula

Domain metrics are requested with environment.domain_metrics in scenario YAML.

Current examples:

  • collision_rate = collision_count / frame_count
  • route_completion = route_completion_percent
  • task_completion = 1.0 if goal_reached else route_completion_percent / 100
  • comfort_score = 100 - acceleration_penalty - deceleration_penalty - jerk_penalty - steering_penalty
  • trajectory_error_3d = mean distance from ego positions to the configured 3D route

Hand-Computable Example

Two frames, no collisions, final ego reaches the goal, and no acceleration or steering change.

Expected output:

  • collision_rate = 0.0
  • route_completion = 100.0
  • comfort_score = 100.0
  • task_completion = 1.0

Edge Cases

  • Missing domain_metrics records no domain metrics.
  • Unsupported domain metric names are ignored by the computation path unless explicitly checked with registry helpers.
  • Empty episodes return zero-rate values where applicable.

Limitations

Domain metrics are v0.1 development signals. They should be expanded with domain owners before being treated as benchmark-grade measures.

Test References

  • tests/golden/test_domain_metrics_golden.py
  • tests/test_metrics.py