Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lane_change): regulate lane change on crosswalk and intersection #5068

Merged
merged 8 commits into from
Sep 22, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
motorcycle: true
pedestrian: true

# lane change regulations
regulation:
crosswalk: false
intersection: false

# collision check
enable_prepare_segment_collision_check: true
prepare_segment_ignore_object_velocity_thresh: 0.1 # [m/s]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ The following figure illustrates when the lane is blocked in multiple lane chang

![multiple-lane-changes](../image/lane_change/lane_change-when_cannot_change_lanes.png)

### Lane change regulations

If you want to regulate lane change on crosswalks or intersections, the lane change module finds a lane change path excluding it includes crosswalks or intersections.
To regulate lane change on crosswalks or intersections, change `regulation.crosswalk` or `regulation.intersection` to `true`.

### Aborting lane change

The abort process may result in three different outcome; Cancel, Abort and Stop/Cruise.
Expand Down Expand Up @@ -294,6 +299,13 @@ The following parameters are configurable in `lane_change.param.yaml`.
| `target_object.motorcycle` | [-] | boolean | Include motorcycle objects for safety check | true |
| `target_object.pedestrian` | [-] | boolean | Include pedestrian objects for safety check | true |

### Lane change regulations

| Name | Unit | Type | Description | Default value |
| :------------------------ | ---- | ------- | ------------------------------------- | ------------- |
| `regulation.crosswalk` | [-] | boolean | Regulate lane change on crosswalks | false |
| `regulation.intersection` | [-] | boolean | Regulate lane change on intersections | false |

### Collision checks during lane change

The following parameters are configurable in `behavior_path_planner.param.yaml` and `lane_change.param.yaml`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class NormalLaneChange : public LaneChangeBase
const lanelet::ConstLanelets & current_lanes,
const lanelet::ConstLanelets & target_lanes) const;

double calcPrepareDuration(
std::vector<double> calcPrepareDuration(
const lanelet::ConstLanelets & current_lanes,
const lanelet::ConstLanelets & target_lanes) const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ struct LaneChangeParameters
bool check_objects_on_other_lanes{true};
bool use_all_predicted_path{false};

// regulatory elements
bool regulate_on_crosswalk{false};
bool regulate_on_intersection{false};

// true by default for all objects
utils::path_safety_checker::ObjectTypesToCheck object_types_to_check;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ LaneChangeModuleManager::LaneChangeModuleManager(
p.use_all_predicted_path =
getOrDeclareParameter<bool>(*node, parameter("use_all_predicted_path"));

// lane change regulations
p.regulate_on_crosswalk = getOrDeclareParameter<bool>(*node, parameter("regulation.crosswalk"));
p.regulate_on_intersection =
getOrDeclareParameter<bool>(*node, parameter("regulation.intersection"));

p.rss_params.longitudinal_distance_min_threshold = getOrDeclareParameter<double>(
*node, parameter("safety_check.longitudinal_distance_min_threshold"));
p.rss_params.longitudinal_velocity_delta_time = getOrDeclareParameter<double>(
Expand Down
Loading
Loading