Skip to content

Commit 769e091

Browse files
committed
fix(goal_planner): fix lane departure check not working correctly due to uninitialized variable (autowarefoundation#8449)
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
1 parent ecb33b2 commit 769e091

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,16 @@ The main thread will be the one called from the planner manager flow.
206206
- The path candidates generated there are referred to by the main thread, and the one judged to be valid for the current planner data (e.g. ego and object information) is selected from among them. valid means no sudden deceleration, no collision with obstacles, etc. The selected path will be the output of this module.
207207
- If there is no path selected, or if the selected path is collision and ego is stuck, a separate thread(freespace path generation thread) will generate a path using freespace planning algorithm. If a valid free space path is found, it will be the output of the module. If the object moves and the pull over path generated along the lane is collision-free, the path is used as output again. See also the section on freespace parking for more information on the flow of generating freespace paths.
208208

209-
| Name | Unit | Type | Description | Default value |
210-
| :------------------------------- | :----- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------- |
211-
| pull_over_minimum_request_length | [m] | double | when the ego-vehicle approaches the goal by this distance or a safe distance to stop, pull over is activated. | 100.0 |
212-
| pull_over_velocity | [m/s] | double | decelerate to this speed by the goal search area | 3.0 |
213-
| pull_over_minimum_velocity | [m/s] | double | speed of pull_over after stopping once. this prevents excessive acceleration. | 1.38 |
214-
| decide_path_distance | [m] | double | decide path if it approaches this distance relative to the parking position. after that, no path planning and goal search are performed | 10.0 |
215-
| maximum_deceleration | [m/s2] | double | maximum deceleration. it prevents sudden deceleration when a parking path cannot be found suddenly | 1.0 |
216-
| path_priority | [-] | string | In case `efficient_path` use a goal that can generate an efficient path which is set in `efficient_path_order`. In case `close_goal` use the closest goal to the original one. | efficient_path |
217-
| efficient_path_order | [-] | string | efficient order of pull over planner along lanes excluding freespace pull over | ["SHIFT", "ARC_FORWARD", "ARC_BACKWARD"] |
209+
| Name | Unit | Type | Description | Default value |
210+
| :------------------------------------ | :----- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------- |
211+
| pull_over_minimum_request_length | [m] | double | when the ego-vehicle approaches the goal by this distance or a safe distance to stop, pull over is activated. | 100.0 |
212+
| pull_over_velocity | [m/s] | double | decelerate to this speed by the goal search area | 3.0 |
213+
| pull_over_minimum_velocity | [m/s] | double | speed of pull_over after stopping once. this prevents excessive acceleration. | 1.38 |
214+
| decide_path_distance | [m] | double | decide path if it approaches this distance relative to the parking position. after that, no path planning and goal search are performed | 10.0 |
215+
| maximum_deceleration | [m/s2] | double | maximum deceleration. it prevents sudden deceleration when a parking path cannot be found suddenly | 1.0 |
216+
| path_priority | [-] | string | In case `efficient_path` use a goal that can generate an efficient path which is set in `efficient_path_order`. In case `close_goal` use the closest goal to the original one. | efficient_path |
217+
| efficient_path_order | [-] | string | efficient order of pull over planner along lanes excluding freespace pull over | ["SHIFT", "ARC_FORWARD", "ARC_BACKWARD"] |
218+
| lane_departure_check_expansion_margin | [m] | double | margin to expand the ego vehicle footprint when doing lane departure checks | 0.0 |
218219

219220
### **shift parking**
220221

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/config/goal_planner.param.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
maximum_jerk: 1.0
5555
path_priority: "efficient_path" # "efficient_path" or "close_goal"
5656
efficient_path_order: ["SHIFT", "ARC_FORWARD", "ARC_BACKWARD"] # only lane based pull over(exclude freespace parking)
57+
lane_departure_check_expansion_margin: 0.0
5758

5859
# shift parking
5960
shift_parking:

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/include/autoware/behavior_path_goal_planner_module/goal_planner_parameters.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ struct GoalPlannerParameters
8989
double maximum_jerk{0.0};
9090
std::string path_priority; // "efficient_path" or "close_goal"
9191
std::vector<std::string> efficient_path_order{};
92+
double lane_departure_check_expansion_margin{0.0};
9293

9394
// shift path
9495
bool enable_shift_parking{false};

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ GoalPlannerModule::GoalPlannerModule(
6868
{
6969
LaneDepartureChecker lane_departure_checker{};
7070
lane_departure_checker.setVehicleInfo(vehicle_info_);
71+
lane_departure_checker::Param lane_departure_checker_params;
72+
lane_departure_checker_params.footprint_extra_margin =
73+
parameters->lane_departure_check_expansion_margin;
74+
lane_departure_checker.setParam(lane_departure_checker_params);
7175

7276
occupancy_grid_map_ = std::make_shared<OccupancyGridBasedCollisionDetector>();
7377

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/manager.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ void GoalPlannerModuleManager::init(rclcpp::Node * node)
137137
p.path_priority = node->declare_parameter<std::string>(ns + "path_priority");
138138
p.efficient_path_order =
139139
node->declare_parameter<std::vector<std::string>>(ns + "efficient_path_order");
140+
p.lane_departure_check_expansion_margin =
141+
node->declare_parameter<double>(ns + "lane_departure_check_expansion_margin");
140142
}
141143

142144
// shift parking
@@ -526,6 +528,9 @@ void GoalPlannerModuleManager::updateModuleParams(
526528
updateParam<double>(parameters, ns + "deceleration_interval", p->deceleration_interval);
527529
updateParam<double>(
528530
parameters, ns + "after_shift_straight_distance", p->after_shift_straight_distance);
531+
updateParam<double>(
532+
parameters, ns + "lane_departure_check_expansion_margin",
533+
p->lane_departure_check_expansion_margin);
529534
}
530535

531536
// parallel parking common

0 commit comments

Comments
 (0)