Skip to content

Commit a2d7c2b

Browse files
feat(start_planner): override lane departure check (#1169)
* feat(start_planner): allow lane departure check override (autowarefoundation#6512) * small refactor Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * another refactor Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * further refactoring Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * add param to override lane_departure_check when starting outside lane Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update documentation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> --------- Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * eliminate merge conflict problems Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Update planning/behavior_path_start_planner_module/src/manager.cpp --------- Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> Co-authored-by: Shumpei Wakabayashi <42209144+shmpwk@users.noreply.github.com>
1 parent de648b8 commit a2d7c2b

File tree

7 files changed

+455
-121
lines changed

7 files changed

+455
-121
lines changed

planning/behavior_path_start_planner_module/README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,17 @@ Pull out distance is calculated by the speed, lateral deviation, and the lateral
211211

212212
#### parameters for shift pull out
213213

214-
| Name | Unit | Type | Description | Default value |
215-
| :------------------------------ | :----- | :----- | :------------------------------------------------------------------------------------------------------------------- | :------------ |
216-
| enable_shift_pull_out | [-] | bool | flag whether to enable shift pull out | true |
217-
| check_shift_path_lane_departure | [-] | bool | flag whether to check if shift path footprints are out of lane | false |
218-
| shift_pull_out_velocity | [m/s] | double | velocity of shift pull out | 2.0 |
219-
| pull_out_sampling_num | [-] | int | Number of samplings in the minimum to maximum range of lateral_jerk | 4 |
220-
| maximum_lateral_jerk | [m/s3] | double | maximum lateral jerk | 2.0 |
221-
| minimum_lateral_jerk | [m/s3] | double | minimum lateral jerk | 0.1 |
222-
| 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 |
223-
| maximum_curvature | [m] | double | maximum curvature. The pull out distance is calculated so that the curvature is smaller than this value. | 0.07 |
214+
| Name | Unit | Type | Description | Default value |
215+
| :--------------------------------------------- | :----- | :----- | :------------------------------------------------------------------------------------------------------------------- | :------------ |
216+
| enable_shift_pull_out | [-] | bool | flag whether to enable shift pull out | true |
217+
| check_shift_path_lane_departure | [-] | bool | flag whether to check if shift path footprints are out of lane | true |
218+
| 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 |
219+
| shift_pull_out_velocity | [m/s] | double | velocity of shift pull out | 2.0 |
220+
| pull_out_sampling_num | [-] | int | Number of samplings in the minimum to maximum range of lateral_jerk | 4 |
221+
| maximum_lateral_jerk | [m/s3] | double | maximum lateral jerk | 2.0 |
222+
| minimum_lateral_jerk | [m/s3] | double | minimum lateral jerk | 0.1 |
223+
| 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 |
224+
| maximum_curvature | [m] | double | maximum curvature. The pull out distance is calculated so that the curvature is smaller than this value. | 0.07 |
224225

225226
### **geometric pull out**
226227

planning/behavior_path_start_planner_module/config/start_planner.param.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
center_line_path_interval: 1.0
1313
# shift pull out
1414
enable_shift_pull_out: true
15+
check_shift_path_lane_departure: true
16+
allow_check_shift_path_lane_departure_override: false
1517
shift_collision_check_distance_from_end: -10.0
1618
minimum_shift_pull_out_distance: 0.0
1719
deceleration_interval: 15.0

planning/behavior_path_start_planner_module/include/behavior_path_start_planner_module/start_planner_module.hpp

+15
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,21 @@ class StartPlannerModule : public SceneModuleInterface
178178

179179
bool requiresDynamicObjectsCollisionDetection() const;
180180

181+
uint16_t getSteeringFactorDirection(
182+
const behavior_path_planner::BehaviorModuleOutput & output) const
183+
{
184+
switch (output.turn_signal_info.turn_signal.command) {
185+
case TurnIndicatorsCommand::ENABLE_LEFT:
186+
return SteeringFactor::LEFT;
187+
188+
case TurnIndicatorsCommand::ENABLE_RIGHT:
189+
return SteeringFactor::RIGHT;
190+
191+
default:
192+
return SteeringFactor::STRAIGHT;
193+
}
194+
};
195+
181196
/**
182197
* @brief Check if there are no moving objects around within a certain radius.
183198
*

planning/behavior_path_start_planner_module/include/behavior_path_start_planner_module/start_planner_parameters.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct StartPlannerParameters
5050
// shift pull out
5151
bool enable_shift_pull_out{false};
5252
bool check_shift_path_lane_departure{false};
53+
bool allow_check_shift_path_lane_departure_override{false};
5354
double shift_collision_check_distance_from_end{0.0};
5455
double minimum_shift_pull_out_distance{0.0};
5556
int lateral_acceleration_sampling_num{0};

0 commit comments

Comments
 (0)