Skip to content

Driver Execution manager

The execution manager struct which manages the execution layer. It is responsible for driving the vehicle along the trajectory, which is provided by the trajectory layer. The execution can be done via one of the following two executor types. The executor type remains constant for the particular vehicle through the run.

  • Kinematic executor

    This defines where the vehicle is placed at each time step in a state (pose, velocity, acceleration) as defined by the trajectory. In principle, the vehicle is “teleported” between steps (there is no use of pedals and steering wheel)

  • Dynamic executor

    This defines how the vehicle is controlled using three basic actuators the throttle and brake pedals and the Steering wheel. Similar to the way a human driver interacts with a car in reality.

Execution manager API

The Execution manager API consists of Operational Driving Domain (ODD) checkers.

ODD checkers

The Operational Driving Domain (ODD) checkers perform ODD monitoring and trajectory tracking.

ODD monitoring checks the dynamical state of the vehicle:

  • its local acceleration
  • its orientation angles
  • its angular rates
  • its slip angles

Each one of these is monitored for values outside the defined thresholds that could cause the vehicle to lose control.

In addition to these vehicle-related checks, there are map-related checks:

  • height check - whether the vehicle is positioned at a height relative to the lane/road that exceeds the defined threshold.
  • driving direction check - whether the vehicle is positioned at an angle that exceeds the defined threshold and indicates it is driving in the wrong direction.

Trajectory tracking checks the longitudinal speed, the longitudinal position, and the lateral position of a vehicle relative to the desired trajectory. Three types of driving states are defined by thresholds:

  • steady state driving - the vehicle tracks the desired trajectory well, with only small execution errors.
  • transient driving - the vehicle is executing a maneuver, with only acceptable execution errors.
  • out of control driving - the vehicle is out of control, with extreme execution errors.

You can define the thresholds for these checkers by setting the parameters in the executor_manager_params.ODD_checker_params struct. The issue category of the ODD checker messages is other and the issue kind is out_of_odd. The issue severity is error by default, but it changes to warning under the following conditions:

  • ADAS override: a vehicle command is overridden by an ADAS module, or a fixed time ODD_check_start_time has not passed since Foretify regained control.
  • The test just started, and a fixed time ODD_check_start_time has not passed yet.
  • The gear changed, and a fixed time slip_angle_check_start_time has not passed since the last gear change.

ODD_checker_params

Parameter Type Description Default
ODD_all_checks_flag bool If true, all ODD checks are active. If false, all ODD checks are deactivated. true
ODD_check_start_time time A fixed time that should pass before Foretify performs the ODD checks. 1sec
Angle checker parameters
ODD_angles_orientation_check_flag bool If true, the check is active. If false, it is deactivated. true
angles_orientation_threshold angle The maximum orientation angle of the vehicle. 20deg
ODD_angular_rate_check_flag bool If true, the check is active. If false, it is deactivated. true
yaw_angular_rate_threshold angular_rate The maximum yaw angular rate threshold. 60degps
pitch_angular_rate_threshold angular_rate The maximum pitch angular rate threshold. 20degps
roll_angular_rate_threshold angular_rate The maximum roll angular rate threshold. 20degps
max_angular_rate_time time The maximum continuous period of time allowed for the vehicle to exceed the angular rate thresholds. 0.4sec
ODD_slip_angle_check_flag bool If true, the check is active. If false, it is deactivated. true
slip_angle_check_start_time time A fixed time that should pass before the slip angle check is performed. 2sec
slip_angle_drifting_threshold angle If the slip angle against the driving direction exceeds the drifting_threshold and is below the sliding_threshold, the movement is considered as a drift. 30deg
slip_angle_sliding_threshold angle If the slip angle against the driving direction exceeds the sliding_threshold, then the movement is considered as a slide. 90deg
Acceleration checker parameters
ODD_acceleration_check_flag bool [true/false] The check is active/deactivated. true
local_x_acceleration_threshold acceleration The maximum local longitudinal acceleration threshold. 10mpsps
local_x_deceleration_threshold acceleration The maximum local longitudinal deceleration threshold. 10mpsps
local_y_acceleration_threshold acceleration The maximum local lateral acceleration threshold. 10mpsps
max_acceleration_time time The maximum continuous period of time allowed for the vehicle to exceed the local acceleration thresholds. 0.4sec
Height checker parameters
ODD_height_check_flag bool [true/false] The check is active/deactivated. true
height_threshold length The maximum height difference allowed between the vehicle and the lane/road. 5m
Driving direction checker parameters
ODD_driving_direction_check_flag bool [true/false] The check is active/deactivated. true
driving_direction_angle_threshold angle The maximum angle difference allowed between the vehicle's driving direction and the lane/road driving direction. 90deg
Oscillation checker parameters
ODD_oscillation_check_flag bool [true/false] The check is active/deactivated. true
oscillation_check_signal_data_duration time The total duration of the signal array. 6.0sec
oscillation_check_update_period time Apply the check every predefined period. 3.0sec
oscillation_check_lat_deviation_amplitude_threshold length Maximum allowed lateral deviation in the monitored frequency range. 0.5m
oscillation_check_min_frequency_threshold float The frequency domain of interest minimum boundary (in Hz units). 0.4[Hz]
oscillation_check_max_frequency_threshold float The frequency domain of interest maximum boundary (in Hz units). 10[Hz]
oscillation_check_lon_acceleration_amplitude_threshold acceleration The longitudinal acceleration amplitude to be caught by the checker (in mpsps). 1[mpsps]
oscillation_check_lon_acceleration_min_frequency_threshold float The frequency domain of interest minimum boundary for the longitudinal acceleration check (in Hz units). 1.5[Hz]
oscillation_check_throttle_amplitude_threshold float The throttle amplitude to be caught by the checker, in percentage units (of the maximum possible value) . 50[%]
oscillation_check_brake_amplitude_threshold float The brake amplitude to be caught by the checker, in percentage units (of the maximum possible value) . 50[%]
oscillation_check_steer_amplitude_threshold float The steer amplitude to be caught by the checker, in percentage units (of the maximum possible value). 50[%]
Calibration time step checker parameters
ODD_calibration_time_step_check_flag bool [true/false] The check is active/deactivated. true
OSC2 code: change the ODD checker parameters
extend vehicle:
    def post_plan() is also:
        # Due to terrain in this environment, vehicle angles could be large,
        # therefore increasing the ODD thresholds
        ftx_driver.executor_manager_params.ODD_checker_params.angles_orientation_threshold = 45deg
        ftx_driver.executor_manager_params.ODD_checker_params.pitch_angular_rate_threshold = 45degree_per_second
        ftx_driver.executor_manager_params.ODD_checker_params.roll_angular_rate_threshold = 45degree_per_second
        # Due to relatively slow driving, transient_driving_speed_lon_threshold is reduced
        ftx_driver.executor_manager_params.ODD_checker_params.transient_driving_speed_lon_threshold = 5mps
        # Due to bidirectional driving on a lane, we disable
        # the driving direction check by increasing the threshold
        ftx_driver.executor_manager_params.ODD_checker_params.driving_direction_angle_threshold = 180deg

