{% import "partials/fields.html" as f %} {% import "partials/icons.html" as ic %}

Scenario

{{ document.title }}

lower_snake_case. Names the exported package and the Hydra config.

{{ ic.icon('map', 12) }} Route search (logical scenario)

{# A logical scenario names the ego's drive as a pattern of road rather than lanelets; the run finds it on whatever map it is on. Read as a list here, edited as the YAML the document stores (docs/logical_scenarios.md). #} {% if document.route %}
    {% for segment in document.route.segments %}
  1. {{ loop.index0 }} {{ segment.summary() }}
  2. {% endfor %}

Ego spawns {{ document.route.ego_spawn_s }} m along the route; {% if document.route.ego_goal %}its goal is the route's end{% if document.route.ego_goal_margin %} less {{ document.route.ego_goal_margin }} m{% endif %}{% else %}it keeps its own goal{% endif %}. Up to {{ document.route.max_matches }} matches{% if document.route.seed is not none %} (seed {{ document.route.seed }}){% endif %}; an unexpanded run takes match {{ document.route.match_index }}.

{% else %}

None: the ego spawns where its card says.

{% endif %}

Segments in driving order: lane (length, lanes_left, lanes_right, opposite_lane, shape, stop_line, traffic_light_stop_line) and junction (turn, traffic_light, crossing_from_left / right / opposite, crosswalk_entry / exit), plus ego_spawn_s, ego_goal, ego_goal_margin, match_index, max_matches, seed. Empty removes it.

{{ ic.icon('gate', 12) }} Gate (logical scenario)

{# When the logical scenario passes over all its runs -- apart from each concrete run's own pass and fail conditions. Each run records what the gate needs; `scenario-gate` judges it afterwards (docs/gate.md). One row per threshold: its checkbox says whether it is judged, its bar and number what it asks. A share is edited in percent and stored as 0-1. The bar names no field -- it moves the number beside it, which the form sends. An unticked row's inputs are disabled, so they are not sent at all. #} {% macro gate_row(field, value, input_name, label, check_name=none, judged=true, mono=false) %}
{{ field.unit }}
{% endmacro %} {% if not document.route %}

A gate judges a logical scenario: add a route search first.

{% endif %}
{% if document.gate %} {% set gate = document.gate %}
{% for field in gate_fields %} {% set stored = gate|attr(field.name) %} {{ gate_row(field, field.shown(stored), 'gate_' ~ field.name, field.label, check_name=('gate_on_' ~ field.name) if field.optional else none, judged=(not field.optional or stored is not none)) }} {% endfor %} {% if gate.judges_consistency %}

Spread measured at

{% for field in gate_consistency_fields %} {{ gate_row(field, field.shown(gate|attr(field.name)), 'gate_' ~ field.name, field.label) }} {% endfor %} {% else %} {# Kept while no spread is judged, so ticking one back finds them. #} {% for field in gate_consistency_fields %} {% endfor %} {% endif %}

Coverage items

{% for entry in gate.coverage_items %} {{ gate_row(gate_item_field, gate_item_field.shown(entry.min), 'gate_item_min_' ~ loop.index0, entry.item, check_name='gate_item_on_' ~ loop.index0, mono=true) }} {% endfor %}

Tick a threshold to judge it. The shares are percentages of the runs, of the route search's matches, and of the merged coverage files' buckets; the spreads are the standard deviation across runs of the ego's lateral offset from the route and of its speed. Untick a cover item to drop it.

{% endif %}

{{ ic.icon('map', 12) }} Map

{# The source and its actions come first: a scenario that names a repository gets its files from there, and the fields below are then overrides rather than the answer. #} {% include "partials/map_source.html" %}

The world CARLA loads. Taken from the map's directory when one is downloaded.

{% if run_map_group(document) != document.map.group %}

Not used: this scenario names its map by source or directory, so its export ships a map group of its own and runs with map={{ run_map_group(document) }}.

{% else %}

Selected as map={{ document.map.group }} when running.

{% endif %}

A map on this machine, read in place: its .osm, map_projector_info.yaml and any .xodr. Takes precedence over the source above.

{% if document.map.source or document.map.directory %} Both are resolved from the map above; set one here only to override it. {% else %} Both are needed for the spawn preview and for a sweep. {% endif %}

{# The readout; its map is below, outside this form. #} {{ f.lanelet_field('map_no_3d_model_lanelet_ids', document.map.no_3d_model_lanelet_ids, draft, many=true) }}

Referenced by spawn constraints as ${map.no_3d_model_lanelet_ids}. Leave empty to inherit the map group's own list at run time; a list here replaces it.

{# Outside the form, like every other lanelet picker: a set of lanelets is picked by hand rather than searched for -- a search names one lanelet per run -- so this one carries no side panel. #} {{ f.lanelet_modal('map_no_3d_model_lanelet_ids', document.map.no_3d_model_lanelet_ids, draft, 'excluded lanelets', many=true) }}