Skip to content

191. Crash checker

The crash_checker uses the upon_w watcher operator to trigger a crash interval when a collision event is detected between two physical objects in the simulation.

191.0.1 Start condition

The crash_checker monitors all physical objects in the simulation and raises issues when collisions occur between them.

191.0.2 End condition

The crash_checker creates a zero-time interval for every detected collision. This interval starts and ends in the same simulation step, meaning it ends instantly at the moment of collision without requiring a separate end condition.

191.1 Attributes

The following attributes define the behavior and characteristics of the evaluator.

Checker attribute Description
Parent object physical_object.global_checkers
Issue category sut or other
Issue kind collision_in_hybrid_control, collision_in_sut_control, collision_in_manual_control
Default severity error
Trigger condition Based on upon_w watcher

191.2 Configuration parameters

No configuration parameters found.

191.3 Metrics

The following metrics are recorded and tracked by the evaluator.

Metric Type Description Range Unit
side enum (front, front_left, left, back_left, back, back_right, right, front_right, other) Side of object on which the collision happened
other_side enum (front, front_left, left, back_left, back, back_right, right, front_right, other) Side of other object on which the collision happened
velocity speed Longitudinal velocity at collision, in local coordinate system kph
other_velocity speed Longitudinal velocity at collision of the other object, in local coordinate system kph
acceleration acceleration Longitudinal acceleration at collision, in local coordinate system mpsps
other_acceleration acceleration Longitudinal acceleration of the other object at collision, in local coordinate system mpsps
delta_v speed Delta-V between this object and the other object it collided with (kph). Relevant only for a collision between two vehicles. In case one of the objects is not a vehicle, the recorded value is -1kph. kph
pdof angle PDOF between this object and the other object it collided with. Relevant only for a collision between two vehicles. If one of the objects is not a vehicle, the recorded value is -999degree. degree
pdof_side enum (front, rear, left, right, not_applicable) PDOF side for this object
crash_severity enum (S0, S1, S2, S3, not_applicable) Individual crash severity for this object involved in the collision. For vehicle-to-vehicle collisions, calculated from Delta-V and PDOF side. For vehicle-to-VRU collisions, calculated from the vehicle's speed at impact using VRU thresholds (not_applicable for the VRU). For other collision types, the recorded value is not_applicable.
other_crash_severity enum (S0, S1, S2, S3, not_applicable) Individual crash severity for other object involved in the collision. For vehicle-to-vehicle collisions, calculated from Delta-V and PDOF side. For vehicle-to-VRU collisions, calculated from the vehicle's speed at impact using VRU thresholds (not_applicable for the VRU). For other collision types, the recorded value is not_applicable.
overall_crash_severity enum (S0, S1, S2, S3, not_applicable) Overall crash severity computed between this_object and other_object. For vehicle-to-vehicle collisions, the higher of the two individual severities. For vehicle-to-VRU collisions, the vehicle's severity at impact. For other collision types, the recorded value is not_applicable.
other_category enum (car, bus, truck, trailer, bicycle, motorcycle, person, animal, other) Category of the other object

191.4 Log and Error Messages

Output Condition Description Default Severity Action
If the checkers' triggering conditions are met, it warns the user collision_in_sut_control Error Investigate the SUT's behaviour.

191.5 Usage

On each collision, both involved objects receive a zero-time crash interval. An issue is raised only on the object designated as the main collision object (is_main_collision_object).

191.5.1 How to instantiate

The crash checker is built into every physical_object through physical_object.global_checkers and does not require separate declaration per vehicle in the scenario OSC files. It is pre-configured to trigger on every collision event:

extend physical_object.global_checkers:
    checker crash(crash_data) is upon_w(ev: @actor.collision)

191.5.2 Set parameters at instantiation time

The crash checker has no configuration struct and no parameters to set at instantiation time. Metrics such as delta-V, PDOF, and severity are computed automatically in crash_data.

191.5.3 Define and use a custom parameter set

The crash checker has no configuration struct. To customize its behavior, extend global_checkers on the actor scope you want to affect:

191.5.4 Disabling the checker

  • To disable the checker (all physical objects):

    extend physical_object.global_checkers:
        on @start:
            override(crash, run_mode: freeze)
    

  • To disable the checker for a specific vehicle subtype (for example, NPCs):

    extend npc_vehicle.global_checkers:
        on @start:
            override(crash, run_mode: freeze)
    

191.5.5 Changing the default SUT collision issue severity:

extend sut:
    keep(collision_severity == warning)

191.5.6 Downgrading or filtering crash issues:

extend physical_object.global_checkers:
    set_issue(target_checker: crash, severity: warning)
extend physical_object.global_checkers:
    set_issue(target_checker: crash, severity: warning,
        condition: it.this_object.is(sut_vehicle) and it.other_object.is(npc_vehicle))

191.6 Additional information

  • Collision targeting

For compound objects (e.g., truck, trailer), the this_object field identifies the specific part impacted.

  • Delta-V metrics

    • Vehicles: Contains the calculated Delta-V value.
    • Non-vehicles: Set to -1kph.
  • Disabling options

    • Global: Disable for all objects
    OSC2 code: disable crash globally
    extend physical_object.global_checkers:
    on @start:
        override(crash, run_mode: freeze)
    
    • Selective: Disable by object subtypes, for example NPCs
    OSC2 code: disable crash for subtype npc vehicles
    extend npc_vehicle.global_checkers:
    on @start:
        override(crash, run_mode: freeze)
    

    See Metrics examples for the full examples.

  • Severity control

    Use set_issue() to:

    • Downgrade all crash issues
    OSC2 code: downgrade all crash issues
    extend physical_object.global_checkers:
    set_issue(target_checker: crash, severity: warning)
    

    See Metrics examples for the full examples.

    • Conditionally modify severity levels
    OSC2 code: conditionally downgrade collision issues
    extend physical_object.global_checkers:
    set_issue(target_checker: crash, severity: warning,
        # In the context of set_issue(), 'it' refers to the 'data' object of the checker
        condition: it.this_object.is(sut_vehicle) and it.other_object.is(npc_vehicle))
    

    See Metrics examples for the full examples.

  • Issue classification

    Issues are tagged by the controller at impact:

    • collision_in_hybrid_control
    • collision_in_sut_control
    • collision_in_manual_control