Disclaimer

This document is the copyrighted property of ASAM e.V.

Any use is limited to the scope described in the license terms (https://www.asam.net/license). In alteration to the regular license terms, ASAM allows unrestricted distribution of this standard. §2 (1) of ASAM’s regular license terms is therefore substituted by the following clause: "The licensor grants everyone a basic, non-exclusive and unlimited license to use the standard ASAM OpenSCENARIO".

Foreword

This document is the summary of the work of the OpenSCENARIO 2.0 Concept Project. It summarizes the work and efforts of about 90 contributors. This document should serve as the starting point to an OpenSCENARIO 2.0 Development project, aimed at delivering an OpenSCENARIO 2.0 standard.

The OpenSCENARIO Concept Project (P2019-02), was initiated in parallel to the transfer project of the OpenSCENARIO standard to the ASAM domain. The goal of this transfer project (P2019-01) was a revision of OpenSCENARIO to ensure adherence to the ASAM standard format, leading to a major version release of v1.0.

The purpose of the Concept Project is thus to address features and adaptations to be implemented in future versions of the OpenSCENARIO standard. The initial scope of the project was defined in a kick-off in January 2019, where several core topics were identified:

  1. Interface to Models & Topology

  2. Parameter & Constraint Handling

  3. Measurements, Grading & Success

  4. Scenario Creation Methods

  5. Maneuver Description

  6. Glossary & Notation

  7. Global Architecture

Disclaimer

The concept document contains references to M-SDL (reference manual), a scenario description language made available to the public domain. It is used for syntactual examples where these may help in the understanding of the concepts contained herein. The language does not reflect on the final format of the standard, nor on any possible implementations of software tools.

1. Introduction

1.1. Overview

With the evolution of autonomous vehicles, the need for more sophisticated testing and validation of ADAS and autonomous driving system is increasing exponentially. It is predicted that simulation-based testing will replace the unachievable goal of test driving billions of kilometers for validation purposes. Different companies have already published their use of thousands of simulation-based tests for the validation of their autonomous systems (see e.g. [1], [2]).

OpenSCENARIO 1.0 is a low-level and concrete specification format, primarily designed to be read by simulation tools. Users, who create maneuver descriptions and tests, need a higher level of abstraction and potentially different ways to express this than in the current detailed XML-format of OpenSCENARIO 1.0.

There are multiple ideas how to express maneuver descriptions on a higher level of abstraction, with interfaces to general-purpose programming languages, textual stylized natural-language scenario descriptions, and the development of a domain-specific language (DSL) being among the expressed ideas.

A central aspect of consideration is the ability for domain experts to directly author and review scenarios without specific tooling, while retaining the ability to have a fully formalized description amenable to precise interpretation and execution by machines as well as humans.

Based on the considerations of the concept group, OpenSCENARIO 2.0 is proposed to be founded on the concept of a domain-specific language (see Section 2.3 and Section 5), that should support all levels of scenario description, from the very abstract to the very concrete in a suitable way.

The OpenSCENARIO 2.0 concepts take proven features and capabilities of OpenSCENARIO 1.0, like its event-based scenario execution model, and place them in a more general and expressive language framework, to serve as the foundation for both incremental improvements and more revolutionary enhancements.

In comparison to OpenSCENARIO 1.0, a more detailed set of actions and attributes for the relevant simulation models shall be defined to allow for a more comprehensive scenario description and to improve exchangeability. This is addressed by the introduction of a domain model (see Section 4).

Beyond such improvements, the proposed domain-specific language supports the creation of more complex scenarios through flexible composition and parametrization of component scenarios in ways that allow realistic, emergent behavior to occur. This is expected to enable massive testing and verification of new, complex hardware and software systems, and their interaction with the complex environment of driving.

The concept group believes that the proposed concepts and direction will enable OpenSCENARIO 2.0 to supply a step-function in its ability to describe full, complex simulations and/or tests, addressing all the required elements, and utilizing existing building blocks (like OpenDRIVE or OpenCRG).

In order to leverage investments in OpenSCENARIO 1.0, a clear migration path and compatibility concept is part of the overall OpenSCENARIO 2.0 concepts, as described in Section 1.3.1.

1.2. Intended Audience

The OpenSCENARIO concept document is intended to serve as the foundation of the development of the OpenSCENARIO 2.0 standard (the development project to follow the concept project). It is expected to serve as a reference and foundation for other standardization entities in the world, such as those standards intending to address test scenarios for autonomous vehicles (e.g. NP 34502). The concept document will also provide interested parties the opportunity to align their development activities with that of the standard.

1.3. Relations to Other Standards

1.3.1. Backward Compatibility to Earlier Releases

OpenSCENARIO 2.0 is intended to be a full superset of the features of OpenSCENARIO 1.0. This means that a migration path for OpenSCENARIO 1.x scenarios to OpenSCENARIO 2.0 will be included in the release version of OpenSCENARIO 2.0.

Migration of scenarios might require conversion to 2.0 syntax and semantics. The run time behavior of any scenario converted from the latest OpenSCENARIO 1.x to OpenSCENARIO 2.0 shall be the same.

A conversion of OpenSCENARIO 2.0 scenarios to OpenSCENARIO 1.x will in general not be possible, since OpenSCENARIO 2.0 is intended to be a true superset of OpenSCENARIO 1.x. However conversion of a subset of OpenSCENARIO 2.0 that maps to the feature set of OpenSCENARIO 1.x will be possible.

The standard development projects for the 1.x and the 2.0 tracks shall ensure an up-to-date ruleset for a migration path from 1.x to 2.0.

1.3.2. References to Other Standards

At the time of writing OpenSCENARIO is the only proposed standard to describe maneuvers and testing scenarios. The standard is designed to integrate with the requirements of other safety standards being developed in parallel. These include:

ISO

21448 (SOTIF), 34501 (Terms and Terminology for test scenarios), 34502 (Engineering framework for test scenarios), 34503 (ODD taxonomy for test scenarios), 34504 (Test scenario cartograms)

UL

UL4600

SAE

J3164 (draft)

2. Scope

2.1. Goals

OpenSCENARIO 2.0 should address the basic requirements and features stated in the project proposal. These are repeated here for clarity and their detailed description can be found in the concept project proposal document for OpenSCENARIO 2.0.

Table 1. Features
Feature Type

F001: Maneuver model

Change

F008: High level maneuver descriptions

New

F003: Traffic Model

New

F007: Parameter stochastics

New

F002: Driver Model

New

F004: Environmental Condition Model

New

F009: Replay of Recorded Scenarios

New

F010: Automatic parameter calculation

New

F005: Infrastructure Event Model

New

F006: Vehicle dynamics model

Change

F011: Additional metadata for parameters

New

F012: Language Constructs for Localization

New

Proposal workshop and revisions can be found in the workshop summary set of slides.

Table 2. Issue Descriptions
ID Title/Description

R001

Avoid Different Ways to Model

R002

Define Elements as 'Mandatory' Only When Absolutely Needed

R003

Maintain Independence and Open Linking Between Standards.

R004

Define Three Levels of Control for Ego Vehicles.

R005

Allow Tool-Vendor Specific Extensions.

R006

Allow Definition of Feature Subsets

R007

Define Semantics to Enable Reproducibility and Single Interpretation. (Workshop phrasing was: Well Defined Semantics Requirement )

R008

Allow both Open-loop and Closed-loop Simulation by the Same Maneuver Descriptions. (Workshop phrasing: Maneuver Description Shall be Suitable for Open-loop and Closed-loop Simulation)

R009

Define Parameter Boundaries

R010

Synchronize Maneuvers and Events

R011a

Allow Definition of Success Criteria for Individual Maneuvers, and for Full Scenarios and Tests - DUT criteria

R011b

Allow Definition of Success Criteria for Individual Maneuvers, and for Full Scenarios and Tests - non-DUT criteria

R012

Allow Textual Editing of the Format. (Workshop phrasing was: Suitability for textual editing)

2.2. Non-Goals

OpenSCENARIO 2.0 concept and standard are not expected to specify:

  1. A specific software architecture and tools aimed at using the format.

  2. Assumption on the testing platform and simulation tools being used.

  3. Method to store and categorize scenarios.

  4. Methods to specify Operational Design Domains (ODD).

  5. OpenSCENARIO is not enforcing any standard API to simulators and testing platform, although such a standard might be desirable in future.

2.3. Methodology

2.3.1. Declarative Language

The foundational concept of OpenSCENARIO 2.0 is to establish a domain specific language of a declarative nature. A declarative language describes what should happen on scenario execution (including the required parameterization/variation), rather than how to do it. A declarative language can also have a dual interpretation, i.e. provide a single scenario description which can be used to describe both how to make it and how to monitor that it indeed happened. This is important if we want to condition some operation on the fact that some other scenario has happened before, without having to describe in detail how to cause that scenario.

Basic methodology concepts developed by the concept project are stated in this section. These should be used to guide the development of the standard. Chapters 4, 7 and 8 will expand and supply more details on these concepts, as well as examples. In cases where examples are supplied, they are supplied using the foundation of the M-SDL language (reference manual).

2.3.2. DSL concepts

The Domain Specific Language is based on some foundational concepts introduced here. Detailed terminology and definitions can be found in chapter 3:

  • SCENARIO - A scenario describes the behavior of actors over time

    • Scenarios are defined via a scenario definition and invoked (activated, called) via a scenario invocation

  • ACTOR - Actors are the "players" (acting entities) in a scenario (e.g. vehicles, people, …​)

    • A scenario can define the behavior of a single actor or orchestrate the behavior of multiple actors

    • An actor can also represent a group of other actors, like traffic and car_group

  • ACTION - Actions (e.g. drive) define the basic capabilities of actors

  • PHASE - Phases are periods of time within a scenario corresponding to sub-scenario invocations. Phases can be atomic or composite.

    • An atomic phase is a phase consisting of an invocation of an action performed by a certain actor enriched by modifiers e.g. car1 drives with 40 to 50 mph on a two-lane road for 10 to 20 seconds.

    • A composite phase is a phase consisting of an invocation of a temporal composition operator such as serial or parallel.

    • A scenario thus consists of a potentially-hierarchical composition of phases, which together specify the behavior of one or more actors. Note that the invocation of a whole scenario is also a phase.

  • TEMPORAL COMPOSITION OPERATORS - Temporal composition operators_ (e.g. serial, parallel) can be used used to compose (atomic) phases or scenarios

  • CONSTRAINT/MODIFIER - Constraints/modifiers modify (influence) behavior

    • Constraints are a type of modifier specific to parameter values

    • Modifiers in general have a wider scope and can determine dynamics, paths, …​

    • Modifiers can in particular be used to specify in more detail how actors perform actions

  • Scenario definitions have parameters with types

    • Parameter types can be time or velocity or even car (i.e. a reference to an actor)

    • Parameter values are set when scenarios are invoked

    • A parameter’s final value will be set according to the type and the constraints applied.

  • COVERAGE - Coverage definitions define values to be collected for coverage analysis

2.3.3. DSL conceptual building blocks

OpenSCENARIO has a top level file; additional files can be imported into it, and additional type definitions and type extension may exist there:

  • type definition - defines a new scenario, actor, struct, …​

  • type extension - extends an existing type (e.g. actor) adding fields, constraints, …​

Scenarios contain:

  • parameter field - defines something which you can change/influence in the invocation:

    s: speed
    v1: car
  • variable field - defines a location to update during computations (e.g. to hold KPIs)

    !ttcat_end: time = sample(get_time_to_collision(), @end)
  • modifier/constraint - modify (influence) scenario behavior:

    keep(v1.color != v2.color)
    speed([10..15]kph, faster_than: v1)
    set_map("my_map.xodr")
  • coverage definition - defines what and when to write to the coverage database

    cover(overtake_duration, unit: ms, range: [0..3000], every: 100)
  • event - triggers (happens) when some condition happens

    event too_close is rise(distance_between(car1, car2) < 10m)
  • method definition - defines name and parameters of a method written in another language

    def distance_between(car1: car, car2: car): distance is external "python cars.dist"
  • behavior definition - says what the scenario does

    do overtake(v2: dut.car)

All of these (excluding behavior definitions ) can also appear as fields in actors and structs.

2.3.4. Composition

Composition is a key concept of the DSL: it enables to build, instantiate, call and re-use scenarios from existing scenarios or building blocks. Composition exists at all levels and on all building blocks; the DSL supplies the following abilities:

  • Instantiate actions of actors to atomic phases by possibly using modifiers

  • Compose phases via temporal composition operators like serial, parallel, if, repeat, …​

  • Define a new scenario using a name, parameters and a composition of other scenarios and phases

Example how to compose a new scenario by calling existing scenarios:

Static
scenario overtake_serial:
    car_a: car
    car_b: car
    do serial:
       overtake(v1: car_a, v2: dut.car)
       overtake(v1: car_b, v2: dut.car)

2.3.5. Constraints randomization and coverage

The DSL introduced two additional concepts that are included in the format and are intended to ease the writing of testing and simulating scenarios. The first is usage of constraints and modifiers and their semantic, the second to specify coverage ranges.

Constraints are used to:

  • Narrow down parameter values

  • Connect values of multiple parameters

Randomization semantics: generating a test (a concrete scenario) for any parameter not assigned a value. An OpenSCENARIO 2.0 scenario description allows for specification of parameters and probability distributions. The details on how to specify these will be developed in the standard development project.

  • The scenario/test provides guidance to the implementation with probability distributions

  • By default it will use a uniform distribution, but it is possible to request other distribution functions

  • Modifiers can be used to influence the scenario’s dynamics

    • Like speed, position, where on the map it should happen, …​

  • It is possible to specify constraints from very abstract to concrete descriptions

Some examples:

keep(v1.color == green)                   # A single value
keep(v1.color in [green, blue])           # A choice of two colors
keep(v1.color != v2.color)                # They can’t have the same color
keep(v1.color == red or v2.color == red)  # One of them must be red
keep(t in [7..12.5]s)                     # By default will use a flat distribution
keep(soft t == normal(10s, 2s)            # Will use a normal distribution with
                                          # a mean of 10 seconds and std deviation of 2

Modifiers can be used to influence the scenario dynamics. For instance, the modifiers below describe v3 relative to the other vehicles:

v3 modifiers
v3.drive(p) with:
  lane(right_of: v1)
  speed([7..15]kph, faster_than: v1)
  position([20..70]m, ahead_of: v1)
  position([10..30]m, ahead_of: v2)
  lane(same_as: v2)
  lateral([10..25]cm, left_of: v2)

Coverage:

  • Coverage is used to define verification goals and analyze what we did so far

  • Coverage statements are used to specify relevant ranges for which coverage data should be reported by the simulator/testing platform

  • Coverage can be used to collect values for multi-run analysis

Examples:

scenario traffic.overtake:
    v1: car
    v2: car
    side: av_left_right      # Is the overtake from the left or the right
    do parallel ...            # Actual behavior
      cover(side)
      cover(min_ttc(v1, v2), name: min_time_to_collision,
            unit: millisecond, range: [0..3000], every: 100)
      cover([side, min_time_to_collision]) # Cross coverage
    ...

2.3.6. Extensibility and portability

A key concept of the DSL is the ability to extend entities and the testing platform independence/portability between platform and simulators. It implies that the language allows to:

  • Add new simulator/project specific attributes to existing objects

  • Extend predefined scenarios

  • Add new model specific scenarios and modifiers

Example:

Suppose a specific simulator X supports a new weight attribute for cars, the file below will add it to every car (and every scenario using cars):

 extend car:
    weight: real
    keep(weight in [500..4000]kg)

2.3.7. Putting it all together

The following two examples of the same overtake scenario show how the concepts of composition, abstraction, modifiers and constraints can all be used in either a concrete or abstract manner.

Static
Figure 1. Resolution of a solution space with abstract and concrete scenarios
Concrete overtake scenario
scenario overtake_concrete:
  v1: car with(category: sedan, color: black)
  p: path
  path_explicit(p,[point("15",30m),
                point("95",1.5m), ...])

  do parallel():
    dut.car.drive(p) with:
      lane(2)
      speed(50kph)
    serial:
        A: v1.drive(p, duration:3s) with:
          speed(70kph)
          lane(2, at: start)
          lane(1, at: end)
          position(15m, behind: dut.car, at: start)
          position(1m, ahead_of:dut.car, at:end)
        B: v1.drive(p, duration: 4s) with:
          position(5m, ahead_of: dut.car, at: end)
        C: v1.drive(p, duration: 3s) with:
          speed(80kph)
          lane(2, at: end)
          position(10m, ahead_of: dut.car, at: end)
Abstract overtake scenario
scenario overtake:
  v1: car # the first car
  v2: car # the second car
  p: path


  do parallel(duration: [3..20]s):
    v2.drive(p)
    serial:
      A: v1.drive(p) with:
        lane(same_as: v2, at: start)
        lane(left_of: v2, at: end)
        position([10..20]m, behind: v2, at: start)
      B: v1.drive(p)
      C: v1.drive(p) with:
        lane(same_as: v2, at: end)
        position([5..10]m, ahead_of: v2, at: end)

3. Use Cases

As OpenSCENARIO 2.0 has the potential to cover a very wide range of use cases, the scope and functionality of the DSL to be developed will be driven by exemplified use cases. This ensures that

  1. the scope of the project is clear - both to the project participants and to anyone not directly involved in the initial development

  2. the requirements for the DSL can be easily analysed and extended based on further use cases in the future.

For simplicity of language the following user stories are phrased from an end-user perspective, who will be interacting with the tools and processes required to define, implement and consume results from test scenarios. Tool, language and data model implementation details are omitted on purpose.

3.1. User stories for OpenSCENARIO 2.0

A) SHARE

  1. As an AV/ADAS developer company, I can share with other companies the scenarios I built to test my technology.

  2. As an AV/ADAS developer company, I can search, review and reuse scenarios built by other companies.

  3. As a test engineer working for an AV/ADAS development company, I can build and run tests as similarly as possible to tests other developers at other companies are running.

  4. As a test engineer, I can build and run tests as similarly as possible on different execution platforms.

  5. As a researcher developing new technology, I can reutilize industry and open source scenarios to advance my research.

B) CERTIFY & ANALYSE

  1. As an auditor/regulator, I can understand how AV/ADAS developers are testing their products.

  2. As an auditor/regulator, I can compare the outcome of different execution platforms when they have the same OpenSCENARIO input.

  3. As a safety consultant, I can recommend specific scenarios and related conditions (parameters) to my clients to test their products.

  4. As a member of the public, I can learn more details about how AV/ADAS products are tested by AV/ADAS developers.

  5. As government agency, I can understand what parts of the Operational Domain are verified by an AV/ADAS developer through each scenario.

C) DEVELOP

  1. As a tool developer, I can reutilize constructs, artifacts and libraries to create tools compatible with other tool vendors in industry.

  2. As a service provider, I can integrate tools from multiple tool vendors to provide an integrated solution to test AV/ADAS scenarios.

  3. As a system engineer working for an AV/ADAS developer company, I can fully trace which hardware and software in the AV/ADAS stack is verified by which tests.

  4. As a software developer, I can process scenario information from different software/hardware releases and produce comparison charts to provide trend and gap analysis.

  5. As an existing tool provider or consumer, I can migrate information from previous versions of OpenSCENARIO into OpenSCENARIO 2.0.

  6. As a system engineer working for an AV/ADAS developer, I can decompose high level use cases in a standardised way.

D) CREATE

  1. As a content developer, I can use OpenSCENARIO 2.0 to create test scenarios that I can supply to my customers who use a OpenSCENARIO 2.0 compliant toolchain.

  2. As a test engineer, I can transform abstract test descriptions into OpenSCENARIO 2.0 (e.g. NCAP tests, UNECE regulations, any requirement list, …​).

  3. As a development project lead, I can write scenarios on an abstract level to discuss the functional behavior with the stakeholders.

  4. As a development project lead, I can create scenarios on an abstract level to document the functional behavior for legal reasons.

  5. As a stakeholder, I can create natural language scenarios without having any knowledge about technical details.

