Apollo 11.0
自动驾驶开放平台
apollo::prediction::ScenarioAnalyzer类 参考

#include <scenario_analyzer.h>

apollo::prediction::ScenarioAnalyzer 的协作图:

Public 成员函数

 ScenarioAnalyzer ()=delete
 

静态 Public 成员函数

static std::shared_ptr< ScenarioFeaturesAnalyze (const EnvironmentFeatures &environment_features)
 

详细描述

在文件 scenario_analyzer.h27 行定义.

构造及析构函数说明

◆ ScenarioAnalyzer()

apollo::prediction::ScenarioAnalyzer::ScenarioAnalyzer ( )
delete

成员函数说明

◆ Analyze()

std::shared_ptr< ScenarioFeatures > apollo::prediction::ScenarioAnalyzer::Analyze ( const EnvironmentFeatures environment_features)
static

在文件 scenario_analyzer.cc26 行定义.

27 {
28 Scenario::Type scenario_type = Scenario::UNKNOWN;
29
30 if (environment_features.has_front_junction() &&
31 environment_features.GetFrontJunction().second <
32 FLAGS_junction_distance_threshold) {
33 scenario_type = Scenario::JUNCTION;
34 } else if (environment_features.has_ego_lane()) {
35 scenario_type = Scenario::CRUISE;
36 }
37
38 if (scenario_type == Scenario::CRUISE) {
39 auto cruise_scenario_features = std::make_shared<CruiseScenarioFeatures>();
40 cruise_scenario_features->BuildCruiseScenarioFeatures(environment_features);
41 return cruise_scenario_features;
42 }
43
44 if (scenario_type == Scenario::JUNCTION) {
45 auto junction_scenario_features =
46 std::make_shared<JunctionScenarioFeatures>();
47 // TODO(all) refactor this part
48 junction_scenario_features->BuildJunctionScenarioFeatures(
49 environment_features);
50 return junction_scenario_features;
51 }
52
53 return std::make_shared<ScenarioFeatures>();
54}

该类的文档由以下文件生成: