Skip to content

Commit da5c907

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

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
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

+5
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ bool StartPlannerModule::findPullOutPath(
684684
const auto [pull_out_lane_stop_objects, others] =
685685
utils::path_safety_checker::separateObjectsByLanelets(
686686
stop_objects, pull_out_lanes, utils::path_safety_checker::isPolygonOverlapLanelet);
687+
utils::path_safety_checker::filterObjectsByClass(
688+
pull_out_lane_stop_objects, parameters_->object_types_to_check_for_path_generation);
687689

688690
// if start_pose_candidate is far from refined_start_pose, backward driving is necessary
689691
const bool backward_is_unnecessary =
@@ -1049,6 +1051,9 @@ PredictedObjects StartPlannerModule::filterStopObjectsInPullOutLanes(
10491051
stop_objects_in_pull_out_lanes, path.points, current_point, object_check_forward_distance,
10501052
object_check_backward_distance);
10511053

1054+
utils::path_safety_checker::filterObjectsByClass(
1055+
stop_objects_in_pull_out_lanes, parameters_->object_types_to_check_for_path_generation);
1056+
10521057
return stop_objects_in_pull_out_lanes;
10531058
}
10541059

0 commit comments

Comments
 (0)