Skip to content

Commit

Permalink
feat(start_planner): override lane departure check (autowarefoundatio…
Browse files Browse the repository at this point in the history
…n#1169)

* feat(start_planner): allow lane departure check override (autowarefoundation#6512)

* small refactor

Signed-off-by: Daniel Sanchez <[email protected]>

* another refactor

Signed-off-by: Daniel Sanchez <[email protected]>

* further refactoring

Signed-off-by: Daniel Sanchez <[email protected]>

* add param to override lane_departure_check when starting outside lane

Signed-off-by: Daniel Sanchez <[email protected]>

* update documentation

Signed-off-by: Daniel Sanchez <[email protected]>

---------

Signed-off-by: Daniel Sanchez <[email protected]>

* eliminate merge conflict problems

Signed-off-by: Daniel Sanchez <[email protected]>

* Update planning/behavior_path_start_planner_module/src/manager.cpp

---------

Signed-off-by: Daniel Sanchez <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
  • Loading branch information
danielsanchezaran and shmpwk authored Mar 5, 2024
1 parent de648b8 commit a2d7c2b
Show file tree
Hide file tree
Showing 7 changed files with 455 additions and 121 deletions.
21 changes: 11 additions & 10 deletions planning/behavior_path_start_planner_module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,17 @@ Pull out distance is calculated by the speed, lateral deviation, and the lateral

#### parameters for shift pull out

| 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 |
| minimum_lateral_jerk | [m/s3] | double | minimum lateral jerk | 0.1 |
| minimum_shift_pull_out_distance | [m] | double | minimum shift pull out distance. if calculated pull out distance is shorter than this, use this for path generation. | 0.0 |
| maximum_curvature | [m] | double | maximum curvature. The pull out distance is calculated so that the curvature is smaller than this value. | 0.07 |
| 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 | true |
| allow_check_shift_path_lane_departure_override | [-] | bool | flag to override/cancel lane departure check if the ego vehicle's starting pose is already 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 |
| minimum_lateral_jerk | [m/s3] | double | minimum lateral jerk | 0.1 |
| minimum_shift_pull_out_distance | [m] | double | minimum shift pull out distance. if calculated pull out distance is shorter than this, use this for path generation. | 0.0 |
| maximum_curvature | [m] | double | maximum curvature. The pull out distance is calculated so that the curvature is smaller than this value. | 0.07 |

### **geometric pull out**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
center_line_path_interval: 1.0
# shift pull out
enable_shift_pull_out: true
check_shift_path_lane_departure: true
allow_check_shift_path_lane_departure_override: false
shift_collision_check_distance_from_end: -10.0
minimum_shift_pull_out_distance: 0.0
deceleration_interval: 15.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,21 @@ class StartPlannerModule : public SceneModuleInterface

bool requiresDynamicObjectsCollisionDetection() const;

uint16_t getSteeringFactorDirection(
const behavior_path_planner::BehaviorModuleOutput & output) const
{
switch (output.turn_signal_info.turn_signal.command) {
case TurnIndicatorsCommand::ENABLE_LEFT:
return SteeringFactor::LEFT;

case TurnIndicatorsCommand::ENABLE_RIGHT:
return SteeringFactor::RIGHT;

default:
return SteeringFactor::STRAIGHT;
}
};

/**
* @brief Check if there are no moving objects around within a certain radius.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct StartPlannerParameters
// shift pull out
bool enable_shift_pull_out{false};
bool check_shift_path_lane_departure{false};
bool allow_check_shift_path_lane_departure_override{false};
double shift_collision_check_distance_from_end{0.0};
double minimum_shift_pull_out_distance{0.0};
int lateral_acceleration_sampling_num{0};
Expand Down
Loading

0 comments on commit a2d7c2b

Please sign in to comment.