Skip to content

Commit

Permalink
feat(start_planner): add option for lane departure (autowarefoundatio…
Browse files Browse the repository at this point in the history
…n#4151)

Signed-off-by: kosuke55 <[email protected]>

shift
  • Loading branch information
kosuke55 committed Sep 12, 2023
1 parent 4d5708b commit dd508d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
th_moving_object_velocity: 1.0
# shift pull out
enable_shift_pull_out: true
check_shift_path_lane_departure: false
minimum_shift_pull_out_distance: 0.0
deceleration_interval: 15.0
lateral_jerk: 0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Pull out distance is calculated by the speed, lateral deviation, and the lateral
| Name | Unit | Type | Description | Default value |
| :------------------------------ | :----- | :----- | :------------------------------------------------------------------------------------------------------------------- | :------------ |
| enable_shift_pull_out | [-] | bool | flag whether to enable shift pull out | true |
| check_shift_path_lane_departure | [-] | bool | flag whether to check if shift path footprints are out of lane | false |
| shift_pull_out_velocity | [m/s] | double | velocity of shift pull out | 2.0 |
| pull_out_sampling_num | [-] | int | Number of samplings in the minimum to maximum range of lateral_jerk | 4 |
| maximum_lateral_jerk | [m/s3] | double | maximum lateral jerk | 2.0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct StartPlannerParameters
double th_moving_object_velocity;
// shift pull out
bool enable_shift_pull_out;
bool check_shift_path_lane_departure;
double minimum_shift_pull_out_distance;
int lateral_acceleration_sampling_num;
double lateral_jerk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@ StartPlannerParameters BehaviorPathPlannerNode::getStartPlannerParam()
p.th_moving_object_velocity = declare_parameter<double>(ns + "th_moving_object_velocity");
// shift pull out
p.enable_shift_pull_out = declare_parameter<bool>(ns + "enable_shift_pull_out");
p.check_shift_path_lane_departure =
declare_parameter<bool>(ns + "check_shift_path_lane_departure");
p.minimum_shift_pull_out_distance =
declare_parameter<double>(ns + "minimum_shift_pull_out_distance");
p.lateral_acceleration_sampling_num =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ boost::optional<PullOutPath> ShiftPullOut::plan(Pose start_pose, Pose goal_pose)
const auto expanded_lanes = utils::expandLanelets(
drivable_lanes, dp.drivable_area_left_bound_offset, dp.drivable_area_right_bound_offset,
dp.drivable_area_types_to_skip);
if (lane_departure_checker_->checkPathWillLeaveLane(
utils::transformToLanelets(expanded_lanes), path_start_to_end)) {
if (
parameters_.check_shift_path_lane_departure &&
lane_departure_checker_->checkPathWillLeaveLane(
utils::transformToLanelets(expanded_lanes), path_start_to_end)) {
continue;
}

Expand Down

0 comments on commit dd508d0

Please sign in to comment.