Skip to content

Commit 2e181d1

Browse files
Merge branch 'refactor/separate_start_planner_parameters' into refactor/start_planner_202401
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
2 parents 4bf8c22 + e236ff9 commit 2e181d1

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

planning/behavior_path_start_planner_module/include/behavior_path_start_planner_module/start_planner_module.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class StartPlannerModule : public SceneModuleInterface
191191

192192
std::vector<std::shared_ptr<PullOutPlannerBase>> start_planners_;
193193
PullOutStatus status_;
194-
mutable StartPlannerDebugData start_planner_data_;
194+
mutable StartPlannerDebugData debug_data_;
195195

196196
std::deque<nav_msgs::msg::Odometry::ConstSharedPtr> odometry_buffer_;
197197

planning/behavior_path_start_planner_module/src/start_planner_module.cpp

+21-23
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void StartPlannerModule::initVariables()
127127
resetPathReference();
128128
debug_marker_.markers.clear();
129129
initializeSafetyCheckParameters();
130-
initializeCollisionCheckDebugMap(start_planner_data_.collision_check);
130+
initializeCollisionCheckDebugMap(debug_data_.collision_check);
131131
updateDrivableLanes();
132132
}
133133

@@ -592,8 +592,8 @@ void StartPlannerModule::planWithPriority(
592592
if (findPullOutPath(
593593
start_pose_candidates[index], planner, refined_start_pose, goal_pose,
594594
collision_check_margin)) {
595-
start_planner_data_.selected_start_pose_candidate_index = index;
596-
start_planner_data_.margin_for_start_pose_candidate = collision_check_margin;
595+
debug_data_.selected_start_pose_candidate_index = index;
596+
debug_data_.margin_for_start_pose_candidate = collision_check_margin;
597597
return;
598598
}
599599
}
@@ -851,8 +851,8 @@ void StartPlannerModule::updatePullOutStatus()
851851
start_pose_candidates, *refined_start_pose, goal_pose, parameters_->search_priority);
852852
}
853853

854-
start_planner_data_.refined_start_pose = *refined_start_pose;
855-
start_planner_data_.start_pose_candidates = start_pose_candidates;
854+
debug_data_.refined_start_pose = *refined_start_pose;
855+
debug_data_.start_pose_candidates = start_pose_candidates;
856856
const auto pull_out_lanes = start_planner_utils::getPullOutLanes(
857857
planner_data_, planner_data_->parameters.backward_path_length + parameters_->max_back_distance);
858858

@@ -1200,13 +1200,12 @@ bool StartPlannerModule::isSafePath() const
12001200
status_.is_safe_dynamic_objects ? 1.0 : safety_check_params_->hysteresis_factor_expand_rate;
12011201

12021202
behavior_path_planner::updateSafetyCheckDebugData(
1203-
start_planner_data_, filtered_objects, target_objects_on_lane, ego_predicted_path);
1203+
debug_data_, filtered_objects, target_objects_on_lane, ego_predicted_path);
12041204

12051205
return behavior_path_planner::utils::path_safety_checker::checkSafetyWithRSS(
12061206
pull_out_path, ego_predicted_path, target_objects_on_lane.on_current_lane,
1207-
start_planner_data_.collision_check, planner_data_->parameters,
1208-
safety_check_params_->rss_params, objects_filtering_params_->use_all_predicted_path,
1209-
hysteresis_factor);
1207+
debug_data_.collision_check, planner_data_->parameters, safety_check_params_->rss_params,
1208+
objects_filtering_params_->use_all_predicted_path, hysteresis_factor);
12101209
}
12111210

12121211
bool StartPlannerModule::isGoalBehindOfEgoInSameRouteSegment() const
@@ -1393,7 +1392,7 @@ void StartPlannerModule::setDebugData()
13931392
add(createPoseMarkerArray(status_.pull_out_path.start_pose, "start_pose", 0, 0.3, 0.9, 0.3));
13941393
add(createPoseMarkerArray(status_.pull_out_path.end_pose, "end_pose", 0, 0.9, 0.9, 0.3));
13951394
add(createFootprintMarkerArray(
1396-
start_planner_data_.refined_start_pose, vehicle_info_, "refined_start_pose", 0, 0.9, 0.9, 0.3));
1395+
debug_data_.refined_start_pose, vehicle_info_, "refined_start_pose", 0, 0.9, 0.9, 0.3));
13971396
add(createPathMarkerArray(getFullPath(), "full_path", 0, 0.0, 0.5, 0.9));
13981397
add(createPathMarkerArray(status_.backward_path, "backward_driving_path", 0, 0.0, 0.9, 0.0));
13991398