E) SOTIF-BASED RISK CONSIDERATION

  1. As a SOTIF safety engineer and/or V&V engineer, AV developer, scenario creator, I can use OpenSCENARIO 2.0 to discover scenarios that are going to uncover safety hazards. This refer to SOTIF and safety hazards that can be present even if the system is functioning as designed, without a malfunction.

  2. As a SOTIF safety engineer and/or V&V engineer, AV developer, scenario creator, I can use OpenSCENARIO 2.0 to create scenarios that are going to produce emergent behavior of the DUT to discover unknown unknows. OpenSCENARIO 2.0 shall enable to demonstrate that minimum residual risk is attained by the DUT. This is because SOTIF focuses on ensuring the absence of unreasonable risk due to hazards resulting from insufficiencies in the intended functionality or from reasonably foreseeable misuse.

F) DRIVING MISSION-BASED SCENARIOS

  1. As an end-to-end V&V engineer, I can use OpenSCENARIO 2.0 to enable specification of a driving mission through inclusion of multiple maneuvers in a sequence or in parallel for both DUT and any other traffic agents.

  2. As an end-to-end V&V engineer, I can use OpenSCENARIO 2.0 to enable accomplishing a select driving mission with an indication of whether the mission has been accomplished, what are the mission KPIs and how they are computed, and whether the unambiguous goals of the mission have been attained.

G) TRAFFIC MODEL INCLUSION

  1. As a traffic model developer, an ADS developer, or end-to-end V&V engineer, I can use OpenSCENARIO 2.0 to enable inclusion of multiple traffic models and AI-based traffic agents in the scenarios and evaluators. Also, OpenSCENARIO 2.0 shall enable inclusion of mechanisms to extract scenarios from the traffic models.

    OpenSCENARIO 2.0 shall enable inclusion of ground truth for comparison of expected behavior of traffic agents in addition to the DUT car.
  2. As a test engineer, I can transform from high level scenario description to low level scenario descriptions and vice versa.

H) EXECUTE

  1. As a test engineer, I can execute different OpenSCENARIO 2.0 files in an automated way with my OpenSCENARIO 2.0 compliant toolchain; no file modifications are needed.

  2. As a test engineer, I can execute the same OpenSCENARIO 2.0 files on different OpenSCENARIO 2.0 compliant toolchains.

  3. As a test engineer, I can convert abstract scenarios into tests.

I) DESCRIBE OBSERVATIONS

  1. A simulation tool can describe randomly executed simulation runs. If the Simulation was run with stochastic metrics, the user wants to have a concrete description of what happened in an OpenSCENARIO2.0 Format.

  2. A traffic observer can describe what occured in real world with OpenSCENARIO2.0

  3. A test engineer on a test track can describe with OpenSCENARIO2.0 what specific scenario he has observed on a test track. In such a way tolerances and deviations between test description and test execution will become obvious.

3.2. Use Cases for Scenarios

AV use cases are influenced by a variety of factors, such as ODDs, map features, traffic model, weather model, and others. The scenarios assigned to the use cases can be parametrized and typically run in multiple modes of operations. These modes include:

  • On track test

  • On road tests

  • In sim tests

  • In replay (i.e. resimulation) tests

The intent of OpenScenario 2.0 is to cover use cases at varying levels of autonomy. Hence, they should represent an adequate level of complexity including maneuvers and ODD features that are not accounted for otherwise. An example is an AV driving on a complex road with road features such as roundabouts, bus stops, highway ramps, entries and exits or in dense traffic where various maneuvers like cut-ins, lane reductions and cross traffic with other agents on the road.

The following list of use cases for scenarios attempt to cover the majority of the currently considered scope of features of OpenSCENARIO. The list adheres to the following format:

Summary

Title

Related user story(s)

Which user stories are related (Section 3.1)?

Covered abstraction levels

Of the multiple abstraction levels, which are relevant?

Description

Detailed break down of the example use case

Example scenario
  • Function description (not part of the scenario):

    • Customer function level:

      • System behavior level:

  • Scenario description:

    • Abstract/concrete description:

  • Test description (not part of the scenario):

    • Precondition:

    • Test description:

Additional information

…​

3.2.1. Use Case Example 1: Evaluation/validation/checks

Example for demonstrating autonomous vehicle functionality. A simple example for a generic use case in Level 2 driving domain comprised of a scenario and an evaluator.

Summary

Evaluator checks/validation for scenario descriptions

Applicable user story(s)

D3

Covered abstraction levels

Mainly abstract, concrete details

Description

Scenario of an ego car driving on a road between the lanes. The evaluator checks whether the ego car is able to keep driving between the lanes. Expected outcome: Car must drive segments of oval map with LK feature enabled at all times and without any failures.

Example scenario
  • Abstract/concrete description: Ego car starts driving with 40 km/hour speed at a given location in oval map.

  • Test description: Enable Lane Keeping Assistance (LK) at 10 seconds. Let the car drive in oval map for another 120 seconds.

Additional information

The specification of an initial design for 'Lane Keep Assistance' is provided below. The table represents the flow of events required in the scenario and the corresponding flow of events in the evaluator.

usecase 1 lk
Scenario Sequence Evaluator

EgoStartPosition

Pre:: Detect Ego position (centered in Ego lane)

EgoStartSpeed

Pre:: Detect Ego start speed (e.g. 40km/h)

EgoStartLK

Pre:: Detect Ego engages LK (e.g. after 10s of driving)

SetWatchdog

Pre:: Start timer for maneuver (e.g. 120s duration)

EgoSensorOK

Pre:: Assert Ego sensors are functional and clean

ActivateEgoLK

Post:: Assert Ego LK working and engaged

AssistEgoWithLK

Post:: Assert that the distance between Ego and center of the lane is less than a threshold (e.g. 1 meter deviation indicates fail)

3.2.2. Use Case Example 2: Regulations

Summary

Regulations are one source for verification and validation of vehicles. Regulations contain requirements that shall be fulfilled by vehicles and corresponding test descriptions. The information about maneuvers, parameters, test conditions etc. is only given in plain natural language. With OpenSCENARIO 2.0 one can create corresponding scenarios. Those scenarios can be used for test execution, sharing and analyses. Details of UN R 79 as one example can be found in the following section. As example the lane change procedure suppression in a critical situation is given.

Applicable user story(s)

A*, B*, C*, D*, E*

Covered abstraction levels

Mainly abstract, partly concrete

Description

Lane change procedure suppression in a critical situation; UN Regulation No. 79 for Automatically Commanded Steering Function (ACSF) of Category C [UN R79]

"ACSF of Category C" implies a function, which is initiated/activated by the driver and which can perform a single lateral maneuver (e.g. lane change) when commanded by the driver.

Requirements are given as follows (as described in section 5.6.4.6.8 of the regulation):

  • The lane change procedure shall be suppressed automatically by the system when the system detects a critical situation before the lane change maneuver has started (5.6.4.7)

    • A situation is deemed to be critical when, at the time a lane change maneuver starts, an approaching vehicle in the target lane would have to deccelerate at a higher level than 3m/s, 0.4 seconds after the lane change maneuver has started, to ensure the distance between the two vehicles is never less than that which the lane change vehicle travels in 1 second.

Example scenario
  • Abstract/concrete description: The test vehicle shall be driven in a lane of a straight test track, which has at least two lanes in the same direction of travel, with road markings on each side of the lanes (as in section 3.5.4 of UNR79).

    1. The vehicle speed shall be: Vsmin + 10km/h.

    2. The ACSF of Category C shall be activated (standby mode) and another vehicle shall approach from the rear in order to enable the system (5.6.4.8.3).

    3. The approaching vehicle shall then pass the vehicle under test entirely.

    4. A Lane Change Procedure shall then be initiated by the driver.

    5. The test shall be repeated for the following condition, which shall occur before the lane change maneuver has started:

      • The lane change maneuver has not commenced within 5.0 seconds following the initiation of the lane change procedure. (e.g. another vehicle is driving in the adjacent lane in a critical situation as described in paragraph 5.6.4.7.).

    6. The requirements of the test are fulfilled if the lane change procedure is suppressed, for each of the test cases above (3.5.4.2)

  • Test description: Enable Lane Keeping Assistance (LK) at 10 seconds. Let the car drive in oval map for another 120 seconds.

Additional information

A Lane Change Procedure in the case of ACSF of Category C starts when the direction indicator lamps are activated by a deliberate action of the driver and ends when the direction indicator lamps are deactivated. It comprises the following operations:

  • Activation of the direction indicator lamps by a deliberate action of the driver

  • Lateral movement of the vehicle towards the lane boundary

  • Lane Change Maneuver

  • Resumption of the lane keeping function

  • Deactivation of direction indicator lamps.

A "Lane Change Maneuver" is part of the Lane Change Procedure and:

  • Starts when the outside edge of the tire tread of the vehicle’s front wheel closest to the lane markings touches the inside edge of the lane marking to which the vehicle is being maneuverd,

  • Ends when the rear wheels of the vehicle have fully crossed the lane marking.

3.2.3. Use Case Example 3: Electronic stability control (ESC) testing

Summary

Sine with dwell test sequence, including slowly increasing steer as preparation maneuver.

Applicable user story(s)

A4, A5, B3, D2, E1, E2

Covered abstraction levels

Concrete level (ISO specifies concrete values for the shown scenario)

Description

As a preparation for the actual sine with dwell test series, the vehicle is subjected to two series of runs of the slowly increasing steer test, using a constant vehicle speed of 78-82 kph and a steering pattern that increases by 13.5 deg/s until a lateral acceleration of 0.5 g is obtained. Each test series includes three repetitions. One series uses counter clockwise steering, and the other series uses clockwise steering. The goal is to determine a reference steering wheel angle A, which represents the steering wheel angle leading to a steady-state lateral acceleration of 0.3 g for the test vehicle.

As a preparation for the actual sine with dwell test series, the vehicle is subjected to two series of runs of the slowly increasing steer test, using a constant vehicle speed of 80 km/h and a steering pattern that increases by 13.5 deg/s until a lateral acceleration of 0.5 g is obtained. Each test series includes three repetitions. One series uses counter clockwise steering, and the other series uses clockwise steering. The goal is to determine a reference steering wheel angle A, which represents the steering wheel angle leading to a steady-state lateral acceleration of 0.3 g for the test vehicle.

During the actual sine with dwell test, the vehicle is steered using a steering pattern of a sine wave at a frequency of 0.7 Hz with a delay of 500 ms beginning at the second peak amplitude, see Figure below. Several tests are performed in a series in which the amplitude of the steering pattern is increased with each test. The series is performed twice, where one series starts with counter clockwise steering, and the other series start with clockwise steering. The sine with dwell test series starts with a specific fraction of the reference angle A, and is increased from run to run by half the reference angle. The calculation for the maximum steering angle amplitude to be applied is also specified by the standard.

Example scenario

N/A

Additional information

The main purpose of ISO 19365 is to provide a repeatable and discriminatory method for comparing simulation results to measured test data from a physical vehicle for sine with dwell tests, which are typically used to evaluate the performance of an electronic stability control (ESC) system, see "Passenger cars - Validation of vehicle dynamic simulation - Sine with dwell stability control testing (ISO 19365:2016)".

The comparison is made for the purpose of validating the simulation tool for this type of test when applied to variants of the tested vehicle. It is applicable to passenger cars as defined in ISO 3833. The sine with dwell test method is based on the test method specified in regulations USA FMVSS 126 and UN/ECE Regulation No. 13-H.

3.2.4. Use Case Example 4: Stakeholder Discussion

Summary

Scenario usage as a basis for stakeholder discussion.

Applicable user story(s)

A1, A2, C6, D3, D4, D5

Covered abstraction levels

Mainly abstract, probably concrete details

Description

The stakeholders in the context of a driving function development project provide information about the project setup, neighbor systems, sensors, actors and software/hardware constraints. To define the driving function, the project lead needs to discuss the function goals and behavior with the stakeholders. For this, a short and easily comprehensible scenario description, which is understandable without detailed technical knowledge, should be available. A corresponding two or three dimensional visualization can help.

Example scenario

Function description (not part of the scenario):

  • Customer function level: My driving function (emergency brake assist) has to perform an emergency braking, if either an object in the trajectory appears suddenly and the driver has no chance to react, or if the driver fails to react in a normal braking situation and the distance to the object falls below a threshold

  • System behavior level: If the distance to an object in the trajectory falls below threshold C1 and the speed is above V1, inform the user visually. If the user does not react within X seconds, perform an emergency brake with -15 m/s2.

    Scenario description:

  • Abstract description: Highway with at least one lane, a car follows one lane, an object is in front of the car. The distance is Y meters.

  • Logical and concrete descriptions: extensions of the abstract description, e.g. by defining lane width, car size, etc.

Test description (not part of the scenario):

  • Precondition: Apply the scenario described above

  • System-under-test: Implementation of the developed driving function

  • Test description:

    • If dist_obj < C1 && v > V1, check if message is shown to the user.

      • Start timer t.

    • If t > X, check if brake == true && a < -15 m/s2.

      • If true, test = pass, otherwise test = fail.

3.2.5. Use Case Example 5: Proving ground testing

Summary

Scenarios for proving ground testing.

Applicable user story(s)

A4, D1, D2, E1, E2, E3

Covered abstraction levels

Concrete

Description

A scenario description is required to enable the tester to test a scenario on the proving ground.

Example scenario

