ADAS override behavior
When the ftx_driver is playing the role of a human driver and interacting with the SUT or an HLM, this behavior specifies how the ftx_driver should act when it is in control and an ADAS function interrupt occurs. Specifically, this behavior applies to:
- Autonomous Emergency Braking (AEB)
- Lane Support Systems (LSS)
- Emergency Steering Assist (ESA)
It does not apply to:
- Adaptive Cruise Control (ACC)
- Lane Centering Assist (LCA)
This ADAS override behavior is controlled by fields in the vehicle_indicators_feedback and the ao_reaction structs.
The vehicle_indicators_feedback is instantiated in the state field of the vehicle actor with the name vehicle_indicators. The fields in this struct that are relevant to ADAS override are shown in the table below.
| Field name | Type | Description |
|---|---|---|
| ADAS_override_active | bool | Flag indicating if in the past simulation step an override command was made by any active or engaged ADAS function. Initialized to false. |
| ADAS_override_kind | string | String to specify the names of currently active and engaged ADAS functions. (separated by ' '). Initialized to empty string and then set by the ADAS function. |
| adas_brake_override | bool | Indicator for ADAS override interrupt of the brake pedal. Initialized to false. |
| adas_steering_override | bool | Indicator for ADAS override interrupt of the steering wheel. Initialized to false. |
The ao_reaction struct is instantiated in ftx_driver.adas_override_behavior as adas_brake_override_reaction and adas_steering_override_reaction. The fields of this struct are shown in the table below:
| Field name | Type | Description |
|---|---|---|
| brake_control | ao_state | One of enable, disable, unchanged (the default). |
| throttle_control | ao_state | One of enable, disable, unchanged (the default). |
| steering_control | ao_state | One of enable, disable, unchanged (the default). |
| collision_avoidance | ao_state | One of enable, disable, unchanged (the default). |
Note
unchanged means the control remains as it was before the interrupt occurred.
When an ADAS function interrupt occurs:
-
The ADAS function sets the fields in the vehicle's
vehicle_indicatorsstruct appropriately. For example, AEB setsadas_brake_overrideto true, and ESA or LSS setsadas_steering_overrideto true. -
The ADAS override behavior detects the override and controls the behavior of the vehicle's
ftx_driveraccording to the settings in the vehicle'sadas_brake_override_reactionandadas_steering_override_reactionstructs.
To configure the ADAS override behavior:
Set the fields of ftx_driver.adas_override_behavior appropriately for the purpose of a particular scenario.
| Field name | Type | Description | Default |
|---|---|---|---|
| enable | bool | Enable (true) or disable (false) the ADA override behavior. | true |
| adas_brake_override_reaction | ao_reaction | The reaction to a brake override interrupt. | All fields are unchanged. |
| adas_steering_override_reaction | ao_reaction | The reaction to a steering override interrupt. | All fields are unchanged. |
Because all the ADAS override fields are unchanged by default, the override behavior is effectvely disabled. However, you can explicitly disable it like this:
extend sut:
keep(car.ftx_driver.adas_override_behavior.enable == false)
When you create a scenario to test the AEB function, you must first turn off the collision avoidance behavior of sut.car with avoid_collision(false). This allows sut.car to approach close enough to a leading car, for example, to cause an AEB interrupt. Then, as part of the override behavior, you must re-activate collision avoidance and prevent the ftx_driver from sending brake or throttle commands to the SUT/HLM.
extend top.main:
def post_plan() is also:
sut.car.ftx_driver.adas_override_behavior.adas_brake_override_reaction.brake_control = disable
sut.car.ftx_driver.adas_override_behavior.adas_brake_override_reaction.throttle_control = disable
sut.car.ftx_driver.adas_override_behavior.adas_brake_override_reaction.collision_avoidance = enable
When you create a scenario to test an LSS function, such as Lane Keeping Assist (LKA), you must first turn off the steering control of sut.car with driver_controls(steering: disabled). This allows sut.car to start drifting far enough out of a lane to cause an LKA interrupt. Then, as part of the override behavior, you must prevent the ftx_driver from sending steering commands.
extend top.main:
def post_plan() is also:
sut.car.ftx_driver.adas_override_behavior.adas_steering_override_reaction.steering_control = disable