ODD checker messages

This table shows the normalized and full error message for each checker.

Normalized Error message Full Error message
<SUT/object type> - <driver_type> is outside of Foretify ODD - Trajectory Execution Error - longitudinal position <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Trajectory Execution Error - longitudinal position is too far from planned position ([<>]m, more than the maximum [<>]m, configurable as [transient_driving_pos_lon_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Trajectory Execution Error - longitudinal velocity <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Trajectory Execution Error - longitudinal velocity is too far from planned velocity ([<>]mps, more than the maximum [<>]mps , configurable as [transient_driving_speed_lon_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Acceleration <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Acceleration ([<>,<>]mpsps, more than the maximum [<>,<>]mpsps, configurable as [local_x_acceleration_threshold, local_y_acceleration_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Angles Orientation <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Angles Orientation ([<>,<>,<>]deg, more than the maximum [<>]deg, configurable as angles_orientation_threshold) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Angular Rate <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Angular Rate ([<>,<>,<>]degps, more than the maximum [<>,<>,<>]degps, configurable as [yaw_angular_rate_threshold, pitch_angular_rate_threshold, roll_angular_rate_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Slip Angle <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Slip Angle ([<>]deg, is in the range defining drifting aside while driving forward [<>,<>]deg, configurable as [slip_angle_drifting_threshold, slip_angle_sliding_threshold])

<object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Slip Angle ([<>]deg, is in the range defining sliding backward while driving forward [<>,180.0]deg, configurable as [slip_angle_sliding_threshold,180.0])

<object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Slip Angle ([<>]deg, is in the range defining drifting aside while driving backward [<>,<>]deg, configurable as [slip_angle_drifting_threshold, slip_angle_sliding_threshold])

<object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Extreme Slip Angle ([<>]deg, is in the range defining sliding forward while driving backward [0.0,<>]deg, configurable as [0.0,slip_angle_sliding_threshold])
<SUT/object type> - <driver_type> is outside of Foretify ODD - Height mismatch between vehicle and road <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Height mismatch between vehicle and road ([<>]m, more than the maximum [<>]m, configurable as [height_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Wrong driving direction <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Wrong driving direction ([<>]deg, more than the maximum [<>]deg, configurable as [driving_direction_angle_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Oscillation <object_id> - <SUT/object type> - <driver_type> is outside of Foretify ODD - Oscillation (frequency [<>]Hz with amplitude more than the maximum [<>]m, configurable as [oscillation_check_lat_deviation_amplitude_threshold]) - potential contributing factors: velocity range [<>..<>]kph
<SUT/object type> - <driver_type> is outside of Foretify ODD - Longitudinal Acceleration Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Longitudinal Acceleration Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]mpsps , configurable as [oscillation_check_lon_acceleration_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Lateral Acceleration Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Lateral Acceleration Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]m , configurable as [oscillation_check_lat_deviation_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Lateral Position Error Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Lateral Position Error Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]m , configurable as [oscillation_check_lat_deviation_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Throttle Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Throttle Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]% , configurable as [oscillation_check_throttle_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Brake Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Brake Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]% , configurable as [oscillation_check_brake_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Steer Oscillation <SUT/object type> - <driver_type> is outside of Foretify ODD - Steer Oscillation <(frequency [<>]Hz with amplitude more than the maximum [<>]% , configurable as [oscillation_check_steer_amplitude_threshold])>
<SUT/object type> - <driver_type> is outside of Foretify ODD - Foretify time step is different then the calibrated time step of the dynamic executor <SUT/object type> - <driver_type> is outside of Foretify ODD - Foretify time step is different then the calibrated time step of the dynamic executor <([<>]sec, different than [<>]sec)>

Dynamic executor parameters

Parameter Type Description Default
calibrated_time_step time The time step used to calibrate the dynamic executor. 0.02sec