Scenario description: Cut-In on highway. Only option for VUT is to emergency brake.

  • Scenario takes place on a 2-lane highway. VUT is following another vehicle (TSV#3) with Highway-Pilot (L3) active. VUT and lead-vehicle are on the left lane. An additional Vehicle (TSV#2) is right next to VUT on the right lane. It stays besides the VUT with an offset of 4m from front bumper to front bumper. A slow vehicle (TSV#1) is changing lane from right to left and cuts in between TSV#3 and VUT. The VUT has only the option to emergency brake and not to change lane.

  • Stationary Conditions:

    • Speed of TSV#3 = 80km/h

    • Speed of TSV#1 = 20km/h

    • Lane Change of TSV#2: Length = 20m; Offset = 3.7m to left; shape = sinusoidal

  • Triggers:

    • TSV#1 which does the lane change: LC has to be completed when distance of VUT to TSV#1 is 20m

  • Control:

    • TSV#2 has to follow the position of VUT on the right lane with an offset of 4m from front bumper to front bumper

usecase 4

Additional Information

Birds-eye view perspective with logged data (Youtube)

3.2.6. Use Case example 6: NHTSA Scenario Descriptions

Summary

Scenarios from NHTSA test description formats should be fully coverable by an OpenSCENARIO 2.0 description

Applicable user story(s)

A1, A4, B1, B4, D2, D3, E3

Covered abstraction levels

Concrete

Description

The DUT is travelling straight in the second rightmost lane at 40 mph (lane speed). DUT is approaching a signalized intersection with a red signal state while a pedestrian is crossing at a speed of 1.2 m/s.

usecase 6

Example scenario
  • Meta-Data:

    • Map/Template: PHX

    • N Scottsdale Rd & E Thomas Rd

    • GPS: 33.4802924, -111.9259426

    • Density: Low ( 2 of each )

    • Vehicle: 1 Static / 1 Dynamic

    • Bicycle: 1 Static / 1 Dynamic

    • Pedestrian: 1 Static / 1 Dynamic

    • Lane Count: 6

    • Actor: Pedestrian

    • Scenario Total: 1

  • Baseline Scenario:

    • Expected SDV Speed: 40 mph (17.88 m/s)

    • SDV Start Position:

      • Right Travel Lane (second lane from the right)

      • 60 m before the intersection on N Scottsdale Rd.

      • Heading northbound

    • End Position: 50 m after the intersection

    • Actor Starting Position:

      • 0 m at the crosswalk on N Scottsdale

      • Front Right Near side of the intersection

    • End Position:

      • 2 m on the other side of the intersection

      • Crossing N Scottsdale

      • Moving from Front Right Near to Front Left Near, ~35 m

    • Actor Speed: 1.2 m/s

    • Trigger Points:

      • Pedestrian OverlapAction Trigger_BP

      • 40 m before the intersection

    • Trigger Variation Extent: N/A

  • Expected Termination Condition(s):

    • No Progress Timeout

  • Metrics:

    • Simulation_standard_test

Additional information
  • Composite/OD Tags

  • Infrastructure

  • Composite Tags

3.2.7. Use Case Example 7: Replay Observed Traffic Situation

Summary

A traffic camera observes certain traffic situations. This measured data will be transformed into OpenSCENARIO2.0. At the end a OpenSCENARIO2.0 file will contain the concrete scenario description. This example shall be representative for all measured data, no matter if recorded by a drone, from within a car, during test track runs or simulation runs or real world traffic.

Applicable user story(s)

I1, I2, I3

Covered abstraction levels

Concrete

Description

A highway section is observed from the bird perspective. In one period of observation a cut-in maneuver is observed and this traffic situation shall be converted into a concrete scenario description.

Example scenario

Following section of highway is observed.

usecase 7

Data from following measurements channels is available:

Name Description Unit

frame

The current frame.

[-]

id

The track’s id.

[-]

x

The x position of the upper left corner of the vehicle’s bounding box.

[m]

y

The y position of the upper left corner of the vehicle’s bounding box.

[m]

width

The width of the bounding box of the vehicle.

[m]

height

The height of the bounding box of the vehicle.

[m]

xVelocity

The longitudinal velocity in the image coordinate system.

[m/s]

yVelocity

The lateral velocity in the image coordinate system.

[m/s]

xAcceleration

The longitudinal acceleration in the image coordinate system.

[m/s]

yAcceleration

The lateral acceleration in the image coordinate system

[m/s]

frontSightDistance

The distance to the end of the recorded highway section in driving direction from the vehicle’s center.

[m]

backSightDistance

The distance to the end of the recorded highway section in the opposite driving direction from the vehicle’s center.

[m]

dhw

The Distance Headway. This value is set to 0, if no preceding vehicle exists.

[m]

thw

The Time Headway. This value is set to 0, if no preceding vehicle exists.

[s]

ttc

The Time-to-Collision. This value is set to 0, if no preceding vehicle or valid TTC exists.

[s]

precedingXVelocity

The longitudinal velocity of the preceding in the image coordinate system. This value is set to 0, if no preceding vehicle exists.

[-]

precedingId

The id of the preceding vehicle in the same lane. This value is set to 0, if no preceding vehicle exists.

[-]

followingId

The id of the following vehicle in the same lane. This value is set to 0, if no following vehicle exists.

[-]

leftPrecedingId

The id of the preceding vehicle on the adjacent lane on the left in the direction of travel. This value is set to 0, if no such a vehicle exists.

[-]

leftAlongsideId

The id of the adjacent vehicle on the adjacent lane on the left in the direction of travel. In order for a vehicle to be adjacent and not e.g. preceding, the vehicles must overlap in the longitudinal direction. This value is set to 0, if no such a vehicle exists.

[-]

leftFollowingId

The id of the following vehicle on the adjacent lane on the left in the direction of travel. This value is set to 0, if no such a vehicle exists.

[-]

rightPrecedingId

The id of the preceding vehicle on the adjacent lane on the right in the direction of travel. This value is set to 0, if no such a vehicle exists.

[-]

rightAlsongsideId

The id of the adjacent vehicle on the adjacent lane on the right in the direction of travel. In order for a vehicle to be adjacent and not e.g. preceding, the vehicles must overlap in the longitudinal direction. This value is set to 0, if no such a vehicle exists.

[-]

rightFollowingId

The id of the following vehicle on the adjacent lane on the right in the direction of travel. This value is set to 0, if no such a vehicle exists.

[-]

laneId

The IDs start at 1 and are assigned in ascending order. Since the Lane ids are derived from the positions of the lane markings, the first and last ids typically do not describe any useable lanes. For details, see the definition of the coordinate system.

[-]

A compiler transforms the measured data into a scenario file. This example comes from the highD Dataset. Other data sources might have slightly different measurement procedures. This is just one example for the use case and should be representative for all measured data that needs to be transformed into OpenSCENARIO2.0.

3.2.8. Use Case Example 8: Scenario definition for entering a roundabout

Summary

A left turn at a roundabout should be described as a scenario

Applicable user story(s)

D1

Covered abstraction levels

Concrete

Description

usecase 7b

Textual scenario description:

scenario Scenario014:
    set_map("MFM_map.xodr")
    ego: car
        keep(ego.color == green)
        keep(ego.category == sedan)
        car1: car
        keep(car1.category == sedan)
        p: path
            path_type(p, roundabout)
            path_min_lanes(p, 2)
            path_min_arms(p, 4)
        set_weather: weather(kind: nice, temperature: 20c)
        do parallel:
            get_ahead_ego: ego.drive(p) with:
                speed(0mph, at: start)
                lane(1, in: segment1, at: start)
                lane(1, in: segment2, at: end)
            get_ahead_car1: car1.drive(p) with:
                speed(30mph, at: start)
                lane(-2, in: segment5, at: start)
                lane(1, in: segment2, at: end)

3.2.9. Use Case Example 9: High-level/low-level description of a motorcycle cut-in

Summary

The motorcycle cut-in as an example for high-level and low-level description

Applicable user story(s)

D6

Covered abstraction levels

Abstract - Concrete

Description

A motorcycle is driving on the left lane next to a car. The motorcycle cuts in. The car brakes suddenly and crashes.

usecase 9
Abstract
MotCyc: Motorcycle
PCar: PassengerCar

do serial():
    parallel:
        PCar.drive with:
            direction(straight)

        MotCyc.drive with:
            speed(faster_than: PCar)

       get_ahead: serial:
            left: MotCyc.drive with:
                direction(straight)
                lane(left_of: PCar, at: start)
                position(behind: PCar,
                         at: start)
                position(front: PCar, at: end)

             right: MotCyc.drive with:
                 direction(right, at: start)
                 direction(straight, at: end)
                 lane(same_as: PCar, at: end)

    parallel:
        MotCyc.drive with:
            speed(faster_than: PCar)
            direction(straight)

        crash_and_stop: serial:
            brake: PCar.applyBrake with:
                direction(right)

            stop: PCar.drive with:
                speed(0)
Concrete
MotCyc: Motorcycle
PCar: PassengerCar

do serial():
   parallel:
      PCar.drive with:
         speed(50kph)
         direction(straight)
         lane(0)

      MotCyc.drive with:
         speed(80kph)

      get_ahead: serial:
         left: MotCyc.drive with:
            direction(straight)
            lane(1)
            position(20m, behind: PCar,
                     at: start)
            position(2m, front: PCar, at: end)

         right: MotCyc.drive with:
            direction(30degrees, at: start)
            direction(straight, at: end)
            lane(same_as: PCar, at: end)

   parallel:
      MotCyc.drive with:
         speed(80kph)
         direction(straight)

      crash_and_stop: serial:
         brake: PCar.applyBrake with:
            direction(45degrees)

         stop: PCar.drive with:
            speed(0)

3.2.10. Use Case Example 10: Scenario usage for SOTIF

Summary

The process of SOTIF (Safety of the Intended Functionality) according to ISO 21448 requires identification of hazards and their causal analysis in order to relate them to limitations, weaknesses and disturbance susceptibilities of the AV system in their combination with Triggering Conditions. Unlike for traditional Functional Safety according to ISO 26262, this can often no longer be achieved by a safety analyst alone, as the scenario are getting much more complex and the behavior of the AV function is much less predictable by humans than traditional component failures that have been considered for Functional Safety. Therefore, the safety analyst might want to submit simulation request to the simulation specialists, attaching descriptions of abstract scenarios (scenario stubs) in OpenSCENARIO2.0. Additionally, he will have to specify monitoring conditions that denote the hazardous situations he is interested in. In order to create runnable scenarios for simulation, a scenario generator will have to fill up the abstract scenarios with more details and objects, and choose parameter values for the parameters that are unspecified or only specified in terms of value ranges in the abstract scenarios, thereby transforming them into concrete scenarios, again expressed in OpenSCENARIO2.0.

Applicable user story(s)

B3, C1, E1

Covered abstraction levels

Abstract

Description

The safety analyst uses established techniques (see ISO 21448, ISO 26262) to find out hazards of the automated vehicle, e.g. sudden unjustified braking or hitting another vehicle. After that, he uses techniques like (modified) Fault Tree Analysis (FTA) or System Theoretic Process Analysis (STPA) to find out about the causes. Of particular interest in the context of SOTIF are the causes that are not failures or defects, but limitations of the nominal performance of the system or lack of fitness for its purpose. For instance, too restricted contrast resolution of a camera, in combination with dark color of a target vehicle and poor light conditions, can lead to a late or weak detection of the target vehicle, which results in not qualifying the vehicle fast enough to brake on time – the end result could be a rear-and crash into that vehicle. Often, the analyst finds out what could go wrong in the worst case, but cannot decide if the scenario is really a hazardous one, and under which parameters and side conditions (e.g. How dark must it be to overlook the vehicle? Which colors of the target vehicle are rather safe or rather critical? What initial distance and speed difference?).

Simulation can help to find this out but given the number of relevant details and the number of such potentially critical scenarios to evaluate, a pure table based or natural-language interface between safety analyst and simulation expert will not be an acceptable solution. OpenSCENARIO2.0 can close the gap. The ability to specify abstract/functional scenarios, specifying only the details and objects that are relevant (see ISO 21448 CD, Clause 7.3 for examples) and only ranges for parameters (e.g. 80 .. 100 km/h), allows the safety analyst to concentrate on his core activities instead of forcing him to become a simulation professional. The missing details are manually or automatically added by a scenario generator, ensuring a sufficient level of feature and parameter range coverage according to pre-defined criteria. One abstract scenario (scenario stub) can be translated into hundreds, if not thousands of executable concrete scenarios in OpenSCENARIO2.0, which form the set of representative samples for the problem to be evaluated. If (a prototype of) the actual control software and sensor equipment of the future automated vehicle is already available, the simulation can be performed as closed-loop simulation (Model-in-the-Loop or Hardware-in-the-Loop), to include the appropriateness of the realistic vehicle response to the Triggering Condition in the observation (see ISO 21448 CD, Clause 7.4).

The safety analyst will need to get informed about any safety goal violations that occurred during simulation runs, together with the determining parameters. He will then consider these as descriptors for the Triggering Conditions according to ISO 21448 and suggest improvement measures for the AV system under test. For efficiency reasons, the safety analyst does not want to receive all simulation records, but just the results for safety-critical situations. Therefore, he will formalize monitoring conditions (e.g. two vehicles getting close to each other omre than a minimum longitudinal safe distance), also in OpenSCENARIO2.0 language. These will be translated into monitors (or observers) that remain active throughout all simulation runs. They trigger reporting of a particular scenario whenever a monitor condition is violated. The relevant scenarios with their determining parameters are then reported back to the safety / SOTIF analysis tool and evaluated by the safety analyst.

usecase 10a
Example scenario

The safety analyst finds out that a vehicle that suddenly appears in close distance in front of the ego vehicle may be a Triggering Condition for a crash, in particular if it suddenly decelerates. This is because the perception and tracking algorithms of the ego vehicle under test need some time to perceive and qualify the new target vehicle, and to determine its speed. Also, the adaptation of the ego vehicle speed cannot happen instantaneously. So the existence of such risk is pretty much clear, but not the parameters.

  • Is it also critical if the new vehicle merges in 200 m in front of the ego vehicle?

  • What if the deceleration occurs only 10 s after merging in, so that the ego vehicle had enough time to qualify and adapt?

  • Is the shape, color, or material of the vehicle in front a factor that makes the situation better or worse?

The safety analyst may want to specify graphically or textually an abstract or logical scenario in his SOTIF analysis tool and export it to the simulation tool chain. The scenario stub contains only the necessary elements (e.g. no other vehicles that may be around, not details regarding the type of target vehicle) and leaves ranges from which to choose the concrete parameters (e.g. initial speed >= 120 km/h, merging in occurs in a distance between 50 m and 100 m, target vehicle continues driving at constant speed for 1 to 2 s before deceleration begins, etc.). However, the abstract or logical scenario must at least specify the characteristic details about the road type and layout, weather, and sight conditions (if relevant), and sequence of scenes and actions, which may be a serial sequence in the simplest case. All of this must be included in the OpenSCENARIO2.0 export. Furthermore, the monitoring condition must be derived from the hazard under investigation. If this hazard is a rear-end crash, a monitoring condition could be that at any time the longitudinal distance gets lower than 10 m. If this monitor is triggered during execution of any of the derived concrete scenarios, the scenario is labeled as failed, and a report is generated, which can be imported back into the safety analysis tool.

usecase 10b
Additional information

ISO 21448 Road vehicles— Safety of the Intended Functionality (Committee Draft, 2019), Clause 7.3 and 7.4

4. Architecture

4.1. Domain Model

In comparison to OpenSCENARIO 1.0, the need for a more detailed domain model with a solid foundation in formal predicate logic has been identified. The goal of this chapter is to deliver a starting point for such a domain model.

[3] defines domain models as "an object model of the domain that incorporates both behavior and data." [4] describes domain models in more detail "as your organized and structured knowledge of the problem. The Domain Model should represent the vocabulary and key concepts of the problem domain and it should identify the relationships among all of the entities within the scope of the domain." Domain models can also be referred to as "Conceptual Models" or "Concept Systems" (e.g. as described in ISO704).

Predicate logic "systematically exhibits the logical relations between sentences that hold purely in virtue of the manner in which predicates or noun expressions are distributed through ranges of subjects by means of quantifiers such as "all" and "some" without regard to the meanings or conceptual contents of any predicates in particular." [5] A simple example from natural language shows what can be inferred with natural language and be expressed with predicate logic, but not with propositional logic: All vehicles have wheels. The object with ID 123 is a vehicle. Therefore, the object with ID 123 has wheels. Further definitions can be found in the lecture notes from [6].

Given these definitions, in this chapter we consider how a domain model based on predicate logic can be described for the application domain of closed-loop system testing of automotive functions that affect a vehicles' behavior. The requirements that arise from all of the use cases to be considered in this domain need to be reflected in the standard. This chapter aims to introduce domain-specific content to the otherwise generic Language Concepts (Section 5), so the language concept is understood to deliver the syntax while the domain model delivers the semantics. The domain model thereby enables preservation of semantics when scenario definitions are exchanged between different tools. A basic set of this vocabulary is given in Section 4.2. To visualize the main dependencies of the different entities, the domain model is formulated as UML alongside a textual description. In Section 4.3, an approach for defining a domain model that is based on predicate logic is laid out in more detail.

4.2. Entity Definition

This chapter proposes pragmatic definitions of entities including their most important properties, attributes, possible actions and interrelations. An exhaustive and unambiguous description of entities is neither possible nor meaningful. The goal here is to describe real-world objects in a structured way that is meaningful for the definition of scenarios in the domain of automotive development and testing. Therefore, the entity definition should:

  • cover only the most relevant definitions for scenario creation

  • be extensible through clearly defined methods in case further definitions are needed to specify a scenario, see Section 5.3.7 and the example of the extension of the Vehicle entity in Appendix A

  • be as much as possible agnostic to the modelling technology

    • allowing usage of e.g. a rule-based lane-change model as well as a black-boxed artificial intelligence model

    • allowing usage of models with different modelling depths

  • not center or specify entity definitions for a specific vehicle under test

    • allowing to include one specific vehicle under test, multiples or none

  • allow entity definitions to be applicable to both virtual and real-world test drives

  • be harmonized with other standards, especially ASAM standards such as OpenSCENARIO 1.0, OpenDRIVE and OSI.

Although OpenSCENARIO 2.0 is not limited to virtual test drives, the following descriptions are predominantly based on mathematical models. Such simulation models need to cover a variety of real-world areas, for example the road network and different types of traffic participants that are relevant for automotive systems, as illustrated by the examples in [Real life use case examples]. The different areas are typically covered with dedicated modelling approaches. These modelling approaches can help to organize the domain model into different entities. In addition to the entity models that reflect the physical behavior of the real world, entities that do not exist in the real-world but are crucial for the definition of scenarios must also be defined. These include, for example, proximity relations between two vehicles that lead to triggering a certain event.

The following descriptions can be seen as a suggested starting point for the actual development of the standard. The harmonization with other ASAM standards will need to be considered during the development of OpenSCENARIO 2.0 because OpenSCENARIO 1.0, OpenDRIVE 1.6 and OSI are expected to be released as ASAM standards at that time. To highlight this, a UML diagram with OpenSCENARIO 1.0 Actions is provided in Section A.1.2. In other places, any overlaps with these standards are mentioned in the provided entity definitions. These definitions are based on expert knowledge from users of simulation tools, tool-providers and modelling experts. Existing scenario mechanisms as well as literature on relevant scenarios for validation of automated driving have been used as further input.

4.2.1. UML diagram

The following UML diagram has been created with PlantUML [7]. For reasons of readability, only a compacted version of the UML model is presented here. The entire model including the source code for the UML model can be found in Appendix A.

CompactEntityUML

4.2.2. Class description

The following class description provides explanations to the above UML diagram. A full description with actions and attributes for each entity can be found in the Appendix A.

Object

Object is the base class, of which all other entities will inherit attributes and actions.

LocatableObject

LocatableObject is an upper level class that aggregates physical objects, which have a defined position and spatial extent in the world and are, therefore, locatable in an unambiguous way.

TrafficParticipant

TrafficParticipant is a LocatableObject that moves by its own intention, or by the intention of its operator if applicable.

TrafficParticipant can be used to form complex objects that are made up of other Traffic Participant objects, by having a part that is an object of the same class. For example, a "Trailer Truck" is a complex object of type TrafficParticipant that is comprised of the parts "Tractor Unit" and one or more "Trailer Unit(s)", each of which are also objects of type TrafficParticipant . The complex object "Pedestrian pushing a Bicycle" can be defined as the composition of a Bicycle and a Pedestrian pushing it. Note: To express the situation where one or more persons are in or on vehicles, the NumberOfPassengers should be set to a value greater than 0.

NonTrafficParticipant

NonTrafficParticipant is an object that, in contrast to a Traffic Participant, does not move by its own intention or an operator. It may be anchored at a defined position, making it stationary, or it may have an imposed movement.

Vehicle

Vehicle is a TrafficParticipant with some form of self-propulsion (e.g. an engine or a pulling animal) that is moved by the intention of its operator. The movement of the Vehicle can be controlled directly by setting its position, through human-machine interfaces, e.g. to set a steering wheel angle, or through a model, the Vehicle Controller. Therefore, a vehicle can a) be operated by a action-based description, where a Vehicle Controller defines the actions and their attributes with regard to the physical limitations or b) be moved on a predefined trajectory ignoring the physical limitations ("Hand-of-God" mode), e.g. Vehicle X that is at Point A at time t should be at point B at time t+dt, no matter how it got from A to B in the time interval dt.

Vehicle Controller

VehicleController refers either to a driver model that controls the vehicle or an automated driving function. In case of a driver model, this includes its behavior properties for information acquisition, the mental model itself as well as the situation assessment and action deduction/execution. In case of of an automated driving function, most of these attributes are the same, because the driving function as the vehicle controller is to some extent an imitation of the driver model behavior. To distinguish between these two cases, the "IsDriverAutomated" attribute is used.

NonVehicle

NonVehicle is a TrafficParticipant that is moving with intention on its own, that is without the use of a Vehicle. The most obvious representative of this class is a pedestrian, but also animals would be categorized here.

Obstacle

Obstacle is an inanimate object that does not move with own intention and that does not directly participate in traffic. An Obstacle is a physical object that causes some traffic participant to restrict the trajectories it is allowed to choose from. Obstacles may be anchored and, thus stationary or a movement can be imposed on those objects, e.g. to define the behavior of a ball kicked onto the road or a log falling off a truck.

Scenery

Scenery contains elements in the vicinity of the road that are not part of the referenced map but are relevant for the scenario definition. In contrast to an Obstacle, which directly affects the possible trajectories that TrafficParticipant_s may take, the _Scenery affects the scenario mostly due to obstructing the view.

Building

May contain a reference to an external building definition source like CityGML.

Vegetation

Maybe defined only for visual quality of the scenario, but might also have an impact on sensors.

TrafficParticipantFlow

TrafficParticipantFlow can be used to create (spawn) multiple TrafficParticipant entities on a road network. This could either be done to achieve a fully stochastic traffic behavior or to impose actions on a group of TrafficParticipants (e.g. "synchronize") to achieve a more structured, deterministic behavior. This can be done entity-based to surround a certain entity (according to OpenSCENARIO 1.0 Swarm) in an ellipsis or route-based for a definition based on a road network. The created entities shall be of the type TrafficParticipant and hence offer their properties. Similar to OpenSCENARIO 1.0 the single entities shall receive unique IDs based on the ID of the flow and a count. In this way, it should be possible to take over control of certain entities and (for a certain period) define their behavior deterministically. By using a dictionary of types and probabilities, the composition of the flow can be influenced.

VehicleFlow

VehicleFlow can be used to create (spawn) multiple Vehicles. Inherits all Actions and Attributes from TrafficParticipantFlow, may be extended with vehicle-specific items.

NonVehicleFlow

NonVehicleFlow can be used to create (spawn) multiple NonVehicles. Inherits all Actions and Attributes from TrafficParticipantFlow, may be extended with non-vehicle-specific items.

AmbientObject

AmbientObject is a super-ordinate class that aggregates physical objects that are not locatable in an unambiguous way, in other words any physical object that is not LocatableObject. Instead, an AmbientObject is defined as a physical entity that is located over an area at a certain point in time. There have been several discussions regarding this distinction, which need to be continued in the following project. The following examples help to understand the reasoning behind it:

  • A RoadNetworkTopology can be referenced using a reference point, so as to locate it in some point in space, however the road network covers an area. It is not entirely static (e.g. it might include moving bridges), and it is obviously also not dynamic.

  • Weather effects covered in Environment are also considered as an ambient object. Just like the road, it is placed over an area by referencing it to a reference point. In contrast to the road, weather can move (e.g. a storm or moving precipitation).

RoadNetworkTopology

The scenario language is not supposed to define the complete topology of a complex road network, it only has to provide an intuitive way of addressing elements in the network. This for example will be used to define conditions in the behavior definition, e.g. "turn right at the second 4-way junction". An ID based access with detailed knowledge of the road network content must also be possible. The detailed definition of the road network will still be done by formats like OpenDRIVE, which for example is used for OpenSCENARIO 1.0. For OpenSCENARIO 2.0 an abstraction level for the road network should be considered, which allows the usage of other map sources. The road topology model for now only contains essential attributes for addressing the correct elements for the scenario in mind. More advanced features (e.g. angle between connected roads of a junction) can be supported in derived models. It should, however, be noted that the usage of advanced road network features automatically decrease the number of usable map sources. Furthermore, the exchangeability of the scenario itself will be affected by the complexity of road features.

Road

The Road model has to contain necessary attributes for scenario definition and addressing specific roads in the network. For example a cut-in scenario might require a Road with at least two lanes in the same driving direction. More vehicle dynamics focussed tests could depend on a the curvature value. An ID based access like in OpenSCENARIO 1.0 will also still be necessary as an unique referencing option. _Road_s itself should contain a number of lanes with additional attributes like seen in many existing map formats. It should be considered to omit the intermediate 'Lane Section' level like in OpenDRIVE in order to achieve the aspired map source independency.

Lane

In analogy to the other road network model classes, the Lane should only contain attributes for scenario definition and addressing purposes. A Lane should have knowledge about its allowed driving direction(s), the width and the lane type. One additional and presumably important scenario definition feature are the road markings, which should also be part of a Lane. Lane independent road markings have not been dicussed in this concept project. Especially on the lane level it is possible to provide a very detailed description of the lane structure, e.g. to reflect the content of a HD map source. For the scenario itself only the minimum width of a Lane in a defined area might be relevant, so the lane model in the scenario language should focus on those essential attributes.

