Apollo 10.0
自动驾驶开放平台
apollo::prediction::EvaluatorSubmodule类 参考

#include <evaluator_submodule.h>

类 apollo::prediction::EvaluatorSubmodule 继承关系图:
apollo::prediction::EvaluatorSubmodule 的协作图:

Public 成员函数

 ~EvaluatorSubmodule ()
 Destructor
 
std::string Name () const
 Get name of the node
 
bool Init () override
 Initialize the node
 
bool Proc (const std::shared_ptr< ADCTrajectoryContainer > &adc_trajectory_container, const std::shared_ptr< SubmoduleOutput > &) override
 Data callback upon receiving a prediction container output.
 
- Public 成员函数 继承自 apollo::cyber::Component< ADCTrajectoryContainer, SubmoduleOutput >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< ADCTrajectoryContainer > &msg0, const std::shared_ptr< SubmoduleOutput > &msg1, const std::shared_ptr< NullType > &msg2, const std::shared_ptr< NullType > &msg3)
 
- Public 成员函数 继承自 apollo::cyber::ComponentBase
virtual ~ComponentBase ()
 
virtual bool Initialize (const TimerComponentConfig &config)
 
virtual void Shutdown ()
 
template<typename T >
bool GetProtoConfig (T *config) const
 

额外继承的成员函数

- Public 类型 继承自 apollo::cyber::ComponentBase
template<typename M >
using Reader = cyber::Reader< M >
 
- Protected 成员函数 继承自 apollo::cyber::ComponentBase
virtual void Clear ()
 
const std::string & ConfigFilePath () const
 
void LoadConfigFiles (const ComponentConfig &config)
 
void LoadConfigFiles (const TimerComponentConfig &config)
 
- Protected 属性 继承自 apollo::cyber::ComponentBase
std::atomic< bool > is_shutdown_ = {false}
 
std::shared_ptr< Nodenode_ = nullptr
 
std::string config_file_path_ = ""
 
std::vector< std::shared_ptr< ReaderBase > > readers_
 

详细描述

在文件 evaluator_submodule.h36 行定义.

构造及析构函数说明

◆ ~EvaluatorSubmodule()

apollo::prediction::EvaluatorSubmodule::~EvaluatorSubmodule ( )

Destructor

在文件 evaluator_submodule.cc28 行定义.

28{}

成员函数说明

◆ Init()

bool apollo::prediction::EvaluatorSubmodule::Init ( )
overridevirtual

Initialize the node

返回
If initialized

实现了 apollo::cyber::ComponentBase.

在文件 evaluator_submodule.cc34 行定义.

34 {
35 evaluator_manager_.reset(new EvaluatorManager());
36 PredictionConf prediction_conf;
37 if (!ComponentBase::GetProtoConfig(&prediction_conf)) {
38 AERROR << "Unable to load prediction conf file: "
39 << ComponentBase::ConfigFilePath();
40 return false;
41 }
42 ADEBUG << "Prediction config file is loaded into: "
43 << prediction_conf.ShortDebugString();
44 if (!MessageProcess::InitEvaluators(evaluator_manager_.get(),
45 prediction_conf)) {
46 return false;
47 }
48 // TODO(kechxu) change topic name when finalized
49 evaluator_writer_ = node_->CreateWriter<SubmoduleOutput>(
50 prediction_conf.topic_conf().evaluator_topic_name());
51 return true;
52}
std::shared_ptr< Node > node_
static bool InitEvaluators(EvaluatorManager *evaluator_manager, const PredictionConf &prediction_conf)
#define ADEBUG
Definition log.h:41
#define AERROR
Definition log.h:44

◆ Name()

std::string apollo::prediction::EvaluatorSubmodule::Name ( ) const

Get name of the node

返回
Name of the node

在文件 evaluator_submodule.cc30 行定义.

30 {
31 return FLAGS_evaluator_submodule_name;
32}

◆ Proc()

bool apollo::prediction::EvaluatorSubmodule::Proc ( const std::shared_ptr< ADCTrajectoryContainer > &  adc_trajectory_container,
const std::shared_ptr< SubmoduleOutput > &  container_output 
)
override

Data callback upon receiving a prediction container output.

参数
Predictioncontainer output.

在文件 evaluator_submodule.cc54 行定义.

56 {
57 constexpr static size_t kHistorySize = 1;
58 const auto frame_start_time = container_output->frame_start_time();
59 ObstaclesContainer obstacles_container(*container_output);
60 evaluator_manager_->Run(adc_trajectory_container.get(),
61 &obstacles_container);
62 SubmoduleOutput submodule_output =
63 obstacles_container.GetSubmoduleOutput(kHistorySize, frame_start_time);
64 evaluator_writer_->Write(submodule_output);
65 return true;
66}

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