@@ -1438,14 +1437,13 @@ void StartPlannerModule::setDebugData()
14381437
visualization_msgs::msg::Marker::TEXT_VIEW_FACING, createMarkerScale(0.3, 0.3, 0.3), purple);
14391438
footprint_marker.lifetime = rclcpp::Duration::from_seconds(1.5);
14401439
text_marker.lifetime = rclcpp::Duration::from_seconds(1.5);
1441-
for (size_t i = 0; i < start_planner_data_.start_pose_candidates.size(); ++i) {
1440+
for (size_t i = 0; i < debug_data_.start_pose_candidates.size(); ++i) {
14421441
footprint_marker.id = i;
14431442
text_marker.id = i;
14441443
footprint_marker.points.clear();
14451444
text_marker.text = "idx[" + std::to_string(i) + "]";
1446-
text_marker.pose = start_planner_data_.start_pose_candidates.at(i);
1447-
addFootprintMarker(
1448-
footprint_marker, start_planner_data_.start_pose_candidates.at(i), vehicle_info_);
1445+
text_marker.pose = debug_data_.start_pose_candidates.at(i);
1446+
addFootprintMarker(footprint_marker, debug_data_.start_pose_candidates.at(i), vehicle_info_);
14491447
start_pose_footprint_marker_array.markers.push_back(footprint_marker);
14501448
start_pose_text_marker_array.markers.push_back(text_marker);
14511449
}
@@ -1489,29 +1487,29 @@ void StartPlannerModule::setDebugData()
14891487

14901488
// safety check
14911489
if (parameters_->safety_check_params.enable_safety_check) {
1492-
if (start_planner_data_.ego_predicted_path.size() > 0) {
1490+
if (debug_data_.ego_predicted_path.size() > 0) {
14931491
const auto & ego_predicted_path = utils::path_safety_checker::convertToPredictedPath(
1494-
start_planner_data_.ego_predicted_path, ego_predicted_path_params_->time_resolution);
1492+
debug_data_.ego_predicted_path, ego_predicted_path_params_->time_resolution);
14951493
add(createPredictedPathMarkerArray(
14961494
ego_predicted_path, vehicle_info_, "ego_predicted_path_start_planner", 0, 0.0, 0.5, 0.9));
14971495
}
14981496

1499-
if (start_planner_data_.filtered_objects.objects.size() > 0) {
1497+
if (debug_data_.filtered_objects.objects.size() > 0) {
15001498
add(createObjectsMarkerArray(
1501-
start_planner_data_.filtered_objects, "filtered_objects", 0, 0.0, 0.5, 0.9));
1499+
debug_data_.filtered_objects, "filtered_objects", 0, 0.0, 0.5, 0.9));
15021500
}
15031501

1504-
add(showSafetyCheckInfo(start_planner_data_.collision_check, "object_debug_info"));
1505-
add(showPredictedPath(start_planner_data_.collision_check, "ego_predicted_path"));
1506-
add(showPolygon(start_planner_data_.collision_check, "ego_and_target_polygon_relation"));
1502+
add(showSafetyCheckInfo(debug_data_.collision_check, "object_debug_info"));
1503+
add(showPredictedPath(debug_data_.collision_check, "ego_predicted_path"));
1504+
add(showPolygon(debug_data_.collision_check, "ego_and_target_polygon_relation"));
15071505

15081506
// set objects of interest
1509-
for (const auto & [uuid, data] : start_planner_data_.collision_check) {
1507+
for (const auto & [uuid, data] : debug_data_.collision_check) {
15101508
const auto color = data.is_safe ? ColorName::GREEN : ColorName::RED;
15111509
setObjectsOfInterestData(data.current_obj_pose, data.obj_shape, color);
15121510
}
15131511

1514-
initializeCollisionCheckDebugMap(start_planner_data_.collision_check);
1512+
initializeCollisionCheckDebugMap(debug_data_.collision_check);
15151513
}
15161514

15171515
// Visualize planner type text

0 commit comments

Comments
 (0)