Signal

A Signal of the superordinate Road or Junction. Some parameters of the signal are defined in the reference map data (e.g. the position), others may be part of the scenario definition itself (e.g. the lighting sequence of a traffic light). This location of signals class in the model should enable a better addressing of relevant situations in the road network ("Junction with traffic light", "Road with repeating speed restriction traffic signs", …​).

Junction

Basically a node in the road network topology where three ore more roads are connected. This basic Junction model class intentionally avoids a more detailed definition of the junction properties to allow an easy way of addressing junctions for a scenario.

Route

Defines a path through the road network. Used for large scale behavior definition or navigation. Vehicles are basically able to 'find' their way through the network by themselves, but in some use cases a defined route may be necessary. The routes can either be part of the referenced road network or be defined in the scenario. The neighboring roads in the route have to be adjacent either directly or over a junction.

Environment

In contrast to the road network topology, the attributes of the environment can be not only addressed but also set for the scenario.

4.3. Ontology

The importance of the domain model was echoed in the introduction of this chapter. The domain model is the foundation of the simulation and testing systems and workflows. It defined all the objects and the entities in the "known world". due to the criticality and importance of a domain model, it is propose that different techniques will be explored as a mean to construct the model. The detailed exploration and decision on specific method is left to the standard development project. One of the proposed methods is to used ontology engineering and its concepts that are briefly introduced in this chapter.

A Description Logic (DL) is specifically designed to be both computable in finite time and to be able to express basic factual or descriptive assertions in natural languages. DL ontologies are used to construct domain models by providing a terminological component that specifies a set of concepts (called "ontology classes") covering the main types of things that are of interest in the target domain, together with the attributes and binary relationships (called "ontology properties") that can be expressed for/between specific things in the domain. Logical constraints provided by the DL are used in defining the classes and properties, resulting in a logically grounded theory about the nature and possible relationships of things in the domain.

The use of a DL can enable a computer to infer that the following two scenario descriptions, which do not say the same thing, actually mean the same thing.

  1. Scenario 1: A motorcycle cuts off an ADS truck, causing it to brake suddenly, and then a car that is behind the truck crashes into the side of the road.

  2. Scenario 2: An ADS truck is driving in front of a car that crashes into the side of the road because the truck braked suddenly in response to a motorcycle that suddenly cut it off.

To match these descriptions, we need to know that "in front of" is the inverse of "behind", which enables us to infer that the car is behind the truck. Furthermore, because "in front of" is a transitive relationship and the truck is in front of the car, we can infer that the motorcycle is in front of the car. This may lead us to conclude that the cut off action by the motorcycle indirectly affects the car behind the truck. For example, by specifying that "in front" is transitive and asymmetric, and given the statement "vehicle A is in front of vehicle B, and vehicle B is in front of vehicle C", we can infer that "vehicle A is in front of vehicle C", "vehicle B is not in front of vehicle A" and furthermore that vehicle B must be between vehicle A and vehicle C. In this way, an ontology provides well defined, computer-interpretable semantics that enable the use of logical inference to classify scenarios based on specific types of relationships between things, thereby helping to overcome the problems of data ambiguity.

An existing upper ontology, such as ISO15926, can be employed to provide a well-defined metamodel for the domain model, e.g. for expressing temporal relationships involving actions and events. Furthermore, DL ontologies can have an assertional component in addition to the terminological component, which is understood to be the knowledge base corresponding to the representation of the background knowledge given by the terminological component. The assertional component contains information about actual things in the domain (a particular car to be overtaken or an actual merge maneuver that will take place in a test), which are distinguished from concepts that are formed as abstractions of sets of things having similar features (cars in general, merge maneuvers in general). The scenario descriptions can be encoded in the assertional component of a DL ontology, providing an integrated solution for managing all of the knowledge related to the scenarios. A question, which is still open is the relation between this description, to the overall language concepts (Section 5) of OpenSCENARIO 2.0. Given the background above, it is proposed that DL ontologies can help to make ADS scenarios computer understandable.

5. Language Concepts

This chapter describes in more detail the language concepts that were derived as key concepts for a domain specific language to describe scenarios, as sketched in Section 2.3.

5.1. Guiding Principles

Based on the overall scope and goals of the concept project, as laid out in Section 2, the following guiding principles and foundational requirements were taken into account during the conceptual development of the language concepts and should be considered during the further development and standardization of the domain specific language:

Readability

The quality of being easy to be read and understand by a target audience, which includes not only domain experts, programmers and engineers, but also safety engineers, regulators, and potentially even the general public. While this has clear implications for suitable surface syntax of the language, it also requires the semantics of the language to be well-defined, regular, and focused on the problem domain, and not technical implementation artifacts.

Expressivity

The ability of the language to allow the concise and direct expression of domain subject matter . This interacts with readability and the declarative nature of the language, but also enables for example the ability to query databases of scenarios using language semantics rather than only through meta-data-based queries.

Composability

The quality of being able to use standard language building blocks to incrementally build up more complex behavior in well-defined ways. This requires clear rules for composition and composition operators, that afford some level of predictable behavior post composition, while also allowing for interesting emergent behavior to occur, to ensure coverage of overall realistic traffic behavior.

Portability

The quality of being able to use the language and scenarios written in it across many execution platforms (including simulation platforms as well as real-world test tracks), without undue adjustments needing to be made. This includes the provision of suitable fallback mechanisms to deal with necessary differences between platforms.

Support for Reuse

The quality of being able to reuse scenarios and parts of scenarios across multiple levels of abstraction, platforms, and use cases without undue adjustments needing to be made. This comprises suitable library concepts and mechanisms in the language, as well as

Extendibility

The quality of allowing for easy extension of the underlying language mechanisms and domain model towards new requirements, including new traffic participants, their models and properties, compositions, and constraints.

Migration from OpenSCENARIO 1.0

The language should support a migration path from OpenSCENARIO 1.0. This includes the ability to transform OpenSCENARIO 1.0 scenarios into OpenSCENARIO 2.0 scenarios, without necessarily requiring direct backward compatibility.

5.2. Overall Structure

5.2.1. Syntactic structure

The scenario definition language shall have a modular structure in order to support reuse and concurrent engineering. Each module will be associated with a single file. Accessing entities defined in an external module is enabled by importing the associated file into the accessing module. This is achieved by the import statement.

A collection of modules can be imported into a top file, constituting a library. Library entities are made accessible by importing the library top-level file. Entities defined in a library share the namespace of the importing module, therefore it is important to maintain a strict naming convention in order to avoid naming conflicts. Specifics of namespacing and scoping rules will have to be defined in a way that reduces conflict potential.

A single module shall have the following syntactic structure:

  • Import statements, e.g. import my_scenario_top.osc

  • Type definitions and extensions, as discussed below

The general syntactic style of scenario definitions will be similar to Python, using indentation to identify code nesting and avoiding syntactic markers as construct terminators. This is motivated by the popularity of this style, its familiarity within the community, and enhanced readability of core content through reduction of syntactic noise.

Accordingly, line comments in scenario definitions start with a hash (number) sign # and end at the end-of-line. Additionally, multi-line comments in the C style are allowed, for example:

/*
this is a multi-line comment
*/

Comment nesting is allowed. The indentation of comments is ignored.

Processing a scenario for execution requires identifying one or more top-level files to be processed. These files and any files imported by them, recursively, are considered the scenario program. Each scenario program shall be free of naming conflicts and transitively closed over types (so that every type being used has been defined).

5.2.2. Type declarations

Scenario definitions shall be done in an object-oriented style. In addition, types that are already defined shall be extensible, to facilitate reuse in face of new aspects and concerns.

Accordingly, each module will consist of a list of type declarations and type extensions. The various kinds of types as well as their inheritance and extension mechanisms are discussed in Section 5.3.

Syntactically, each type declaration will have a header statement identifying its kind, name and inheritance relation, if applicable. The declaration body will comprise a list of type members as described below.

5.2.3. Type usage

Compound types are versatile language constructs used for various programming tasks. In the context of AV verification, such types are used to model the environment, the map of roads, any actors present in the scene and so on. For specific actors, their behavior and repertoire of actions is captured using compound types as well. To facilitate that, the scenario language defines special kinds of compound types: structs, actors and scenarios. Structs are used to model data elements such as road segments, as well as parameter aggregates like the information collected when some special event occurs. Actors are used to represent any entities (concrete or abstract) that have associated behavior. Behavior, such as actions available for actors, is captured by scenario types.

Additionally, types may function as interfaces to external models, for example behavioral models representing a driver or a traffic pattern. The implementation of such models can be provided as a dynamically loaded object or an independent program. The interface type interacts with the external model using foreign function calls, while implementing an API used by the scenario program. While OpenSCENARIO will define a way to interact with such external or implementation-defined models at the scenario language level, standardization of the technical interface that is used to integrate such models is outside of the scope of OpenSCENARIO 2.0. It is assumed that where standardization of these mechanisms is found useful, additional standards will arise.

5.2.4. Type members

Type members define the features of the type and their inter-relationships. Type members share a namespace which includes all the inherited features and those added by extension. The type namespace must be free of naming conflicts.

While every kind of type allows different members, some common features are shared by most types. Common features include:

  • Field declaration, associating an identifier with an instance of a type, for example:

    car1: car
  • Constraints, restricting field values or creating relations between fields, for example:

    keep(car.color == green)
  • Additional general members such as events, external method declarations and so on.

  • Verification focused members such as cover constructs

  • Kind specific members such as scenario invocations

5.2.5. Expressions

Expressions are nested within type members, for example within the body of constraints. Since the language is strongly typed, each expression has a type that is known statically (at compile time).

Expressions are composed of atoms, which are either identifiers or constant literals, combined by operators. Identifiers are alphanumeric, must lead with a letter and may include underscores. Supported literals are discussed in Section 5.3. The set of operators, their precedence and composition rules will comprise the usual set of arithmetic and relational operators, as well as domain-specific operators to aid in the formulation of relevant scenarios (e.g. to express the distance after passing another vehicle). The details will be defined during standardization.

Expressions may also contain calls to external methods. External methods are declared as type members, with a binding that maps each method to (one or more) implementation functions in some external language such as Python or C++. Functions implemented in external languages have access to the scenario program data and can raise scenario program events. By calling external methods, expressions can cause side effects, communicate with external models and integrate into simulators, HIL rigs and so on.

5.3. Type Definitions

5.3.1. Overview of built-in data types

The following data types are supported:

  • Scalar types, that hold one value at a time, including numeric (integer and real), Boolean and enumerated types,

  • physical types, associating a numeric value with a physical unit,

  • list (ordered collection) types, that hold multiple values of one type,

  • a string type that holds a sequence of characters, and,

  • compound types that hold multiple values of multiple types.

5.3.2. Scalar types

Numeric integer types can be declared int (signed) or uint (unsigned), and can have 32 or 64 bit representation. Real types are represented as IEEE754 double-precision (64 bit) floating point numbers.

Numeric constants can be expressed as decimal as well as hexadecimal (prefixed by 0x) numbers. Real constants can include a decimal point, and can use exponent notation. Numeric constants may include underscores (similarly to Ada) to improve readability, these are ignored.

The scenario definition language will also support the usual Boolean and enumerated types.

5.3.3. Physical types

Physical types are used to characterize physical quantities, such as speed, distance, angle and so on. Physical types accept constant literals of a matching kind.

Physical constant implied-type is expressed by associating a physical qunatity to its numeric value. This is done by attaching a physical unit to the number expressing the magnitude of the quantiy. For example, 12.5km has an implied type of distance.

5.3.4. Collection types

The scenario definition language will support a built-in ordered collection type (list), that holds multiple values of one base type.

It will also support a built-in string type, holding a sequence of characters, which will support the full ISO 10646/Unicode character complement.

5.3.5. Overview of compound types

The following compound type kinds are built into the language:

  • Structs define a set of related data, similar to a class in other object-oriented languages.

  • Actors define an agent that is capable of action and whose state changes over time. They are used to model physical entities such as cars, pedestrians and their environment. More abstract objects such as traffic and weather are also modeled using actors. Actor states are modeled using fields that are updated to reflect a ground-truth as provided by a simulator or other reporting mechanism (e.g. telemetry). Actor behavior is modeled using scenarios.

  • Scenarios define behavior attributed to a particular actor. Scenarios define behavior by activating other scenarios, built up from a library of basic scenarios describing built-in actor behavior, such as moving, accelerating, turning and so on. Scenarios are further discussed in a section below.

  • Modifiers define changes to the behavior of the scenario invocations to which they are applied. They are discussed below as well.

All compound types define their own namespace. Identifiers are looked up in that namespace, and if not found they are looked up in the global namespace. The type namespace is accessible explicitly using the pseudo-variable me.

Compound types are composed using inheritance and extension. An overview of these mechanisms follows.

5.3.6. Simple (unconditional) inheritance

Inheritance is a mechanism for defining types hierarchically, where more complex and specific types inherit from simpler and more general ones. The features of the inherited type become members of the inheriting one. Some features, like external method and event declarations can be overridden in the inheriting type.

Inheritance is expressed by the following syntax:

struct|actor|scenario <type-name>: <supertype-name>:
    <members>

Example:

struct junction: road_element:

The above defines a new type junction, which is a subtype of road_element – junction will inherit all the attributes of road_element.

When declaring a generatable instance of a type defined using simple inheritance, the instance is guaranteed to be of that type, and not any of its subtypes.

5.3.7. Type extension

Types available in a standard library or a related project may be reused, saving time and effort. Often, however, these types are missing some features that are unique to the task at hand. Extension is a mechanism for specializing types that are already in use (instances of that type are already declared in some other types). All instances of the extended types will be endowed with the new features added in the extension. in other words, extension modifies the type being extended. Inheritance, in contrast, defines a new type and will require revisiting all instances and changing their types, which is intractable.

Extending is particularly helpful when a library of inter-related actors and scenarios is already available, and it needs to be adapted. Common cases include:

  • Adding some new attributes, specific to a domain not considered in the original code

  • Introducing additional constraints to match project requirements

  • Introducing new behavior by adding new scenarios to existing actors (or extend existing scenarios)

  • Adding more values to existing enumerated types

  • Calling methods upon some event occurrence

Extension is expressed by the following syntax:

extend <type-name>:
    <members>

Example:

actor car:
    car_length: distance   # or any other feature
extend car:
    car_weight: weight
    keep(car_weight < 2500kg)

Extensions enables aspect-oriented programming, where each aspect of the model is captured in a particular source file.

5.3.8. Conditional inheritance

Conditional inheritance is addressing the need to classify objects according to different criteria. Considering a vehicle, for example:

  • It can be classified according to its kind: a truck, a car, a motorcycle and so on

  • It can be classified according to its role: emergency-vehicle or non-emergency-vehicle

  • It can be classified according to its engine: an electric vehicle or an internal-combustion vehicle

Conditional inheritance provides the ability to decide the type of an object conditioned on some of its field values. Assuming the base type has some enumerated or Boolean fields, the values of these can be used to declare a conditional subtype.

Conditional inheritance is expressed using the following syntax:

struct|actor|scenario <type-name>: <supertype-name>(<field>:<value>):
    <members>

Declaring a conditional subtype, the condition always sets a single field to a specific value.

Only Boolean and enumerated field values can be used in conditions.

Example:

actor vehicle:                         # the base type
    category: vehicle_category         # truck, car, motorcycle etc.
    emergency_vehicle: bool

actor truck: vehicle(category: truck): # conditional, only for truck
    num_of_trailers: uint with: keep(it in [0..2])

This defines a new actor type called truck, which is defined to be "a vehicle where the category attribute has the value truck. Any vehicle which has category == truck automatically becomes of type truck. Thus, truck is a conditional subtype of vehicle. The expression category == truck is the condition determining if a vehicle is of type truck.

When defining a generatable instance of a type with conditional subtypes, the resulting object may be one of the subtypes. For example, when generating an instance of vehicle, it may be of type truck. Members of a conditional subtype may be accessed if the object is known to be of the specific subtype (by either testing the type or casting).

5.3.9. Scenario type

Scenarios are declared in the context of an actor. While they define a namespace for their features, the parent actor namespace is accessible too. Members not found in the scenario scope are looked up in the actor scope. The actor scope can be accessed directly by using the actor pseudo-variable.

Scenarios are defined using the following syntax:

scenario <actor>.<scenario-name>:
    <members>

Scenarios have all the features of structs and actors, and in addition they can invoke scenarios and modifiers. Invoked scenarios can be built-in or external, user-defined ones. A special kind of built-in scenarios are operators, that create temporal relationship between the scenarios nested within. The following are some of the operator scenario kinds:

  • serial – composes its members in sequence

  • parallel – invokes its members concurrently

  • one_of – invokes one of its members

  • mix – invokes its members in a way that combines their execution (the execution follows the behavior in all of the mixed scenarios)

  • repeat – the behavior of the nested scenario is repeated sequentially

The following example shows a scenario type declaration, which is invoking other scenarios with the use of the parallel operator:

scenario traffic.two_car_drive: # Scenario header
    path: path # a route on the map
    car1: car # an instance of car
    car2: car
    do parallel: # operator – members execute concurrently
        car1.drive(path) # drive() is a scenario of car
        car2.drive(path)

The resulting behavior is having the two cars drive along the path at the same time.

5.3.10. Modifier type

Modifiers are similar to scenarios, but they are restricted to invoking other modifiers only. Modifiers influence the behavior of scenarios by modulating or restricting certain aspects. Using modifiers, a single scenario can be used to create many behavioral variations in a controlled manner. The following are some examples of modifiers included in the basic library:

  • speed – constraining the speed of a movement scenario like drive()

  • change_speed – updating the speed constraint

  • keep_speed - maintain current speed

  • acceleration – constraining movement acceleration (similarly change and keep modifiers)

  • lane – constrain the lane being used (similarly, keep and change lane)

  • position – control the lateral and longitudinal location explicitly

  • synchronize – constraint the timing of two scenarios

The above modifiers are associated with a scenario invocation in one of two ways: either they are invoked as members of the scenario invocation, or they are associated with it from the outside.

Associating a block of modifiers with a scenario invocation is possible using the in modifier. The in modifier has an argument that identifies the target scenario invocation. The body of the in modifier lists members that will be applied to the scenario invocation targeted.

An example of a scenario with nested modifiers follows:

scenario traffic.two_phases: # Scenario name
    car1: car
    path: path
    do serial:
        phase1: car1.drive(path: path) with:
            speed(speed: 0kph, at: start)
            speed(speed: 10kph, at: end)
        phase2: car1.drive(path: path) with:
            speed(speed: [10..15]kph)

Further information on modifiers and their role is contained in Section 5.4.2.3.

5.4. Parameters and Constraints

5.4.1. Parametrization Concepts

The rationale for parameters is to enable the definition and use of abstract OpenSCENARIO entities (such as scenarios, actors, models).

An abstract entity, in the context of parameterization, is an entity with at least one piece of information that is necessary to invoke or instantiate the entity is not yet fixed to one concrete value. Any such piece of information which is left open in the definition of the entity is called a parameter of the entity.

In contrast to an abstract entity, a concrete entity is an entity with all information, that is necessary to invoke or instantiate it, unambiguously defined.

actor my_car:
    width: distance # width is an attribute (a piece of information) which
                    # is required to instantiate an entity of type my_car

    c: my_car       # c is defined as an abstract car with parameter width
    wide_c: my_car with:     # wide_c is defined as a concrete car
        keep(width == 3meter)

Given a scenario with n parameters, the n-dimensional space of all possible/useful/legal n-tuples of concrete parameter values is the parameter space of the scenario. Such parameter spaces are expressed by parameter type definitions and constraints. Special cases of constraints are parameter ranges.

