Apollo动态障碍物绕行
附赠自动驾驶最全的学习资料和量产经验:链接
1、动态障碍物绕行分析:
2、PathLaneBorrowDecider分析
需要进入借道场景才可以触发绕行功能。
3、PathBoundsDecider分析:
可以看到经过PathBoundsDecider计算后,总共形成3个pathBoundary,分别是fallback、regular、right-forward
相关代码如下:
// Update the path boundary into the reference_line_info.
std::vector<std::pair<double, double>> regular_path_bound_pair;
for (size_t i = 0; i < regular_path_bound.size(); ++i) {
regular_path_bound_pair.emplace_back(std::get<1>(regular_path_bound[i]),
std::get<2>(regular_path_bound[i]));
}
candidate_path_boundaries.emplace_back(std::get<0>(regular_path_bound[0]),
kPathBoundsDeciderResolution,
regular_path_bound_pair);
std::string path_label = "";
switch (lane_borrow_info) {
case LaneBorrowInfo::LEFT_BORROW:
path_label = "left";
break;
case LaneBorrowInfo::RIGHT_BORROW:
path_label = "right";
break;
default:
path_label = "self";
// exist_self_path_bound = true;
// regular_self_path_bound = regular_path_bound;
break;
}
// RecordDebugInfo(regular_path_bound, "", reference_line_info);
candidate_path_boundaries.back().set_label(
absl::StrCat("regular/", path_label, "/", borrow_lane_type));
candidate_path_boundaries.back().set_blocking_obstacle_id(
blocking_obstacle_id);
}
4、PathAssessmentDecider分析
PathAssessmentDecider中进行路径选择,排序前:
排序后:
5、最终选择的路径
可以看到,最终选择的路径是向右借道的路径。
路径如下:
6、最终结果如下:
标签:std,障碍物,bound,label,绕行,regular,back,path,Apollo From: https://blog.csdn.net/adas_l5/article/details/139869246