diff --git a/planning/autoware_obstacle_cruise_planner/README.md b/planning/autoware_obstacle_cruise_planner/README.md index 1cb8128110e7c..9cb92b0b08ce1 100644 --- a/planning/autoware_obstacle_cruise_planner/README.md +++ b/planning/autoware_obstacle_cruise_planner/README.md @@ -200,12 +200,18 @@ If the acceleration is less than `common.min_strong_accel`, the stop planning wi | Parameter | Type | Description | | ----------------------------- | ------ | ---------------------------------------------- | +| `common.safe_distance_method` | string | safe distance method selection from time_based and RSS | | `common.safe_distance_margin` | double | minimum distance with obstacles for cruise [m] | +| `common.safe_distance_time_margin` | double | time values used in time-based safe distance rule, e.g. 2-seconds rule, 3-seconds rule [s]| The role of the cruise planning is keeping a safe distance with dynamic vehicle objects with smoothed velocity transition. This includes not only cruising a front vehicle, but also reacting a cut-in and cut-out vehicle. -The safe distance is calculated dynamically based on the Responsibility-Sensitive Safety (RSS) by the following equation. +The parameter `common.safe_distance_method` is used to select the safe distnace method to be either `RSS` or `time-based`. + +#### RSS + +In Responsibility-Sensitive Safety (RSS) method, the safe distance is calculated dynamically based on the following equation. $$ d_{rss} = v_{ego} t_{idling} + \frac{1}{2} a_{ego} t_{idling}^2 + \frac{v_{ego}^2}{2 a_{ego}} - \frac{v_{obstacle}^2}{2 a_{obstacle}}, @@ -242,6 +248,18 @@ $$ | `lpf(val)` | apply low-pass filter to `val` | | `pid(val)` | apply pid to `val` | +#### Time-based +In time-based method, the safe distance is calculated dynamically based on the following equation. + +$$ +d_{time,based} = v_{ego} * t_{safe,distance} +$$ + +assuming that +- $d_{time,based}$ is the calculated safe distance, +- $v_{ego}$ is the ego's current velocity, and +- $t_{safe,distance}$ is the selected time value time-based safe distance rule, e.g. 2-seconds rule, 3-seconds rule. Parameter: `common.safe_distance_time_margin` + ### Slow down planning | Parameter | Type | Description | diff --git a/planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml b/planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml index fbc0af8958849..91e3838ee3915 100644 --- a/planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml +++ b/planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml @@ -15,7 +15,7 @@ min_object_accel_for_rss: -1.0 # front obstacle's acceleration to calculate RSS distance [m/ss] safe_distance_margin : 6.0 # This is also used as a stop margin [m] terminal_safe_distance_margin : 3.0 # Stop margin at the goal. This value cannot exceed safe distance margin. [m] - safe_distance_time_margin : 2.0 # This is used for time-based safe distance rule, e.g. 2-seconds rule, 3-seconds rules [s] + safe_distance_time_margin : 2.0 # This is used for time-based safe distance rule, e.g. 2-seconds rule, 3-seconds rule [s] hold_stop_velocity_threshold: 0.01 # The maximum ego velocity to hold stopping [m/s] hold_stop_distance_threshold: 0.3 # The ego keeps stopping if the distance to stop changes within the threshold [m] slow_down_min_acc: -1.0 # slow down min deceleration [m/ss]