p1: speed                    # parameter type
p2: speed
keep(p1 > 10kph)             # a simple constraint
keep(p2 in [30..50]kph)      # a parameter range
keep(p1 < p2)                # a constraint involving 2 parameters
parameters 1
Figure 2. Graphical representation of the 2-dimensional parameter space defined in the example

Besides the parameter space definition through parameter types and constraints, the choice of concrete values of parameters may also be influenced by parameter probability distributions.

keep(soft v_desired == normal(30, 5))

Depending on the constraints (see Section 5.4.2.2) it may or may not be possible to choose concrete values for all parameters before the start of the top-level scenario execution. In any case, all parameters of an entity must be chosen at the latest when the respective entity gets instantiated/invoked.

Together these concepts, i.e. parameters, constraints, and parameter probability distributions support the following use cases:

  • The definition of logical scenarios in the sense of the Pegasus project, which represent a multitude of (similar) concrete scenarios using a parametrized presentation.

  • Ruling out useless parameter values and combinations thereof when generating concrete scenarios from an abstract (parameterized) definition.

  • Applying stochastic methods for choosing parameter values, e.g. to account for real-world scenario likelihoods when creating test plans.

  • Referencing static content of the road network without prior knowledge of the concrete road network that will be used for a scenario execution.

  • Modular re-use of scenarios.

5.4.2. Parameter semantics and delineation between parameters and constraints from variables/observations and modifiers

Parameters, variables, observations

OpenSCENARIO entities (scenarios, actors, models) have different kinds of attributes:

  • Attributes that are required to instantiate/invoke them and that stay constant during the lifetime of the entity. Such attributes can be fixed in the scenario definition or delegated to parameters ("parameterized"), which turns the respective entity into an abstract entity. Examples of such attributes are:

    • color of a car

    • number of cars in a car group

    • speed of a car at the beginning of a scenario

    • distance between two cars to trigger an event condition

  • Attributes that change during the lifetime of the entity. Such attributes are called variables in OpenSCENARIO 2.0. The attributes have a time history which is the result of a concrete scenario execution. The way the variables evolve over time depends on the concrete characteristics of the scenario entities, and these characteristics may be affected by parameters. Examples of such attributes are:

    • speed of a car

    • distance of a car to another car

    • time to collision between one car and another

  • Attributes that are the result of the execution of a scenario. Such attributes are called observations. Examples of such attributes are:

    • The duration of the scenario (i.e. the actual time span the scenario from the scenario start time instance and the scenario end time instance)

    • Has a car collided with any other entity?

The different nature of these attributes is reflected in the way they can be influenced/controlled in OpenSCENARIO 2.0:

Constraints

Parameters can be influenced by constraints

keep(v.color === green)
keep(initial_speed === 50kph)

The concrete value of each parameter must be known, when the entity which the parameterized attribute belongs to comes into life. This is

  • the time of instantiation of an actor

  • the time of invocation of a (sub-)scenario

  • the time of initialization of a model (i.e. just before it starts to operate)

This point in time during the execution of a complex (structured) scenario fixes two aspects with respect to the lifecycle of a parameter:

  • At this point in time, all constraints that the parameter participates in must be satisfied (otherwise a contradiction exception is raised).

  • From this point in time onwards, the value of the parameter must remain the same.

Variables and observations can be used in constraint expressions, however, only parameters will be affected by constraints.

As parameters get selected exactly at the moment when the scenario invocation starts (or a model or actor gets instantiated), at that time all variables / method calls get evaluated.

Alternatively, the time instance at which the variable shall be sampled for the constraint evaluation must be defined (and this time instance must not be later than the time when any of the parameters in the expression must be known). This must be discussed further during standardization.

Observations must occur when the variables have their final value (so that they can be captured), but parameters are resolved beforehand, when the scenario is entered, so it can execute.

serial:
    phase1: ...
    phase2: v2.cut_in_from_right with:
           # variable in constraint
           keep(initial_speed == v1.speed@phase1.end-10kph)]
Modifiers

Variables can be influenced by scenario modifiers

speed([20..80]kph)
position([30..60]m, behind: v2)

While parameters must not change during the lifetime of an entity, variables do. The way they change depends on the actions and interactions of the entities in the scenario. This can be influenced by specifying how particular actions (such as driving) should be performed, for example with a speed between 20 and 80 kph.

Parameters can be used for the arguments of scenario modifiers.

Some modifiers need not be expressed explicitly, because they result implicitly from continuity requirements ("physics"), such as the initial speed/position of a car at the beginning of a phase must match the end speed/position of the car at the end of the previous phase.

Observations can be influenced by scenario modifiers

target_duration(80s)
max_duration(80s)
avoid_collision(true)

Like influencing variables, modifiers can instruct the scenario (executor) to achieve a particular result, like a target duration of 80s (which may or may not be achieved due to uncontrollable reasons).

Examples
Parameterization of initial speed
scenario drive_along:
    v: car # parameter of type car
        initial_speed: speed # parameter of type speed
    do serial:
        v.drive() with:
            # parameter is used in modifier
            speed(initial_speed, at: start)
Example: Parameterization of target speed in a speed range
scenario drive_in_speed_range:
    v: car # parameter of type car
    min_speed: speed               # parameter of type speed
    max_speed: speed               # parameter of type speed
    keep(min_speed < max_speed)    # constraint to ensure a true interval
    keep(max_speed < 130kph)       # constraint to stay in legal range
    do serial:
        v.drive() with:
            # parameter is used in modifier
            speed([min_speed..max_speed])

5.4.3. Parameter probability distributions

Basic concept of parameter stochastics

Sampling from probability distributions allows generating a collection of scenarios from a parameter space representing the most likely parameter combinations. A typical use case is to derive probability distributions from field data and represent for instance headways using a normal distribution or create a multivariate parameter distribution of e.g. cut-in distance and relative speed.

The stochastic modelling of the parameter space is done using dedicated tools. The resulting definitions of the parameter space shall be stored in the scenario definition.

Standard stochastic models for scenario elements are:

  • Uniform distributions

  • Normal distributions, including multivariate normal distributions

  • Histograms

Other types of statistical models are to be handled by external tools (such as OptiSlang, modeFRONTIER, R, MATLAB), since the amount of possible statistical models needed to cover all use cases cannot be foreseen. Besides covering the most common use cases, normal distribution and histograms represent examples of how other parametric and non-parametric models can be utilized in the scenario description language.

Examples for parameter stochastics

Sampling from uniform distribution can easily achieved using ranges:

keep(p2 in [30..50]kph) # a parameter range

Applying normal distributions and histograms can be achieved by calling external methods, which access the statistical model:

def normal(mean: real, sd: real):real is only \
external.python("numpy.random.normal", mean, sd)
We are using this definition of the normal distribution sampling method to explain how any sampling method can be integrated into the scenario definition. In fact, this and other basic sampling methods are expected to be defined in a standard library.

Structs may allow using representations of stochastic models for easier parameter handling:

struct normal_p:
    mean: real
    sd: real

actor car: #or some other container
  def sample_normal(normal: normal_p):real is only \
  external.python("numpy.random.normal",normal.mean, normal.sd)
  v_desired_p: normal_p with:
    keep(mean == 30)
    keep(sd == 5)
  v_desired: speed
  keep (soft v_desired == normal(v_desired_p) * 1kph)

Similarly, structs allow using multivariate normal distributions and histograms in a uniform way. Here is an example making most cars with high maximum speeds also have a higher acceleration using a 2d-normal distribution:

struct mv_normal_p:
    mean: list of real           # list of mean values
    cov: list of list of real    # covariance matrix using list of lists

speed_acc: mv_normal_p with:      # struct representing parameters of a
                                  # multivariate normal distribution between
                                  # maximum speed and maximum acceleration
    speed_acc.mean == [100, 2]    # mean for maximum speed and acceleration
    speed_aac.cov == [[20, 0.4], [0.4, 1]] # covariance matrix

keep(soft speed, acc == normal(mv_normal_p)*(kph, mpsps))
Example for using histograms:
struct histogram_p:
    bins: list of real      # n+1-element list defines the bin edges
    value: list of real     # n-element list defining bin heights

my_speed_p: histogram_p with:
    bins: [0, 10, 20, 30, 40, 50]
    freq: [0.1, 0,1, 0.3, 0.3, 0.2]

keep(soft my_speed == histogram(my_speed_p)*kph)
Separation of scenario and parameter space

An appropriate workflow for parameterization of logical scenarios (in the Pegasus sense) can be achieved by storing parameter spaces, i.e. the constraints defining them, in a separate file (or multiple separate files).

Only constraints for defining characteristics of the scenario that must hold true for any parameter combination are defined in the abstract/parameterized definition of the scenario.

Such a scenario could be:

Example: Abstract/parameterized scenario
# file my_scenario.osc:
scenario drive_in_speed_range:
    v: car                                # parameter of type car
    min_speed: speed                      # parameter of type speed
    max_speed: speed                      # parameter of type speed
    keep(min_speed < max_speed)           # constraint to ensure a true
                                          # interval stays inside the
                                          # abstract scenario description

    do serial:
         v.drive() with:
             speed([min_speed..max_speed])

Referring / extending such a basic scenario, a logical scenario with a more concrete parameter space can be constructed:

Example: Logical scenario narrowing down / defining the parameter space (constraints)
# file my_logical_scenario.osc
import my_scenario
extend drive_in_speed_range:
    keep(max_speed in [100, 130]kph)    # ...or some distribution as shown
    keep(min_speed in [10, 30]kph)      # in the examples above

This workflow allows greater reusability of abstract scenario definitions.

Replacing the parameter space with concrete values

With such a separation of the scenario logic and and the parameter space definition, a process can be set up where parameter sampling and scenario execution can be performed by separate, specialized, tools. The advantage is that the first tool that samples the parameter space only needs to process the .osc file(s) that contain the subset of the scenario definition language required for parameter space definitions, while the file(s) that contain the scenario logic (and thus the full langue support) will be processed the second tool which executes the concrete scenario.

Extending on the examples in the previous section, the first step in such a process would transform the file my_logical_scenario.osc into a concrete scenario:

Example: Parameter space after concretization by a parameter space sampling tool:
# file my_concrete_scenario.osc
import my_logical_scenario
extend drive_in_speed_range:
    keep(max_speed === 123kph)
    keep(min_speed === 28kph)

5.5. Scenario Building Blocks

A Scenario is a "description of the temporal development" of road users (actor entities) defined by their actions, where temporal activation (defining when) "is regulated by" conditional "triggers". A scenario comprises both scenery and dynamic elements.

To achieve all of this, a scenario may be composed of the following building blocks:

  1. Actors: The acting and reacting entities/objects of a scenario (for details please refer to Appendix A)

  2. Actions: The basic operations that actors are able to perform. Actions are atomic in the sense that they are not further decomposable into smaller parts, i.e. they are atomic scenario invocations. For examples of concrete actions provided by different actor types see the section about the Entity Definition.

  3. Atomic Phases are instantiations of actions of certain actors enriched by modifiers.
    An atomic phase consists of

    • an Actor or a Group of Actors that perform the action

    • an Action (e.g. drive) that is to be performed by the actor

    • a set of Modifiers that direct in what way the action is to be performed (see Section 5.4.2.3)

    • references to Events / Conditions that define when actions should occur (see [Events-and-Synchronisation])

  4. Parametrized Invocation of User-Defined Scenarios allowing for reusability of scenarios e.g. defining an overtake scenario and using them in different contexts

  5. Temporal Composition Operators (as e.g. serial, parallel, etc ⇒ see Section 5.5.4) to create a new phase by composing

    • atomic phases,

    • invocations of other scenarios, or

    • arbitrary compositions of atomic/complex phases and scenario invocations

  6. Constraints (see Section 6.4 on parameters and constraints for details)

  7. External Methods with a well-defined interface (defined inputs and outputs) that may be written in any other programming language and called from a scenario file e.g. to calculate certain metrics like Time To Collision (TTC)

5.5.1. Actions

Actions define the basic capabilities of actors types. They constitute the fundamental building block to describe the dynamic behavior of actors in a scenario.

An Action is essential to define what actually should happen. This is much like a verb in a sentence, where actions are the most common verbs. Without a verb you cannot describe the action / what happens in a sentence. Without actions you cannot define what happens within a phase.

In Section 4.2 a class hierarchy of actor types is defined including an intentionally incomplete list of actions the respective actor types are able to perform.

It is essential that not only do the actor types form an inheritance hierarchy using the mechanisms described in Section 4.2, but more concrete actions themselves are also derived from more abstract or basic actions: Given basic actions like Move, Communicate, and Change, an example of a concrete action provided by a Vehicle actor type might be the action Drive, derived from the Move action.

It is expected that a robust set of frequently needed actions will be provided as part of the standard library that standardized as part of OpenSCENARIO 2.0, based in part on the identified actions of OpenSCENARIO 1.0. This will not only enable easy construction of new scenarios, but also provide for enough commonality across scenario users to increase readability and reuse through a common core vocabulary for scenario expression.

5.5.2. Modifiers

Modifiers are used to influence (i.e. modify) the behavior of particular scenario invocations, including actions as well as composite scenarios. They can be seen as structured specifications for intended behavior, which are interpreted by the scenario; they do not consume simulated time by themselves. More precisely, they are stateless; there are no state variables associated with modifier instances.

Modifiers influence the behavior of actors indirectly, by constraining the actions that control the actor. While the specifications provided through modifiers can be seen as constraints, they are not constraints in the sense of Section 5.4, in that they are interpreted at runtime by the scenarios, whereas constraints are evaluated prior to the invocation of a scenario. Furthermore constraints only influence parameters, and only through the use of these parameters in modifiers and scenarios do they influence the actual scenario behavior.

For instance the modifier speed([1..5]kph, faster_than: car1) constrains the speed of the receiver to be relative to another car. The constrained property does not change the actor’s speed state variable directly. Rather it is passed on to the simulated actor affecting its behavior, and thus eventually influences the actual speed captured in the actor’s state variable.

Like scenarios, modifiers live within the namespace of the actor in which they are defined. While the interpretation of a modifier thus rests with the scenario and actor being addressed, a set of modifiers common across scenarios will be provided as part of the standard library.

The currently envisaged set will comprise the following basic kinds of modifiers among others:

  • State modifiers, like speed(), position() and so on.

    • These influence the state variables of the corresponding actor.

    • Such modifiers can relate to some time reference. One can specify at: start or at: end to specify that the corresponding state variable constraints only apply at the start or end of the corresponding phase; otherwise, they apply throughout.

    • It is expected that more complex state modifiers, that for example relate two actors, like time gap, distance gap, or even time to collision or headway will be provided as well as more basic state modifiers like speed() or acceleration().

  • Path modifiers, like path_min_lanes() or path().

    • These also constrain some location-related state variables, such as where the car is during the phase.

    • They have the indirect effect of choosing various road elements on the map.

  • Event-related modifiers like on, until and synchronize use events to execute a block, exit the current invocation or achieve synchronization, respectively.

  • The in modifier provides a way to insert a block of modifiers into an existing invocation.

  • User-defined modifiers can contain anything that is legal in a scenario, except for the behaviour (do) part. This, of course, includes modifier invocations.

Some modifiers can only be embedded in specific scenarios. In the following example, a user-defined modifier can be applied to drive() only, as indicated by the of keyword in the header:

modifier car.speed_and_lane of drive:
    s: speed
    l: lane
    keep(speed > 10kph)
    speed(s)
    lane(1)

Once defined, the modifier can be used with various values, for example:

car1.drive() with: speed_and_lane(15kph, 1)

As seen in this example, a modifier can itself use constraints to constrain its parameters, it is however distinct from the way it and its parameters influence the behavior of the scenario it is applied to.

The overall role that modifiers play in the language is to provide controlled specificity to the behavior of actors, as directed by scenarios and actions: A generic action, like e.g. drive, does not prescribe in any detail the actual behavior of the actor over time. In connection with modifiers, though, the specifics of e.g. where, how, and when can be given to any level of detail, thus concretizing the actual behavior.

In combination with parameters and constraints, modifiers provide the mechanisms to move between very abstract scenarios, which leave many specifics intentionally undefined, to concrete scenarios, which provide concretizations for all unspecified parts of an abstract scenario (see Concretization and Creation of Scenarios for details of the pragmatics of this process).

5.5.3. Phases

A Phase, is a form scenario invocation with the possible addition of modifiers. Each phase has an (explicit or implicit) start and end point as well as a duration interval specifying the allowed time that may pass between start and end of that phase.

A phase can also be used to describe a block of time as part of a serial operation or as a part of a parallel operation. Please find more details about this topic in the section Temporal Composition Operators.

An Atomic Phase is the smallest temporal building block and is defined by who (the actor) is performing what (the action) and the details that direct how (the modifiers) the action is performed. This may be further substantiated by referring to events specifying when the action should start or end (explicit start/end point). If not specified explicitly the allowed start and end points are determined by the context the phase is embedded in (e.g. a composition with other phases) and whether all modifiers are satisfied. One may consider an atomic phase as a kind of minimal scenario.

Value’s Temporal Aspect

For the action of a phase and its modifier it has to be determined whether they relate to the whole time span of the phase (invariant) or only to the start (initial) or end of the phase (final) denoted as Value’s Temporal Aspect.

  • Invariant: An invariant specifies the behavior of an actor for a whole phase.
    e.g. Car1 drives with a speed between 60 and 80 kph. This is the default interpretation if no other modifier is used.

  • Initial (at start): An initial modifier (at start) specifies the behavior of an actor at the start of the phase.
    e.g. Car1 drives with a speed between 60 and 80 kph at phase start.

  • Final (at end): A final modifier (at end) specifies the behavior of an actor at the end of the phase.
    e.g. Car1 drives with a speed between 60 and 80 kph at phase end.

Other temporal aspects are

  • the Minimum/maximum change rate specifying the allowed change rate of a variable (like speed of a vehicle) during the phase.

  • the Minimum and maximum duration specifying the allowed time span between start and end of the phase.

This is illustrated in the following figure where:

  • the x-axis represents the time

  • the y-axis represents the value of a variable

  • the dark blue curve denotes an example for an evolution of a value of a variable over time.

  • the vertical red bi-directional arrows at the left and right border of the blue area represent the allowed range of value at the start and end of a phase, as well as during the whole phase (invariant)

  • the red uni-directional arrows denote the minimum/maximum change rate of the value during the whole phase

  • the dotted blue vertical lines mark the start area and end area of the considered phase. The phase may start as soon as the value is contained in the specified initial interval and it may end as soon as the value is contained in the final interval and the actual duration of the phase is between the allowed minimum and maximum duration (represented by the horizontal light blue arrows at the top of the figure).

  • the light blue area marks the allowed values at certain points in time considering all the intervals and change rates, i.e. if the dark blue curve would leave this area, a constraint is violated. However, the change rate also applies for values within this area, i.e. if the slope of the blue curve gets out of the minimum/maximum change rate a constraint is violated as well.

    image
    Figure 3. Value’s temporal aspects
    Example for value’s temporal aspects
    Accelerate: car1.drive(path) with:
        speed([0..1]kph, at: start)     # initial speed at start of phase
        speed([70..80]kph, at: end)     # final speed at end of phase
        speed([0..80]kph)               # invariant; range during the full phase
        acceleration([2..5]kphps)       # acceleration range during the full phase

5.5.4. Temporal Composition Operators

A scenario can be composed of a hierarchical composition of phases (or scenarios) by using temporal composition operators like serial or parallel in an arbitrary order. This is illustrated by a generic example in the following figure. Here, a scenario is composed by a hierarchical combination of sequential and parallel composition of phases.

image
Figure 4. Hierarchical composition of phases to a scenario
image
Figure 5. Legend of symbols and terms used in this section
Sequential Composition of Phases

Phases can be composed sequentially, which creates a new phase where the composed phases happen directly one after another. For a feasible sequential composition of two phases P1 and P2, the value’s temporal aspects at the interface between both phases need to be compatible. In concrete terms, this means:

a) That the intersection of each final interval of P1 with the respective initial interval of P2 must not be empty. This is indicated in the figure below by the red and blue shaped boxes in the middle and their intersection colored in purple.

b) This means that the point in time where P1 ends denoted tend(P1) has to be identical with the point in time where P2 starts denoted t_start(P2) in the figure below.

image
Figure 6. Sequential composition of phases
Example for sequential composition of phases
do serial():                # Sequential composition of the phases
    P1: Accelerate()        # P1 defined by an instantiation of the scenario 'Accelerate', and
    P2: Change_Lane()       # P2 defined by an instantiation of the scenario 'Change_Lane'
Parallel Composition of Phases

Phases may also be composed in parallel, which creates a new phase where both phases happen simultaneously. This means:

a) That the composed phases (have to) start and end at the same point in time i.e. tstart(P1) = tstart(P2) and tend(P1) = tend(P2).

b) This means that the actions including their modifiers that are specified in each of the composed phases need to happen leading to a logical conjunction of that phases i.e. P1 & P2.

image
Figure 7. General Case of Parallel Composition of Phases
Example for parallel composition of phases
do parallel():          # Parallel composition of the phases
    P1: Accelerate()    # P1 defined by an instantiation of the scenario 'Accelerate', and
    P2: Change_Lane()   # P2 defined by an instantiation of the scenario 'Change_Lane' meaning
                        # that P1 and P2 both start and end at the same point in time

