Skip to content

Commit

Permalink
refactor(lane_change): refactor lane change parameters (#9403)
Browse files Browse the repository at this point in the history
* refactor lane change parameters

Signed-off-by: mohammad alqudah <[email protected]>

* update lane change param yaml

Signed-off-by: mohammad alqudah <[email protected]>

* update lane change README

Signed-off-by: mohammad alqudah <[email protected]>

* regroup some parameters

Signed-off-by: mohammad alqudah <[email protected]>

* run pre-commit prettier step

Signed-off-by: mohammad alqudah <[email protected]>

* Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/parameters.hpp

Co-authored-by: Zulfaqar Azmi <[email protected]>

* Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/README.md

Co-authored-by: Zulfaqar Azmi <[email protected]>

* Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/README.md

Co-authored-by: Zulfaqar Azmi <[email protected]>

* apply pre-commit checks

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
Co-authored-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
mkquda and zulfaqar-azmi-t4 authored Nov 26, 2024
1 parent b3ded07 commit abf0f23
Show file tree
Hide file tree
Showing 8 changed files with 475 additions and 481 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,6 @@ The ego vehicle may need to secure ample inter-vehicle distance ahead of the tar

![enable collision check at prepare phase](./images/lane_change-enable_collision_check_at_prepare_phase.png)

The parameter `prepare_phase_ignore_target_speed_thresh` can be configured to ignore the prepare phase collision check for targets whose speeds are less than a specific threshold, such as stationary or very slow-moving objects.

#### If the lane is blocked and multiple lane changes

When driving on the public road with other vehicles, there exist scenarios where lane changes cannot be executed. Suppose the candidate path is evaluated as unsafe, for example, due to incoming vehicles in the adjacent lane. In that case, the ego vehicle can't change lanes, and it is impossible to reach the goal. Therefore, the ego vehicle must stop earlier at a certain distance and wait for the adjacent lane to be evaluated as safe. The minimum stopping distance can be computed from shift length and minimum lane changing velocity.
Expand Down Expand Up @@ -820,25 +818,22 @@ The following parameters are configurable in [lane_change.param.yaml](https://gi
| Name | Unit | Type | Description | Default value |
| :------------------------------------------- | ------ | ------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `backward_lane_length` | [m] | double | The backward length to check incoming objects in lane change target lane. | 200.0 |
| `prepare_duration` | [m] | double | The preparation time for the ego vehicle to be ready to perform lane change. | 4.0 |
| `backward_length_buffer_for_end_of_lane` | [m] | double | The end of lane buffer to ensure ego vehicle has enough distance to start lane change | 3.0 |
| `backward_length_buffer_for_blocking_object` | [m] | double | The end of lane buffer to ensure ego vehicle has enough distance to start lane change when there is an object in front | 3.0 |
| `backward_length_from_intersection` | [m] | double | Distance threshold from the last intersection to invalidate or cancel the lane change path | 5.0 |
| `lane_change_finish_judge_buffer` | [m] | double | The additional buffer used to confirm lane change process completion | 2.0 |
| `lane_changing_lateral_jerk` | [m/s3] | double | Lateral jerk value for lane change path generation | 0.5 |
| `minimum_lane_changing_velocity` | [m/s] | double | Minimum speed during lane changing process. | 2.78 |
| `prediction_time_resolution` | [s] | double | Time resolution for object's path interpolation and collision check. | 0.5 |
| `longitudinal_acceleration_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by longitudinal acceleration | 3 |
| `lateral_acceleration_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by lateral acceleration | 3 |
| `trajectory.prepare_duration` | [m] | double | The preparation time for the ego vehicle to be ready to perform lane change. | 4.0 |
| `trajectory.lateral_jerk` | [m/s3] | double | Lateral jerk value for lane change path generation | 0.5 |
| `trajectory.minimum_lane_changing_velocity` | [m/s] | double | Minimum speed during lane changing process. | 2.78 |
| `trajectory.lon_acc_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by longitudinal acceleration | 3 |
| `trajectory.lat_acc_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by lateral acceleration | 3 |
| `trajectory.max_longitudinal_acc` | [m/s2] | double | maximum longitudinal acceleration for lane change | 1.0 |
| `trajectory.min_longitudinal_acc` | [m/s2] | double | maximum longitudinal deceleration for lane change | -1.0 |
| `object_check_min_road_shoulder_width` | [m] | double | Width considered as a road shoulder if the lane does not have a road shoulder | 0.5 |
| `object_shiftable_ratio_threshold` | [-] | double | Vehicles around the center line within this distance ratio will be excluded from parking objects | 0.6 |
| `min_length_for_turn_signal_activation` | [m] | double | Turn signal will be activated if the ego vehicle approaches to this length from minimum lane change length | 10.0 |
| `length_ratio_for_turn_signal_deactivation` | [-] | double | Turn signal will be deactivated if the ego vehicle approaches to this length ratio for lane change finish point | 0.8 |
| `max_longitudinal_acc` | [-] | double | maximum longitudinal acceleration for lane change | 1.0 |
| `min_longitudinal_acc` | [-] | double | maximum longitudinal deceleration for lane change | -1.0 |
| `lateral_acceleration.velocity` | [m/s] | double | Reference velocity for lateral acceleration calculation (look up table) | [0.0, 4.0, 10.0] |
| `lateral_acceleration.min_values` | [m/ss] | double | Min lateral acceleration values corresponding to velocity (look up table) | [0.4, 0.4, 0.4] |
| `lateral_acceleration.max_values` | [m/ss] | double | Max lateral acceleration values corresponding to velocity (look up table) | [0.65, 0.65, 0.65] |
| `lateral_acceleration.min_values` | [m/s2] | double | Min lateral acceleration values corresponding to velocity (look up table) | [0.4, 0.4, 0.4] |
| `lateral_acceleration.max_values` | [m/s2] | double | Max lateral acceleration values corresponding to velocity (look up table) | [0.65, 0.65, 0.65] |

### Parameter to judge if lane change is completed

Expand Down Expand Up @@ -891,14 +886,14 @@ The following parameters are used to judge lane change completion.

| Name | Unit | Type | Description | Default value |
| :------------------------------------------------------- | ----- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `enable_collision_check_for_prepare_phase.general_lanes` | [-] | boolean | Perform collision check starting from the prepare phase for situations not explicitly covered by other settings (e.g., intersections). If `false`, collision check only evaluated for lane changing phase. | false |
| `enable_collision_check_for_prepare_phase.intersection` | [-] | boolean | Perform collision check starting from prepare phase when ego is in intersection. If `false`, collision check only evaluated for lane changing phase. | true |
| `enable_collision_check_for_prepare_phase.turns` | [-] | boolean | Perform collision check starting from prepare phase when ego is in lanelet with turn direction tags. If `false`, collision check only evaluated for lane changing phase. | true |
| `prepare_phase_ignore_target_speed_thresh` | [m/s] | double | Ignore collision check in prepare phase of object speed that is lesser that the configured value. `enable_collision_check_at_prepare_phase` must be `true` | 0.1 |
| `check_objects_on_current_lanes` | [-] | boolean | If true, the lane change module check objects on current lanes when performing collision assessment. | false |
| `check_objects_on_other_lanes` | [-] | boolean | If true, the lane change module include objects on other lanes. when performing collision assessment | false |
| `use_all_predicted_path` | [-] | boolean | If false, use only the predicted path that has the maximum confidence. | true |
| `safety_check.collision_check_yaw_diff_threshold` | [rad] | double | Maximum yaw difference between ego and object when executing rss-based collision checking | 3.1416 |
| `collision_check.enable_for_prepare_phase.general_lanes` | [-] | boolean | Perform collision check starting from the prepare phase for situations not explicitly covered by other settings (e.g., intersections). If `false`, collision check only evaluated for lane changing phase. | false |
| `collision_check.enable_for_prepare_phase.intersection` | [-] | boolean | Perform collision check starting from prepare phase when ego is in intersection. If `false`, collision check only evaluated for lane changing phase. | true |
| `collision_check.enable_for_prepare_phase.turns` | [-] | boolean | Perform collision check starting from prepare phase when ego is in lanelet with turn direction tags. If `false`, collision check only evaluated for lane changing phase. | true |
| `collision_check.check_current_lanes` | [-] | boolean | If true, the lane change module always checks objects in the current lanes for collision assessment. If false, it only checks objects in the current lanes when the ego vehicle is stuck. | false |
| `collision_check.check_other_lanes` | [-] | boolean | If true, the lane change module includes objects in other lanes when performing collision assessment. | false |
| `collision_check.use_all_predicted_paths` | [-] | boolean | If false, use only the predicted path that has the maximum confidence. | true |
| `collision_check.prediction_time_resolution` | [s] | double | Time resolution for object's path interpolation and collision check. | 0.5 |
| `collision_check.yaw_diff_threshold` | [rad] | double | Maximum yaw difference between ego and object when executing rss-based collision checking | 3.1416 |

#### safety constraints during lane change path is computed

Expand All @@ -910,7 +905,7 @@ The following parameters are used to judge lane change completion.
| `safety_check.execution.rear_vehicle_safety_time_margin` | [s] | double | The time buffer for the rear vehicle to come into complete stop when its driver perform sudden braking. | 1.0 |
| `safety_check.execution.lateral_distance_max_threshold` | [m] | double | The lateral distance threshold that is used to determine whether lateral distance between two object is enough and whether lane change is safe. | 2.0 |
| `safety_check.execution.longitudinal_distance_min_threshold` | [m] | double | The longitudinal distance threshold that is used to determine whether longitudinal distance between two object is enough and whether lane change is safe. | 3.0 |
| `safety_check.cancel.longitudinal_velocity_delta_time` | [m] | double | The time multiplier that is used to compute the actual gap between vehicle at each predicted points (not RSS distance) | 0.8 |
| `safety_check.execution.longitudinal_velocity_delta_time` | [m] | double | The time multiplier that is used to compute the actual gap between vehicle at each predicted points (not RSS distance) | 0.8 |

#### safety constraints specifically for stopped or parked vehicles

Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
/**:
ros__parameters:
lane_change:
backward_lane_length: 200.0 #[m]
prepare_duration: 4.0 # [s]

backward_lane_length: 200.0
backward_length_buffer_for_end_of_lane: 3.0 # [m]
backward_length_buffer_for_blocking_object: 3.0 # [m]
backward_length_from_intersection: 5.0 # [m]

lane_changing_lateral_jerk: 0.5 # [m/s3]

minimum_lane_changing_velocity: 2.78 # [m/s]
prediction_time_resolution: 0.5 # [s]
longitudinal_acceleration_sampling_num: 5
lateral_acceleration_sampling_num: 3

# side walk parked vehicle
object_check_min_road_shoulder_width: 0.5 # [m]
object_shiftable_ratio_threshold: 0.6

# turn signal
min_length_for_turn_signal_activation: 10.0 # [m]
length_ratio_for_turn_signal_deactivation: 0.8 # ratio (desired end position)

# longitudinal acceleration
min_longitudinal_acc: -1.0
max_longitudinal_acc: 1.0

skip_process:
longitudinal_distance_diff_threshold:
prepare: 1.0
lane_changing: 1.0
# trajectory generation
trajectory:
prepare_duration: 4.0
lateral_jerk: 0.5
min_longitudinal_acc: -1.0
max_longitudinal_acc: 1.0
th_prepare_length_diff: 1.0
th_lane_changing_length_diff: 1.0
min_lane_changing_velocity: 2.78
lon_acc_sampling_num: 5
lat_acc_sampling_num: 3

# safety check
safety_check:
allow_loose_check_for_cancel: true
enable_target_lane_bound_check: true
collision_check_yaw_diff_threshold: 3.1416
stopped_object_velocity_threshold: 1.0 # [m/s]
execution:
expected_front_deceleration: -1.0
expected_rear_deceleration: -1.0
Expand Down Expand Up @@ -104,14 +97,16 @@
stop_time: 3.0 # [s]

# collision check
enable_collision_check_for_prepare_phase:
general_lanes: false
intersection: true
turns: true
stopped_object_velocity_threshold: 1.0 # [m/s]
check_objects_on_current_lanes: false
check_objects_on_other_lanes: false
use_all_predicted_path: false
collision_check:
enable_for_prepare_phase:
general_lanes: false
intersection: true
turns: true
prediction_time_resolution: 0.5
yaw_diff_threshold: 3.1416
check_current_lanes: false
check_other_lanes: false
use_all_predicted_paths: false

# lane change cancel
cancel:
Expand Down
Loading

0 comments on commit abf0f23

Please sign in to comment.