Skip to content

Commit eb75800

Browse files
add object_types_to_check_for_path_generation
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
1 parent f2fcbea commit eb75800

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

planning/behavior_path_start_planner_module/config/start_planner.param.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
collision_check_margins: [2.0, 1.0, 0.5, 0.1]
99
collision_check_margin_from_front_object: 5.0
1010
th_moving_object_velocity: 1.0
11+
object_types_to_check_for_path_generation:
12+
check_car: true
13+
check_truck: true
14+
check_bus: true
15+
check_trailer: true
16+
check_bicycle: true
17+
check_motorcycle: true
18+
check_pedestrian: true
19+
check_unknown: true
1120
th_distance_to_middle_of_the_road: 0.5
1221
center_line_path_interval: 1.0
1322
# shift pull out

planning/behavior_path_start_planner_module/include/behavior_path_start_planner_module/data_structs.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ struct StartPlannerParameters
6767
std::vector<double> collision_check_margins{};
6868
double collision_check_margin_from_front_object{0.0};
6969
double th_moving_object_velocity{0.0};
70+
behavior_path_planner::utils::path_safety_checker::ObjectTypesToCheck
71+
object_types_to_check_for_path_generation{};
7072
double center_line_path_interval{0.0};
7173

7274
// shift pull out

planning/behavior_path_start_planner_module/src/manager.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ void StartPlannerModuleManager::init(rclcpp::Node * node)
4949
p.collision_check_margin_from_front_object =
5050
node->declare_parameter<double>(ns + "collision_check_margin_from_front_object");
5151
p.th_moving_object_velocity = node->declare_parameter<double>(ns + "th_moving_object_velocity");
52+
p.object_types_to_check_for_path_generation.check_car =
53+
node->declare_parameter<bool>(ns + "check_car");
54+
p.object_types_to_check_for_path_generation.check_truck =
55+
node->declare_parameter<bool>(ns + "check_truck");
56+
p.object_types_to_check_for_path_generation.check_bus =
57+
node->declare_parameter<bool>(ns + "check_bus");
58+
p.object_types_to_check_for_path_generation.check_trailer =
59+
node->declare_parameter<bool>(ns + "check_trailer");
60+
p.object_types_to_check_for_path_generation.check_unknown =
61+
node->declare_parameter<bool>(ns + "check_unknown");
62+
p.object_types_to_check_for_path_generation.check_bicycle =
63+
node->declare_parameter<bool>(ns + "check_bicycle");
64+
p.object_types_to_check_for_path_generation.check_motorcycle =
65+
node->declare_parameter<bool>(ns + "check_motorcycle");
66+
p.object_types_to_check_for_path_generation.check_pedestrian =
67+
node->declare_parameter<bool>(ns + "check_pedestrian");
5268
p.center_line_path_interval = node->declare_parameter<double>(ns + "center_line_path_interval");
5369
// shift pull out
5470
p.enable_shift_pull_out = node->declare_parameter<bool>(ns + "enable_shift_pull_out");

planning/behavior_path_start_planner_module/src/start_planner_module.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,11 @@ bool StartPlannerModule::findPullOutPath(
683683
// extract stop objects in pull out lane for collision check
684684
const auto stop_objects = utils::path_safety_checker::filterObjectsByVelocity(
685685
*dynamic_objects, parameters_->th_moving_object_velocity);
686-
const auto [pull_out_lane_stop_objects, others] =
686+
auto [pull_out_lane_stop_objects, others] =
687687
utils::path_safety_checker::separateObjectsByLanelets(
688688
stop_objects, pull_out_lanes, utils::path_safety_checker::isPolygonOverlapLanelet);
689+
utils::path_safety_checker::filterObjectsByClass(
690+
pull_out_lane_stop_objects, parameters_->object_types_to_check_for_path_generation);
689691

690692
// if start_pose_candidate is far from refined_start_pose, backward driving is necessary
691693
const bool backward_is_unnecessary =
@@ -1051,6 +1053,9 @@ PredictedObjects StartPlannerModule::filterStopObjectsInPullOutLanes(
10511053
stop_objects_in_pull_out_lanes, path.points, current_point, object_check_forward_distance,
10521054
object_check_backward_distance);
10531055

1056+
utils::path_safety_checker::filterObjectsByClass(
1057+
stop_objects_in_pull_out_lanes, parameters_->object_types_to_check_for_path_generation);
1058+
10541059
return stop_objects_in_pull_out_lanes;
10551060
}
10561061

0 commit comments

Comments
 (0)