For the composition of atomic phases this means that the intervals induced by actions that relate to the same variable (e.g. speed of Car1) are combined by an intersection (set theory), i.e. for the composed scenario only values are allowed that are within all the intervals specified for the respective variable in one of the composed phases. For atomic phases this means that all the following intervals are intersected: initial intervals, invariant intervals, final intervals. Furthermore, for the change rate of the composed scenario holds the minimum of the maximum rates of each phase and the maximum of the minimum rates of each phase i.e. (min(maxRate(P1),maxRate(P2)) and (max(minRate(P1),minRate(P2)). The same holds for minimum and maximum duration of the composed phase i.e. (min(maxDuration(P1),maxDuration(P2)) and (max(minDuration(P1),minDuration(P2)).

image
Figure 8. Parallel composition of atomic phases
Mixing of Phases

A further temporal composition operator for phases is mixing. Mixing is in some sense a more abstract operator as it allows in the end sequential as well as parallel combination of phases. Instead it created a new phase where the mixed scenarios may happen in any constellation as long as they happen eventually. This is visualized in the following figure where two phases P1 and P2 are mixed. The lower part of the figure illustrates that ordering in time of both scenarios may be arbitrary, i.e. P1 may happen before P2, P2 may happen before P1, and both may also happen in any concurrent manner as long as eventually both phases P1 and P2 have finished.

image
Figure 9. Mixing of phases
Example for a mixing of phases:
do mix():               # Mixing of the phases
    P1: Accelerate()    # P1 defined by an instantiation of the scenario 'Accelerate', and
    P2: Change_Lane()   # P2 defined by an instantiation of the scenario 'Change_Lane' allowing
                        # any concurrent (including sequential and parallel)
                        # execution of both phases

Another composition operator is the one-of operator allowing to specify alternative branches a scenario may follow i.e. either Phase1 may happen or Phase2 may happen (but not both).

Semantically this means a logical disjunction of the actions of the respective phases. In the following figure a set of n phases P1 to Pn is specified from which exactly one needs to happen to satisfy the composed scenario phase. To be more precise, exactly one of the phases from the set {P1, …​ , Pn} have to happen written as P1 XOR …​ XOR Pn.

image
Figure 10. Choose one of multiple phases
Example for one-of operator
do one-of:              # Choose exactly one listed phase:
    P1: Accelerate()    # Either 'Accelerate' or
    P2: Change_Lane()   # 'Change_Lane' happens (not both)

Temporal Causation by Events and Synchronisation

Apart from temporal composition operators there are further mechanisms available to specify (temporal) dependencies between phases and scenarios, respectively:

  1. Synchronization of mixed scenarios: Scenarios should run concurrently but synchronize on certain specified events/conditions

  2. Clock-related actions: Actions which relate to the value of a clock e.g. whose execution starts after a specified period of real time e.g. wait for 10 seconds

  3. Phase starts or ends based on events: A phase of a scenario is first started when a specified event occurs or ends as soon as a specified event occurs. The specified event is emitted by another scenario or phase.

Open questions with respect to scenario coverage: Is the scenario only covered if the event occurs together with the defined trigger? Or can an event also be optional meaning that the scenario is also covered if an action never occurs as long as its trigger never occurred ⇒ conditional actions?
Event Specification

An Event represents an exact point in time. This can be achieved by either specifying certain conditions that need to be satisfied for this event to occur, or by explicitly emitting events during a phase.

Example for the specification of an event based on certain conditions that need to be satisfied.
event too_close is distance_between(car1, car2) < 10meter
Event-Based Synchronization of Mixed Phases

When mixing phases (see Section 5.5.3) these phases may happen in any ordering and concurrency. But sometimes one wants that certain events in the mixed phases happen at the same time meaning a synchronization of the two phases on these events. This is illustrated in the following figure, which is an excerpt of the figure explaining the mix operator with an additional vertical red line marking that the composed phases should be synchronized at the events event_P1 and event_P2.

image
Figure 11. Mixing phases with synchronization

The following example demonstrates mixing of Accelerate and Change_Lane: Any concurrent (including sequential and parallel) execution of both phases where the specified events happen at the same point in time (synchronous) i.e car1 drives 80kph in Accelerate and crosses the lane marking in Change_Lane.

Example for mixing phases with synchronization
do mix():
    P1: Accelerate()
    P2: Change_Lane() with:
        synchronize(@drive80kph, @crossMarking)

5.5.5. Action start or end based on events

There is also the possibility to specify that an action (and hence also the atomic phase the action belongs to) should first start when a certain event has occurred (which may be emitted by another phase). In the following figure an event event is specified which causes the phase to start using the keyword on.

image
Figure 12. Starting a phase on an event
Example for starting a phase on an event
serial:
  wait @lane_ahead_free() # initial action
  accelerate()

Accordingly, also the end of a phase can be coupled to the occurrence of a certain event, which is illustrated in the figure below by using the keyword until and the reference to an event $event.

The difference between using events vs. using final intervals is the following:

  • When specifying final intervals this means that the phase can only end if this interval is satisfied (i.e. the current values are within that interval). But it does not have to end at the first point in time where this is the case i.e. it may be that the values have been in that interval already before but the phase may still go on. Hence, the final interval does not refer to a specific point in time but only to certain conditions that have to hold. Together with the minimal and maximal phase duration a time interval can be derived where these values have to be satisfied at the latest and may be satisfied at first. This in indicated by the dotted blue vertical lines at the phase end.

  • When specifying that a phase ends at a certain event, this relates to an exact point in time determined by the event characterization. If, for example, defining an event that fires as soon as the final interval is reached, the phase ends at the first point in time where this is the case after the start of the phase. To summarize, events relate to a point in time and final intervals determine a time interval where the phase is allowed to end.

    image
    Figure 13. Phase ends as soon as event occurs
    Example for until event
    Drive_fast_until_it_rains: car1.drive() with:
        speed([115..120]kph)        # car1 should drive 115..120kph
        until(@rain_starts)         # until it starts raining
                                    # (event that is emitted by another phase)

6. Usage and Pragmatics

6.1. Definitions and Scope

Scenarios are used throughout the whole development process of driving assistance systems or automated driving functions (see Scenarios accompanying the development process). It is common ground, "that scenarios can be described in several levels of detail and different forms of notation. Scenarios may be expressed in formal, semiformal, or informal notation [8]."

v model
Figure 14. Scenarios accompanying the development process [9]

Functional Safety as part of ISO 26262 (Part 3) requires an itemized definition that describes "the functional concept, system boundaries, the operational environment, the legal requirements, and the dependencies on other items." These boundaries, functional concepts and Operational Design Domain (ODD) are very important in the process of scenario creation as well.

The Operational Design Domain (ODD) defines nearly 99.9%+ of real world system boundaries that represent a device under test’s operational environment goals and constraints. The ODD as model of what to describe is what we understand today about the world and it is a growing set. This coverage is a measure of the completeness with which the tested scenarios account for all real-world possibilities. These scenarios provide coverage within an ODD and define the full factorial of defined scenario space.

Scenario Space is the full factorial of all the concrete scenario possibilities given sampling (of what you could define) and given the parameter value choices; this is usually defined with narrowed parameter spaces. These scenario spaces are used for system description of qualification testing in order to ensure an automated vehicle meets the capabilities required within the ODD.

If test cases are executed by utilizing Scenarios Spaces, each test case is evaluated to produce results: pass / fail / etc. These results are used to prove out safety cases for production feature use case(s). For this to occur, coverage must be classified as sufficient to fully cover the ODD.

Test Coverage / Test Space is the full factorial of overlapping test cases (and their referenced Scenario Spaces). Test Coverage is the way we prove the designs meet quality and safety standards.

Most scenarios start as ideas of what may stimulate or pose a hazard or risk for an automated vehicle. This idea or scenario summary typically is just a paragraph that describes the stimuli of a device or vehicle under test. This idea may not yet be associated with a use case or an ODD and it is at the highest level of abstraction; this level of abstraction is sometimes known as a Scenario Summary.

Note: A Scenario Summary is best supported with pictures that show the relationships of the stimuli. A good Scenario Summary lists all the actions of all the actors. A Scenario Summary may also document conditions that give context to when actions of each actor happen.

The next step is to take a Scenario Summary to the next level of abstraction: when this idea or Scenario Summary becomes associated with an ODD or a Feature Use Case / Technology Use Case, the scenario realizes coverage intentions. In the case of testing, these relationships provide context to what will be tested and why; this is one possible justification for breaking scenarios into smaller pieces. When a scenario is connected to an ODD or operational concept, it is commonly referred to as a Functional Scenario. A functional scenario is one possible representation of an Abstract Scenario.

Such Abstract Scenarios can then be refined to Logical Scenarios by introducing parameter ranges for each parametrizable entity attribute. By using selection mechanisms for each parameter range, concrete values can be selected to transfer a Logical Scenario to a Concrete Scenario, which represents a single, accurate scenario for testing or simulation purposes. This requires the scenario to be completely defined, so that, e.g., the simulation framework is able to run it.

Finally, this leads to a Concrete Scenario where nothing is left to abstraction, all parameters and references are assigned to values and models and objects of models.

6.2. Abstraction, Concretization and Creation of Scenarios

This section defines how different types of scenarios are created and defined given pragmatic rules of abstraction and concretion. These rules allow for translation and transformation between levels of abstraction.

Scenario Pragmatics - Translation of Intent into Implementation:

A major goal for development and test of automated vehicles is to measure the completeness with which testing (scenarios) accounts for all real-world possibilities, given development use cases. In order to approximate or meet this goal, scenario descriptions are required for testing.

At inception, when a Scenario Summary is created, it is created to satisfy one or more of the following needs:

  1. Capture an idea that may stimulate or pose a hazard or risk for an automated vehicle

  2. Expand coverage to satisfy the ODD or the required functionality

  3. Define characteristics of situation(s) that may satisfy feature and technology use cases

  4. Create an exploratory scenario in order to capture best parameters and timing for validation testing

  5. Understand / analyze macroscopic traffic effects given naturalistic behavior (as obtained from highway drones, vehicles or infrastructure sensors, …​)

What is necessary to take a Scenario Summary to the next level of abstraction?

When a Scenario Summary becomes associated with an ODD or with a Feature Use Case / Technology Use Case, the scenario realizes coverage intentions. These relationships provide context to what will be tested and why; this can help with reasons for breaking / fracturing scenarios into small pieces. When a scenario is connected to the ODD or Operational Concept, this type of scenario is commonly known as a Functional Scenario.

Rules of Abstraction:

These rules may change with the progress of OpenSCENARIO, OpenDRIVE and OpenCRG. Some of the rules refer to mapping scenarios and road networks – concepts which are still under development.
  1. A well-intentioned value abstraction is a named space that intends to be made concrete. This is known as a parameter. Every parameter shall have a name which can be used as reference. This name enables assignment of values as part of concretization, which is the process of making a scenario concrete. Another reason why parameters should be named is to enable addressing of parameter values for the purpose of performing a scenario evaluation.

  2. All named value abstractions and referenced objects shall have unique names.

  3. When composing scenarios within scenarios (or composing phases inside of scenarios), all independent entities shall be resolved to use unique names.

  4. All actors must have a starting location; before concretization, this can be abstract

  5. All actors must have a starting speed or be explicitly stated as static; this starting speed can be abstract.

  6. An abstract position must be able to be interpolated at the point of concretization, to an exact starting location given a frame of reference to some object or road reference.

  7. In order to use modifiers that detail or describe characteristics of a movement in time, an event (or a conditional trigger) must first be specified defining the condition for when this moment can occur.

  8. When describing movement in time or a phase as an abstraction, it may not be required to describe when the phase starts. However, all logically abstract scenarios must specify conditions for all phases or conditions for all components of phases to define abstractly when they occur. This allows for time and space to be locked down during concretion.

  9. An Actor traveling on a Road Network is assumed to travel in the direction of legal flow or traffic flow unless otherwise specified (i.e. against traffic flow).

  10. An Actor or object shall have a reference point. This is by default the geometric center of the object, unless otherwise specified.

  11. A measured Path Distance aka curvilinear distance or S-Distance is measured from the Actor’s (of the action) object reference point to the referenced object reference point of the named object; however this assumes center of lane for both the actor and the object to measure using the curvature of the road, not a direct point-to-point distance.

    pragmatics 2
    Figure 15. Distance of a path along a curved track.
  12. A distance reference to an object always assumes the center of the lane, even when measuring biased objects, or objects measured from lane to lane, or measured from Road Segment to Road Segment.

  13. When a heading angle is not specified, the heading angle shall match legal traffic flow, unless explicitly specified otherwise through an angle, trajectory or model.

  14. When a lateral bias is not specified, an Actor or object is snapped in center of lane to the road center, unless explicitly specified otherwise through a bias / offset, trajectory or model.

  15. When a lateral bias or angle is specified, a + or - sign is given (with respect to meters of bias / offset or angle of rotation) where: positive or negative is determined by the flow of the lane, inherited from the Road Network, left of flow being negative (-), and right of flow being positive (+).

    image
    Figure 16. Legal Traffic Flow & Lateral Bias
  16. The Road Network as a model should have getters and setters for measuring distance.

  17. When representing abstract lanes, the lane parameter name shall be unique given all the road segments linked together.

  18. When creating a Logically Abstract Scenario, a mechanism shall be provided to link / connect abstract road segments in order to inform road selection during parameter selection, thus enabling concretion. This also provides textual context to the road network layout, that is another frame of reference other than just a picture.

Rules of Concretization:

These rules may change with the progress of OpenSCENARIO, OpenDRIVE and OpenCRG. Some of the rules refer to mapping scenarios and road networks – concepts which are still under development.
  1. A Concrete Scenario shall satisfy all abstractions, where each abstraction or parameter space is narrowed to a single concrete value assignment.

  2. A Concrete Scenario shall have value assignments that are computationally sound and satisfy the laws of physics.

  3. All abstract roads, abstract road references, abstract road segments and abstract lanes must be satisfied by linking each abstraction to concrete elements within a Road Network and its defined models.

  4. All abstract models or model references must be satisfied by linking each abstraction to concrete elements within the models. A Concrete Scenario’s reference to the Models must provide paths to access these models and their interfaces, allowing for getting and setting.

Value Abstractions:

Scenario can have known or unknown values. These unknowns can be represented as Abstractions. Every scenario fragment that defines who, what, when, because of what, in what way, under what constraint will have values. These values may be defined or may be undefined. The undefined values may use a parameter, so values can be defined later on.

image
Figure 17. Possible Work Flow from Abstract Scenario to Test Execution (specific tool names are to be ignored)

Personas:

The different personas of users and their expected interactions with a possible scenario workflow (see Figure 17) have been identified as follows.

  1. Scenario creator - This individual is in charge of authoring the scenario for the first time even if simply creating a placeholder object in the toolchain to be assigned to someone else for completion.

  2. Scenario editor - This individual is in charge of adding all necessary content for the scenario to be functional and ready to be used. This individual can also make changes to a scenario already authored in order to make corrections, add details or produce more abstract or more concrete versions of the existing scenario.

  3. Scenario reviewer - This individual will inspect and verify the scenario to ensure that all parameters, metadata and constraints in it are producing a valid test. This individual can make comments, add/remove metadata but cannot alter the definition of the scenario itself.

  4. Scenario approver - This individual will approve the scenario to be used for production purposes according to operational domain constraints. Scenarios without this approval can be executed for preliminary evaluation but cannot be used for any certification or production evaluation purposes.

  5. Scenario maintenance operator - This individual can perform destructive operation on scenarios such as removal from scenario repository, renaming, and retirement of the test.

  6. Scenario reporter - This individual can read the contents of all scenario data and metadata and run evaluations using preset parameters in the scenario. This individual cannot make changes to metadata or data within the scenario.

User interface requirements:

This section describes pragmatic user interface features and characteristics. These features will enable efficient interaction of OpenSCENARIO 2.0 users with the scenarios. The features are expected to be implemented in different tools supporting the format.

  1. Provide navigation of scenario library to every users depending on level of access to perform actions on scenarios

  2. Provide administrative abilities to manage access to individual users depending on their responsibilities in the workflow

  3. Facilitate finding individual and lists of scenarios based on metadata including:

    1. Creation, edition, review, approval, deletion, last evaluation timestamps

    2. Individuals that performed a step in the workflow for each scenario (e.g. creation, edition, …​)

    3. Ontology of the scenario (e.g. what combination of Operational Design Domain constraints the scenario tests)

    4. Version of scenario

    5. Set as defined by scenario creator/editor

    6. Unique identifier of scenario

  4. Provide a mechanism to create and preserve a query to find scenarios that meet user defined search criteria

  5. Provide a view to create a scenario for the first time allowing data entry to uniquely identify the scenario and all necessary evaluation parameters

  6. Provide ability to perform actions (edit, review, approve, …​) on an existing scenario according to level of access of each user

  7. Provide ability to select scenarios as lists and perform bulk operations (repetitive same actions for multiple scenarios in one step)

  8. Provide a view to select what data from scenarios to display upon evaluation against system under test

  9. Provide results of scenario evaluation that can be read by humans based on key/value pairs or object trees with populated nodes or both

  10. Provide ability to export results to text formats including .csv, .txt, .xml and .yaml

  11. Provide an edit view where all parameters can be modified graphically or by entering text

  12. Provide a play view where the scenario can be previewed without running the test against the actual system under test

  13. Provide a play view of an actual evaluation against the system under test

  14. Provide an open ability to read and load scenario definitions using OpensSCENARIO2.0 format

  15. Provide an import ability to read and load scenario definitions using pre-OpenSCENARIO2.0 formats when supported by tool

6.3. Library Concepts and Packaging

With the expected usage of scenarios at different abstraction levels, and it being aimed at different ODDs and different automated driving systems, the need for encapsulating scenarios in libraries is obvious. Other uses or use case descriptions not considered in this document also seem to indicate the necessity of scenario libraries.

Given that one of the main properties of OpenSCENARIO 2.0 is composability, or the ability to compose a new scenario out of a pre-existing scenario, libraries can also be used as a container for building blocks to enable productive creation of new sets of scenarios.

Libraries by themselves are not part of the OpenSCENARIO 2.0 format. However, the format itself should enable easy development of library and packaging mechanisms.

It should be easy to specify and extract meta data, tags and classifications that will be used to characterize scenarios and libraries and enable database implementations for scenario catalogs.

Different types of libraries could be:

  • For scenario definition

    • Scenarios (e.g. scenario database) or other scenario elements (to enable reuse)

      • Scenario elements, e.g. actor, environment, behaviour, road, ODD element, action

    • Suggestion or helper library: commonly used combinations of various descriptions of anything in the scenario e.g. actions and other elements in the language.

  • For scenario execution

    • Definition of models (actor models: driver, pedestrians ; behaviour model)

Implementation of the library concept is independent of any specific programming language of the implementation of the standard.

7. Measurement and Success Criteria

This section captures some of the pragmatics aspects of the scenario management, e.g. measurement and success criteria, observer constructs, and coverage. Those concepts and contents won’t necessarily be part of the scenario description, but can also be embedded in the test case descriptions. To illustrate the collaboration between test cases and scenarios, the concepts are nevertheless described in this section.

7.1. Observers and Observers Classification

Observers shall be the means to set, evaluate and grade the success while designing and executing OpenSCENARIO 2.0 artifacts. Success shall be measured based on compliance of the scenarios to the test plan, to test objectives, and hence to the expected behavior documented in the test specification. In addition, validity of the scenario shall be evaluated.

Success criteria shall be expressed as metrics and KPIs. They shall be defined by the designer and user of OpenSCENARIO 2.0 as well as by the provider of the language implementation and tooling behind it. OpenSCENARIO 2.0 allows for defining the success metrics in the core language with its evaluation and metrics constructs. Success metrics can be derived from the use of so-called observers that serve either as part of the scenario or as an additional part specifying how the Automated Driving System (ADS) is expected to behave.

Both scenarios and observers can be defined either in one common file or in separate files, depending on the user of the language.

Observers can be seen as part of the scenario. However, it is reccomended to abstract them away from the scenario, since they provide additional insights about the design and the execution of a scenario. Hence, they may provide different results for various test regimes (e.g. re-simulation (replay), simulation, proving ground, on road testing). Often, they do not require a specific scenario to be associated with them.  

Observers are divided into the following categories:

  • Generic safety checkers

  • Context-specific evaluators (e.g. scenario-specific evaluators, driving-mission-specific evaluators, scenario-quality evaluators) 

  • Coverage measurement models

  • Context-specific Key Performance Index (KPI) collectors.

Safety checkers shall evaluate the performance of the ADS functionality. They shall provide a Boolean result. They typically evaluate a condition that holds throughout the execution of a scenario (e.g. ego vehicle shall always keep a safe distance to the car in front of it). In addition, safety checkers can help evaluate certain certification and/or qualification parameters (e.g. a flag to mark real-time execution) required by the regulation providers and certification authorities. Safety checkers can also evaluate the validity of the scenario (e.g. at the compiler level).

Context-specific evaluators shall represent evaluation mechanism for the ADS. They compare the functionality and performance of the ADS to the expected behavior. There may be various types of evaluators, such as, for example, scenario-specific evaluators, or driving-mission-specific evaluators. Evaluators may be also called monitors, watchdogs, comparators, etc.

In addition, there are scenario-quality evaluators that shall assess the quality of the scenario, whether it is executable, whether it achieves its unambiguous goal, whether it is reusable across multiple test regimes on various platforms, etc. It is recommended to build this type of the scenarios into the toolchain where OpenSCENARIO is going to be executed.

Coverage measurement models shall measure test completeness of the select test plan. They also shall serve as a means to assess the diversity of the executed scenarios to help create metrics required by standardization bodies (e.g. SOTIF).

Finally, KPI collectors record the metrics computed in the scenarios and evaluators. These metrics shall serve as KPIs of the ADS and/or they shall assess the quality of the test plans.

A safety checker checks whether a certain rule holds at all times, whereas an evaluator is assessing the expected outcome versus the DUT performance once certain conditions are met. 

Each evaluator results in a verdict. The user of OpenSCENARIO 2.0 is equipped with the constructs to design additional context-specific verdicts that comprehend results (i.e. verdicts) of multiple evaluators, safety checkers, as well as coverage metrics and/or KPI metrics obtained by the use of any other observers.

The intent of the OpenSCENARIO 2.0 standard development phase is to provide a guide to write safety checkers, context-specific evaluators, coverage measurement models, and KPI collectors.

7.2. Coverage as a Measure of Test Completeness

Coverage-driven verification promises to minimize redundant effort by using "coverage" as a guide for directing verification toward untested areas of functionality. Coverage is defined as the percentage of verification objectives that have been met and is used to gauge progress of a verification project toward "verification closure".

Coverage metrics come in two forms:

  • Structural coverage can be automatically inferred from the implementation. Examples of that are code coverage. To be practical, code coverage typically captures reduced-order coverage aspects (e.g. statement coverage) rather than high-order path coverage which can grow exponentially with code size and therefore making it challenging to decide which code paths are traversable. Moreover, structural coverage cannot detect missing functionality, since it is based on the implementation, not the requirements.

  • Functional coverage is a user-specified metric and maps the test plan to the intended design functionality. It measures how much of the design specification, as enumerated by features in the test plan, has been exercised. It is based on the design requirement specifications and is thus independent of the implementation.

OpenSCENARIO 2.0 shall provide guidelines to offer language constructs for systematic executable specification of functional coverage models. Coverage data collection and analysis tools shall discover coverage gaps hence, ultimately improve test completeness.

The functional coverage constructs allow collection of:

  • Coverage (and cross coverage) of variables and expressions.

  • Automated coverage bins (equivalence classes of variable values or event sequences, etc.).

  • Coverage sampling triggers based on events, sequences, or procedural activation.

  • Runtime query of coverage.

Functional coverage measures what was tested so far, i.e., which scenarios were actually exercised, and for each such scenario what were the values of its various parameters.

Coverage collection is based on a hierarchical model that defines what values to capture. At the lowest level are coverage items that store the value of a specific parameter sampled at a specific time. Coverage items are assembled into inter-related metric groups, containing both coverage and KPI items. The coverage model should correspond to a verification plan, such that coverage results can be used as evidence of meeting the verification plan.

Coverage item values are typically broken down to ranges or buckets, mapping a continuous range into a histogram. Cross-coverage creates a multi-dimensional map of several related coverage items, which is a more rigorous metric than the individual items.

7.3. Temporal Aspects of Observers

A scenario can have a goal formulated in terms of the states of its actors. This goal can be set in the scenario class itself or at scenario invocation. Goals specify constraints on the state in which a plan finishes. Hence, the implementation of OpenSCENARIO 2.0 shall use temporal operators over first-order formulas involving state predicates.

The basic modal operators are:

  • always

  • sometime

  • at most once

  • at end

  • within

  • hold during

  • hold after

It shall be clarified during the implementation phase of OpenSCENARIO 2.0 how these operators are going to be used and whether they can be nested.

In the following section, examples of the temporal aspects are going to be presented based on specifying context-specific observers. The structure of the presentation is divided into three steps. First, the situation is described in plain English, then a pseudo-code is provided, finally a sample code snippet in the current version of M-SDL is provided purely for illustration purposes.

7.3.1. Example 1

English specification:

Set an upper bound of 10 seconds for the car to stop.

Pseudo-code specification:

ensure car.is_stopped() within 10.0 seconds

M-SDL specification:

scenario xy:
    do parallel:
        ...
        match:
            wait @right_event
            dut.car.drive(duration: [0..10]s) with:
                speed(0kph, at: end)
        else:
            dut.error("...")

    

7.3.2. Example 2

English specification

The car must achieve all other goals without ever exceeding 60 mph.

Pseudo-code specification

ensure always (abs(car.longitudinal_speed()) < 60.0 mph)

M-SDL specification:

scenario xy:
    ...
    on abs(car.longitudinal_speed() < 60mph):
        dut.error("...")

   

7.3.3. Example 3

English specification

The car must stop in ego lane only after the ego is moving fast enough.

Pseudo-code specification

ensure abs(ego.longitudinal_speed()) > 50.0 mph sometime before (car.is_stopped() and car.in_ego_lane())

M-SDL specification: 

scenario xy:
    do parallel:
        ...
        match:
            mix(inside):
                a: wait car1.is_stopped() and car1.in_ego_lane()
                b: dut.car.drive() with: speed([50..200]mph)
        else:
            dut.error("...")

 

7.3.4. Example 4

English specification

Restrict car’s lateral movement for 3 seconds.

Pseudo-code specification

ensure hold (abs(car.lateral_speed()) < 1.0 mps) during (5.0s, 8.0s)

M-SDL specification: 

scenario xy:
    do parallel:
        ...
        match:
            wait_time(5s)
            wait_time(3s) with:
                on abs(dut.car.lateral_speed() >= 1mps)
                    dut.error("...")

 

7.4. Key Performance Indicators (KPIs)

KPIs serve to record non-coverage metrics and help to assess the success of the observers while executing a scenario. KPIs measure this success based on compliance of the scenario execution to the test plan, to test objectives, and hence to the expected behavior documented in the test specification.

The standard library of OpenSCENARIO 2.0 shall include a set of predefined API methods to collect various KPIs.

KPIs are collected in order to assess the quality and performance demonstrated during execution. Together with coverage data, these metrics show how well did the system under test behave during various test conditions.

KPIs are collected by sampling key parameters at given times and storing their values for post-run analysis across multiple runs. KPI recording is based on a hierarchical model of performance items that are also combined into metric groups. Note that a single metric group will often include both coverage items (i.e., indicating how much of the scenario space was exercised) and performance items (i.e., indicating how well the system under test behaved in the exercised space).

7.4.1. Example 5

English specification

Collect time-to-collision KPI for a select scenario (at the end of lane change).

Pseudo-code specification

collect KPI (time-to-collision) at action / phase

M-SDL specification: 

scenario dut.cut_in_and_slow:
    ...
    # Sample the time-to-collision KPI at the end of change_lane
    !ttc_at_end_of_change_lane:=
        sample(dut.car.get_ttc_to(v1), @change_lane.end)

    # Record the KPIs into the cut_in_and_slow.end metric group
    record(ttc_at_end_of_change_lane,
        text: "Time to collision of ego car to cut-in car " +
              "at end of the change_lane phase")

7.4.2. Example 6

English specification

Collect distance between the ego car and the car ahead (throughout duration of the scenario) as a function of time.

Pseudo-code specification

collect perception_KPI (distance) at driving

M-SDL specification: 

scenario dut.detect_distance_ahead_at_anytime:
    ...
    # Sample the distance-to-car-ahead KPI as a function of distance in time
    !distance_to_car_ahead_at_anytime:=
        sample(dut.car.get_distance(v1), @anytime)

    # Record the KPIs into the perception.always metric group
    record(distance_to_car_ahead_at_anytime,
    text: "Function of the distance of the Ego car to the car " +
          "ahead in time throughout duration of the scenario")

7.4.3. Example 7

English specification

Collect distance between the ego car and the car ahead (throughout duration of the scenario) if flagged as value below 1 meter (unsafe).

Pseudo-code specification

collect perception_KPI (distance) at time when it is unsafe

M-SDL specification: 

scenario dut.detect_unsafe_distance_ahead:
    ...
    # Find the value of distance-to-car-ahead if flagged as unsafe
    flagged_below_unsafe_threshold:= time_when dut.car.get_distance(v1) < 1

    # Sample the distance-to-car-ahead KPI if flagged as unsafe
    !distance_to_car_ahead_at_anytime:=
    sample(dut.car.get_distance(v1),
        @flagged_below_unsafe_threshold)

    # Record the KPIs into the perception.always metric group
    record(unsafe_distance_to_car_ahead,
        text: "Unsafe distance of the Ego car to the car ahead")

7.5. Checking for errors

System under test (DUT) errors versus scenario failures

  • A DUT error means the DUT (ego car) did something wrong.

    • The language should provide a way to indicate this, invoking a zero-time scenario, e.g., command in an exemplary psedo-code such as: dut.error().

    • This usually indicates a bug or problem in the DUT that needs to be fixed.

  • A scenario failure means that the scenario did not happen according to its definition.

    • This should be indicated by calling the zero-time scenario automatically by the execution engine.

8. Roadmap

The concept project ended in January 2020, The concept document (this document) underwent a full project member review in February 2020 and was submitted to the ASAM TSC in early March 2020.

The purpose of the Concept Project was to address features and adaptations to be implemented in future versions of the OpenSCENARIO standard. The OpenSCENARIO 2.0 project proposal is aimed at taking the concepts specified in the concept document and using them to develop the next generation of OpenSCENARIO standard – OpenSCENARIO 2.0. A rough estimate is that the development of such a standard can be achieved within a year, aiming at release in Q2 of 2021.

The OpenSCENARIO 2.0 concepts take proven features and capabilities of OpenSCENARIO 1.0, like its event-based scenario execution model, and place them in a more general and expressive language framework, to serve as the foundation for both incremental improvements and more revolutionary enhancements. In comparison to OpenSCENARIO 1.0, a more detailed set of actions and attributes for the relevant simulation models shall be defined to allow for a more comprehensive scenario description and to improve exchangeability. This is addressed by the introduction of a domain model (see [architecture]).

8.1. Development Project Roadmap Approach

As the development project forms, the first key concepts to focus on are the domain specific language (properties and syntax) and the domain model. These are the foundation of the new version of the standard. The other concepts of parameters, constraints, measurement and coverage will grow into this foundation.

It is assumed that the first 6 months of the project will enable convergence and establishments of these foundations, followed by another 6 months in order to finalize the full standard.

In order to save development time, the project should also consider the possibility of using an existing DSL as a base to build on.

8.2. OpenSCENARIO 1.x and 2.0

The OpenSCENARIO 2.0 concepts take proven features and capabilities of OpenSCENARIO 1.0, like its event-based scenario execution model, and place them in a more general and expressive language framework, to serve as the foundation for both incremental improvements and more revolutionary enhancements. In comparison to OpenSCENARIO 1.0, a more detailed set of actions and attributes for the relevant simulation models shall be defined to allow for a more comprehensive scenario description and to improve exchangeability. This is addressed by the introduction of a domain model (see Concept document chapter: Architecture).

OpenSCENARIO 2.0 is intended to be a full superset of the features of OpenSCENARIO 1.0. This means that a migration path for OpenSCENARIO 1.x scenarios to OpenSCENARIO 2.0 will be included in the release version of OpenSCENARIO 2.0. Migration of scenarios might require conversion to 2.0 syntax and semantics. The run time behavior of any scenario converted from the latest OpenSCENARIO 1.x to OpenSCENARIO 2.0 shall be the same.

A conversion of OpenSCENARIO 2.0 scenarios to OpenSCENARIO 1.x will in general not be possible, since OpenSCENARIO 2.0 is intended to be a true superset of OpenSCENARIO 1.x. However, conversion of a subset of OpenSCENARIO 2.0 that maps to the feature set of OpenSCENARIO 1.x will be possible. The standard development projects for the 1.x and the 2.0 projects shall ensure an up-to-date ruleset for a migration path from 1.x to 2.0.

Key Terminology

Disclaimer

This is the glossary for the OpenSCENARIO 2.0 Concept Project. The project group is aware of multiple activities across different standardization organizations (e.g. ISO 34501, SAE J3164, PAS 1883) developing glossaries and taxonomies for this domain. As such, this glossary intentionally only defines key terms necessary for the understanding of the concepts in this document. These definitions may not be final. In some cases, we are presenting different options discussed in different organizations. (e.g. classification of scenario abstraction levels). As the development project evolves OpenSCENARIO will make use of existing and accepted definitions where possible, rather than redefining them. The terms in this glossary are thus subject to change as the follow up projects develop.

Scenario - Types

Operational Design Domain (ODD)

The complete range of space in which the system under test is expected to operate in.

Scenario

A specific description of how the view of the world or scene changes with time, usually from a specific perspective. In the context of vehicles and driving, this will encompass the developing view of both world-fixed elements such as the road layout and static furniture, and world-changing elements such as weather and lighting, dynamically moving elements such as other vehicles, objects, people or animals.

Concrete Scenario

A scenario for which the exact evolution of any of its parameters and variables is completely determined to a fixed value for any point in time.
This may be either given by specifying concrete trajectories, or by referencing deterministic models (driver, traffic, weather, vehicle dynamics,…​) that dermine the evolution of values during scenario execution (or a mixture of both). This refers to all variables which may influence how the system behaves and how it’s resulting behaviour will be measured.

Abstract Scenario

Any scenario that is not concrete i.e. a scenario where at least one parameter or variable is not fixed to a deterministic value at some point in time.

Use Case

A high-level, generic situation or sequence of situations to which a system may be exposed, in response to which the system would normally be expected to exhibit specific behaviour.

Scenario Space

full factorial space of all possible scenarios for a given abstract scenario description (~infinite)

Test Space

Finite number of concrete scenarios for a given abstract scenario description

Scenario Summary

an informal (natural language) description of a scenario, possibly using pictures or similar representations

Scenario - Quantifiable Element

Entity / Entities / Entity Type / Element / Object / Scenario Entity

A singular part of the scenario representing a real-world object, which in regard to motion can be static or dynamic, and in regard to appearance or state can be fixed or varying.

Abstract Entity

An entity (such as scenarios, actors, models) with at least one piece of information that is necessary to invoke or instantiate the entity is not yet fixed to one concrete value

Attribute / Property

A specific, named field of an entity which can be defined by a either a numerical or non-numerical value and may change (variable) or remain constant during a scenario

Parameter

Any specific piece of information of an entity which is left open in its definition

Static Object / Static Elements

An specific entity within the scenario which is constrained not to move

Dynamic Object / Dynamic Elements

An specific entity within the scenario which is free to move with time

Phase

A phase is a period of time within a scenario corresponding to a sub-scenario invocation. A phase can be atomic or composite.
An atomic phase is a phase consisting of an invocation of an action performed by a certain actor enriched by modifiers.
A composite phase is a phase consisting of an invocation of a temporal composition operator.
A scenario thus consists of a potentially-hierarchical composition of phases, which together specify the behavior of one or more actors.
Note that the invocation of a whole scenario is also a phase.

Road Network

A logical description of the roads loaded by the scenario

Route

Defines a path through the road network. Used for large scale behavior definition or navigation. Vehicle are basically able to 'find' their way through the network for themselves, but in some usecases a defined route may be necessary. The routes can either be part of the referenced road network or be defined in the scenario. The neighboring roads in the route have to be adjacent either directly or over a junction.

Lane

A defined corridor along which vehicles can travel in single file. The defined edges of this lane may typically be denoted by road markings, kerb edges, or a transition from the primary road surface to another surface not intended to be driven on. Multiple lanes may exist in parallel. In addition, a single lane may split into multiple lanes, and vice versa.

Road User - Types

Actor

A body within a scenario, which is capable of independent motion. The motion could be pre-defined and fixed, or be determined by both the relevant control model and dynamics model.

Vehicle / Road User

An actor within a scenario intended specifically to move within the confines of the road.

Ego Vehicle / VUT

The actor within a scenario whose behaviour or performance is being evaluated. The primary focus of assessment.

Target / Target Vehicle / Vehicle of Interest

A specific other vehicle which the ego vehicle is assessing in order to make control decisions

Follow Vehicle

A specific other vehicle whose path the ego vehicle is aiming to replicate

Traffic / Reference Traffic

One or more usually multiple vehicles in a scenario which may be expected to affect the behaviour of the ego vehicle

Driver

The primary control system of a vehicle, typically the human controller

Scenario - Measurable Parameter

Coverage

The percentage of verification objectives that have been met and is used to gauge progress of a verification project toward "verification closure".

Structural coverage

Can be automatically inferred from the implementation. Examples of that are code coverage. To be practical, code coverage typically captures reduced-order coverage aspects (e.g. statement coverage)

Functional coverage

A user-specified metric mapping the test plan to the intended design functionality. It measures how much of the design specification, as enumerated by features in the test plan, has been exercised. It is based on the design requirement specifications and is thus independent of the implementation.

Expected Behaviour

A descriptive or measurable understanding of how the ego vehicle should perform in order for its performance to be judged a success in the context of the scenario

Evaluator / Key Performance Indicator (KPI)

A specific, measurable quantity or parameter against which the performance of the ego vehicle is compared

Simulation and Modelling

Model

A representation of physical reality in a non-physical manner. In the context of a scenario definition language, this would encompass the representation of all entities and their attributes. 2+

Specific Model instances

Control

Representation of a system’s output control actions resulting from the state of input parameters.

Driver

Representation of a driver’s control actions in response to input stimuli

Entity Control

Representation of an entity’s decision making and resultant behaviour

Road User Control

Representation of a road user’s decision making and resultant behaviour

Dynamics

Representation of how a phyiscal entity’s dynamic behaviour will be affected by either direct control inputs or external forces.

Data

Provides a data input which is relevant to the scenario or system under test

Weather

Representation of the weather. This would typically encompass representations of lights levels and directions, precipitation levels and type, wind direction and strength and temperature. The resulting effects of weather on all entities within a scenario would be defined by the individual models of those entities.

Road

Representation of the combination of roads to give a resulting network.

OpenScenario Language

Domain Model

In software engineering, a domain model is a conceptual model of the domain that incorporates both behaviour and data. In ontology engineering, a domain model is a formal representation of a knowledge domain with concepts, roles, datatypes, individuals, and rules, typically grounded in a description logic.

Expression / Methods

A combination of one or more constants, variables, operators, and functions that the programming language interprets according to its particular rules of precedence and of association and computes to produce ("to return", in a stateful environment) another value.

Condition

A specific instance of an Expression which yields as boolean output.

Interface

A shared boundary across which two or more separate modules exchange information.

Variable

A value holder of a specific type

Parameterization

The act of delegating an attribute to a parameter.

Modifier

A keyword term or value which affects or modifies the properties of a specific language construct

Key word

Used within modifiers to define how to direct, govern or modify the action.

Predicate

A relation / boolean-valued function / characteristic function / indicator function

Road Network

An addressing entity used to define a file defining a system of interconnected roads / path / sidewalk / misc. designed to accommodate vehicles and pedestrians

Bibliography

[1] “Waymo Safety Report: On The Road to Fully Self-Driving,” Waymo, 2017.

[2] “Pegasus Method: An Overview,” PEGASUS Project, 2019.

[3] martinFowler.com, “Domain Model.” .

[4] Culttt, “What is the Domain Model in Domain Driven Design?” .

[5] Encyclopaedia Britannica, “Predicate Calculus.” .

[6] J. D. Ullman, “Chapter 14 - Predicate Logic.” .

[7] PlantUML. .

[8] K. Go and J. Carroll, “The blind men and the elephant: Views of scenario-based system design,” Interactions, vol. 11, pp. 44–53, Jan. 2004.

[9] F. Bock, C. Sippl, A. Heinz, C. Lauer, and R. German, “Advantageous Usage of Textual Domain-Specific Languages for Scenario-Driven Development of Automated Driving Functions,” in 2019 Annual IEEE International Systems Conference (SysCon), 2019.

Symbols and Abbreviated Terms

Abbreviation Definition

3D

Three-dimensional

ADAS

Advanced Driver Assistance Systems

AD

Autonomous Driving

ADS

Automated Driving System

AV

Autonomous Vehicle

ASAM

Association for Standardisation of Automation and Measuring systems

CET

Central European Time

DUT

Device Under Test

ODD

Operational Design Domain

OSC

OpenSCENARIO

HTML

Hypertext Markup Language

SI

Systéme international (d' unités)

UML

Unified Modeling Language

XML

Extensible Markup Language

XSLT

Extensible Stylesheet Language Transformation

Appendix A: Detailed Domain Model

This section of the Appendix builds up on the Section 4.1 descriptions of the main document and enriches them with more details by providing visual UML diagrams, the corresponding PlantUML source code as well as a textual description of the entity classes.

A.1. UML diagrams

In the following, two UML diagrams are provided both, visually and in form of [7] sources.

A.1.1. Detailed Entity Defintion

The following UML diagram provides a more detailed view of the UML diagram from Section 4.1.

EntityUML

A.1.2. OpenSCENARIO 1.0 Actions

As mentioned in Section 4.1, the consideration of and harmonization with other standards is of high importance when creating a domain model. Therefore, a UML diagram visualizing actions defined in OpenSCENARIO 1.0 is presented here.

OSC10UML

A.2. Class description

The following descriptions of classes (see Section A.2.2) provide a higher level of detail than the ones presented in Section 4.1. In the subsequent sections, the content of the UML diagram is layed out in text to a large extent. Each entity is defined in the same form with:

  • a short textual description of entity itself

  • a list of properties that may or may not change values for an instance of this entity during a scenario

  • a list of possible actions (see Section A.2.1) that an instance of this entity can perform during a scenario

  • a list of attribute categories with lists of attributes that can be assigned to an instance of this entity. These attributes are either enumerations or booleans and do not change during a scenario. Each instance of an entity can be assigned one attribute out of each attribute list, leading to an orthogonal relation between them, see Section 5.3.8. The choice of certain attributes may introduce further properties or actions on an instance of an entity.

  • if applicable, a relation to other entities. A full represantation of the relations is given in the above UML diagram.

As there is no unambiguous and correct way of structuring the real-world and defining the entities that result from this structure, the following definitions are based on expert knowledge and the analysis of existing scenario descriptions and scenario mechanisms. As stated above, these definitions shall not be exhaustive in the sense of covering all real-world aspects. However, during the creation of the standard, the following definitions potentially have to be extended.

A.2.1. Action description

Actions are atomic operations on entities of the domain model. They cannot be subdivided into smaller parts which separates them from phases and scenarios. The following example illustrates an overtake scenario which is the composition of three atomic drive actions.

scenario overtake:
    v1: car # The first car
    v2: car # The second car
    p: path

    do parallel(duration: [3..20]s):
        v2.drive(p)
        serial:
            A: v1.drive(p) with:
                position([10..20]m, behind: v2, at: start)
                lane(same_as: v2, at: start)
                lane(left_of: v2, at: end)
            B: v1.drive(p) with:
                position([1..10]m, ahead_of: v2, at: end)
            C: v1.drive(p) with:
                lane(same_as: v2, at: end)
                position([5..10]m, ahead_of: v2, at: end)

The drive action can be parameterized in many ways using the M-DSL modifier concept which is explained in Section 5.4.2.3 in more detail.

A.2.3. Object

Object is the base class, of which all other entities will inherit attributes and actions.

A.2.4. LocatableObject

LocatableObject is an upper level class that aggregates physical objects, which have a defined position and spatial extent in the world and are, therefore, locatable in an unambiguous way.

Attributes
  • ID

  • State [Pose, Velocity, Acceleration, Rotational Velocity, Rotational Acceleration]

  • Geometry [3D bounding box, base polygon, reference to 3D geometry]

  • Appearance [Material, Color, …​]

  • Visibility [sensor-techonology specific]

Actions
  • Move()

A.2.5. TrafficParticipant

TrafficParticipant is a LocatableObject that moves by its own intention, or by the intention of its operator if applicable.

TrafficParticipant can be used to form complex objects that are made up of other Traffic Participant objects, by having a part that is an object of the same class. For example, a "Trailer Truck" is a complex object of type TrafficParticipant that is comprised of the parts "Tractor Unit" and one or more "Trailer Unit(s)", each of which are also objects of type TrafficParticipant . The complex object "Pedestrian pushing a Bicycle" can be defined as the composition of a Bicycle and a Pedestrian pushing it. Note: To express the situation where one or more persons are in or on vehicles, the NumberOfPassengers should be set to a value greater than 0.

A.2.6. Vehicle

Vehicle is a TrafficParticipant with some form of self-propulsion (e.g. an engine or a pulling animal) that is moved by the intention of its operator. The movement of the Vehicle can be controlled directly by setting its position, through human-machine interfaces, e.g. to set a steering wheel angle, or through a model, the Vehicle Controller. Therefore, a vehicle can a) be operated by a action-based description, where a Vehicle Controller defines the actions and their attributes with regard to the physical limitations or b) be moved on a predefined trajectory ignoring the physical limitations (“Hand-of-God” mode), e.g. Vehicle X that is at Point A at time t should be at point B at time t+dt, no matter how it got from A to B in the time interval dt.

Actions
  • steeringWheelAngle()

  • steeringWheelSpeed()

  • steeringTorq()

  • acceleratorPedal()

  • brake()

  • parkingBrake() to be aligned with OSI:

  • indicatorState()

  • frontFogLight()

  • rearFogLight

  • headlight

  • highBeam

  • reversingLight

  • licensePlateIlluminationRear

  • emergencyVehicleIllumination

  • serviceVehicleIllumination

  • BrakeLightState

examples for potential model-dependent extensions of Actions
  • horn()

  • sirens()

  • frontWiperState()

  • rearWiperState()

  • engineStatus()

  • engineSpeed()

  • consumption()

  • cruiseControlMode()

  • cruiseControlTargetSpeed()

  • clutchPedal()

  • GearBoxMode()

  • lockDiffMode()

  • ignitionKeyPosition()

The vehicle can be operated by a action-based description, where a vehicle controller defines the actions and their attributes with regard to the physical limitations. Besides that there can be a use case to move a vehicle on a predefined trajectory ignoring the physical limitations, like in a “Hand-of-God”-mode (e.g. Vehicle X should be at time t at Point A and at time t+1 at point B, no matter how it got from A to B in that time). These basic concepts are shown in the block diagram:

Vehicle Maneuver Based
Figure 18. Action-based description
Vehicle Hand of God Mode
Figure 19. Hand-of-god mode

A.2.7. VehicleController

VehicleController refers either to a driver model that controls the vehicle or an automated driving function. In case of a driver model, this includes its behavior properties for information acquisition, the mental model itself as well as the situation assessment and action deduction/execution. In case of of an automated driving function, most of these attributes are the same, because the driving function as the vehicle controller is to some extent an imitation of the driver model behavior. To distinguish between these two cases, the “IsDriverAutomated” attribute is used.

A proposal for a basic set of vehicle controller attributes and methods is listed in the UML Model. This proposal is based on a common understanding of a driver behavior model like this:

General Driver Behavior Model
Figure 20. General driver behavior model

With the basic set of vehicle controller behavior attributes possible discontinuities when switching between a ’real’ driver and the automated driving functions or between action-based operation and the “Hand-of-God”-mode should be excluded. To ensure a fluent transition, e.g. switching from the “Hand-of-God”-mode to action-based operation, the vehicle controller has to deliver all necessary driving inputs at every time step, even though they will be overwritten by a predefined trajectory until switching.

In Addition to this, behavior influencing attributes ("modifiers") affect the interaction between the vehicle controller and its environment including the vehicle itself, e.g. sporty driver has a higher free desired velocity.

The list of basic attributes can be extended to a certain example of a more detailed driver behavior model (e.g. Driver Model for specific overtaking situations), like shown as follows.

  • Information acquisition

    • Preview Distance

  • Mental model

    • Max/DesiredVelocity

    • AmountOfSpeedLimitViolation

    • StandstillDistance 'Car queuing distance

    • TendencyOfRuleBreaking

  • Situation assessment and action deduction (decision making units)

    • DesiredTimeHeadway

    • AcceptedTTC

    • UrgeToOvertake

    • CrossOffset/TrackKeeping

  • Action execution

    • MaxLateralAcceleration

    • MaxLongitudinalAcceleration

    • ComfortLateralAcceleration

    • ComfortLongitudinalAcceleration

    • MaximumPedalActuationVelocity

    • MaximumSteeeringWheelActuationVelocity

  • Reaction time

    • GazeAllocationTime

    • ReactionBaseTime

    • ApplicationTime

A.2.8. NonVehicle

NonVehicle is a TrafficParticipant that is moving with intention on its own, that is without the use of a Vehicle. The most obvious representative of this class is a pedestrian, but also animals would be categorized here.

A.2.9. NonTrafficParticipant

NonTrafficParticipant is an object that, in contrast to a Traffic Participant, does not move by its own intention or an operator. It may be anchored at a defined position, making it stationary, or it may have an imposed movement.

Attributes
  • Position

  • Size

Actions

MoveAnchored()

A.2.10. Scenery

Scenery contains elements in the vicinity of the road that are not part of the referenced map but are relevant for the scenario definition. In contrast to an Obstacle, which directly affects the possible trajectories that TrafficParticipant_s may take, the _Scenery affects the scenario mostly due to obstructing the view.

A.2.11. Building

May contain a reference to an external building definition source like CityGML.

Attributes
  • Position

  • Size

  • Type

Actions

-

A.2.12. Vegetation

Maybe defined only for visual quality of the scenario, but might also have an impact on sensors.

Attributes
  • Position

  • Type

Actions

-

A.2.13. Obstacle

Obstacle is an inanimate object that does not move with own intention and that does not directly participate in traffic. An Obstacle is a physical object that causes some traffic participant to restrict the trajectories it is allowed to choose from. Obstacles may be anchored and, thus stationary or a movement can be imposed on those objects, e.g. to define the behavior of a ball kicked onto the road or a log falling off a truck.

Attributes
  • Trajectory

  • Size

Actions

-

A.2.14. AmbientObject

AmbientObject is a super-ordinate class that aggregates physical objects that are not locatable in an unambiguous way, in other words any physical object that is not LocatableObject. Instead, an AmbientObject is defined as a physical entity that is located over an area at a certain point in time. There have been several discussions regarding this disctinction, which need to be continued in the following project. The following examples help to understand the reasoning behind it:

  • A RoadNetworkTopology can be referenced using a reference point, so as to locate it in some point in space, however the road network covers an area. It is not entirely static (e.g. it might include moving bridges), and it is obviously also not dynamic.

  • Weather effects covered in Environment are also considered as an ambient object. Just like the road, it is placed over an area by referencing it to a reference point. In contrast to the road, weather can move (e.g. a storm or moving precipitation).

A.2.15. RoadNetworkTopology

The scenario language is not supposed to define the complete topology of a complex road network, it only has to provide an intuitive way of addressing elements in the network. This for example will be used to define conditions in the behavior definition, e.g. "turn right at the second 4-way junction". An ID based access with detailed knowledge of the road network content must also be possible. The detailed definition of the road network will still be done by formats like OpenDRIVE, which for example is used for OpenSCENARIO 1.0. For OpenSCENARIO 2.0 an abstraction level for the road network should be considered, which allows the usage of other map sources. The road topology model for now only contains essential attributes for addressing the correct elements for the scenario in mind. More advanced features (e.g. angle between connected roads of a junction) can be supported in derived models. It should, however, be noted that the usage of advanced road network features automatically decrease the number of usable map sources. Furthermore, the exchangability of the scenario itself will be affected by the complexity of road features.

Attributes
  • TrafficType (Right hand vs. left hand traffic)

  • Number of roads

  • Number of junctions

Actions

-

A.2.16. Road

The Road model has to contain necessary attributes for scenario definition and addressing specific roads in the network. For example a cut-in scenario might require a Road with at least two lanes in the same driving direction. More vehicle dynamics focussed tests could depend on a the curvature value. An ID based access like in OpenSCENARIO 1.0 will also still be necessary as an unique referencing option. _Road_s itself should contain a number of lanes with additional attributes like seen in many existing map formats. It should be considered to omit the intermediate 'Lane Section' level like in OpenDRIVE in order to achieve the aspired map source independency.

Attributes
  • ID

  • Country

  • Number of lanes

    • Oncoming

    • Direct

  • Length

  • Width

  • Type (Unknown, Rural, Motorway, Town, …​)

  • SpeedRestriction

    • Min

    • Max

Actions

-

A.2.17. Lane

In analogy to the other road network model classes, the Lane should only contain attributes for scenario definition and addressing purposes. A Lane should have knowledge about its allowed driving direction(s), the width and the lane type. One additional and presumably important scenario definition feature are the road markings, which should also be part of a Lane. Lane independent road markings have not been dicussed in this concept project. Especially on the lane level it is possible to provide a very detailed description of the lane structure, e.g. to reflect the content of a HD map source. For the scenario itself only the minimum width of a Lane in a defined area might be relevant, so the lane model in the scenario language should focus on those essential attributes.

Attributes
  • Index (Direction based like in XODR)

  • Direction (Oncoming/Direct/Both)

  • Length

  • Width

  • SpeedRestriction

    • Min

    • Max

  • Type (Driving, Stop, Entry, Exit, Sidewalk, …​)

Actions

-

A.2.18. Signal

A Signal of the superordinate Road or Junction. Some parameters of the signal are defined in the reference map data (e.g. the position), others may be part of the scenario definition itself (e.g. the lighting sequence of a traffic light). This location of signals class in the model should enable a better addressing of relevant situations in the road network ("Junction with traffic light", "Road with repeating speed restriction traffic signs", …​).

Attributes
  • Position

  • Static (IsStatic, IsDynamic)

  • Illumination (None, Active, Passive)

  • Medium (Visual, Sound, Connected)

  • Type (SpeedRestriction, Direction, TrafficLight, …​)

  • State

Actions

-

A.2.19. Junction

Basically a node in the road network topology where three ore more roads are connected. This basic Junction model class intentionally avoids a more detailed definition of the junction properties to allow an easy way of addressing junctions for a scenario.

Attributes
  • ID

  • Number of connected roads

    • Entries

    • Exits

  • Type (Entry, Exit, Crossing, …​)

Junction types are currently in discussion in the parallel OpenDRIVE concept. Maybe the results can be used here.
Actions

-

Modifiers

-

A.2.20. Route

Defines a path through the road network. Used for large scale behavior definition or navigation. Vehicles are basically able to 'find' their way through the network by themselves, but in some use cases a defined route may be necessary. The routes can either be part of the referenced road network or be defined in the scenario. The neighboring roads in the route have to be adjacent either directly or over a junction.

Attributes
  • ID

  • RoadNetworkElements

  • Length

Actions
  • AddRoad(RoadID)

  • RemoveLastRoad()

  • Empty()

Modifiers

-

A.2.21. Environment

In contrast to the road network topology, the attributes of the environment can be not only addressed but also set for the scenario.

Attributes
  • Temperature

  • Air

    • Density

    • Pressure

    • Humidity

  • Precipitation

    • Type (Rain, Snow, …​)

    • Particle size

    • Particle distribution

    • Falling vector

    • Falling speed

  • Fog

    • Particle size

  • Wind

    • Direction

    • Speed

Actions

-

A.2.22. TrafficParticipantFlow

TrafficParticipantFlow can be used to create (spawn) multiple TrafficParticipant entities on a road network. This could either be done to achieve a fully stochastic traffic behavior or to impose actions on a group of TrafficParticipants (e.g. "synchronize") to achieve a more structured, deterministic behavior. This can be done entity-based to surround a certain entity (according to OpenSCENARIO 1.0 Swarm) in an ellipsis or route-based for a definition based on a road network. The created entities shall be of the type TrafficParticipant and hence offer their properties. Similar to OpenSCENARIO 1.0 the single entities shall receive unique IDs based on the ID of the flow and a count. In this way, it should be possible to take over control of certain entities and (for a certain period) define their behavior deterministically. By using a dictionary of types and probabilities, the composition of the flow can be influenced.

Actions
  • ID

  • TypeProbability

  • Route (only isRouteBased)

  • NumberPerHour (only isRouteBased)

  • ParentEntity (only if not isRouteBased)

  • innerRadius (only if not isRouteBased) (according to OpenSCENARIO1.0)

  • numberOfVehicles (only if not isRouteBased) (according to OpenSCENARIO1.0)

  • offset (only if not isRouteBased) (according to OpenSCENARIO1.0)

  • semiMajorAxis (only if not isRouteBased) (according to OpenSCENARIO1.0)

  • semiMinorAxis (only if not isRouteBased) (according to OpenSCENARIO1.0)

Attributes
  • isRouteBased

A.2.23. VehicleFlow

VehicleFlow can be used to create (spawn) multiple Vehicles. Inherits all Actions and Attributes from TrafficParticipantFlow, may be extended with vehicle-specific items.

A.2.24. NonVehicleFlow

NonVehicleFlow can be used to create (spawn) multiple NonVehicles. Inherits all Actions and Attributes from TrafficParticipantFlow, may be extended with non-vehicle-specific items.