modules/planning/tasks/fallback_path/README_cn.md
FallbackPath用于stage中前置task未生成路径时,生成备用路径,该task只根据车道、车辆位姿生成路径,不考虑道路障碍物信息,障碍物信息在速度规划中处理。该task通过Frame获取自车位置,通过ReferenceLineInfo获取车道信息以及参考线信息,最后将计算路径输出到ReferenceLineInfo中。
函数通过对自车道、车辆位置分析,来决定车辆行驶的路径边界(candidate_path_boundaries)。
使用PathBoundsDeciderUtil::InitPathBoundary初始化路径边界。通过函数GetBoundaryFromSelfLane根据自车道信息更新路径边界,函数ExtendBoundaryByADC根据自车位置以及速度对路径边界进行拓展。
函数用于优化路径。它接收两个参数:candidate_path_boundaries(路径边界)和candidate_path_data(存储候选路径数据)。
函数计算了路径曲率约束(ddl_bounds)、曲率变化率(jerk_bound)和参考路径(ref_l和weight_ref_l)。
调用PathOptimizerUtil::OptimizePath来优化路径。若优化成功,将计算路径PathData对象添加到candidate_path_data中。
该函数用于评估生成路径是否可行。针对OptimizePath生成路径,会判断其是否为空、路径是否远离参考线、路径是否远离道路。
modules/planning/tasks/fallback_path/
├── BUILD
├── conf
│ └── default_conf.pb.txt
├── cyberfile.xml
├── fallback_path.cc
├── fallback_path.h
├── plugins.xml
├── proto
│ ├── BUILD
│ └── fallback_path.proto
└── README_cn.md
| 文件路径 | 类型/结构 | <div style="width: 300pt">说明</div> |
|---|---|---|
modules/planning/tasks/fallback_path/conf/default_conf.pb.txt | apollo::planning::FallbackPathConfig | FallbackPath 的配置文件 |
在 modules/planning/scenarios/xxxx/conf/pipeline.pb.txt 在期望增加FallbackPath插件的scenarios xxxx中增加相应的配置,配置参数中name 表示task的名称,这个由用户自定义,表达清楚是哪个task即可,type 是task的类名称,即FallbackPath。
task {
name: "FALLBACK_PATH"
type: "FallbackPath"
}
在modules/planning/tasks/fallback_path/conf/default_conf.pb.txt中,对FallbackPath插件的参数进行配置。
在modules/planning/planning_component/conf/planning.conf中,对作用在FallbackPath插件的gflag参数进行配置。
mainboard -d modules/planning/planning_component/dag/planning.dag