Apollo 10.0
自动驾驶开放平台
apollo::perception::trafficlight::TrafficLightDetectComponent类 参考

#include <traffic_light_detection_component.h>

类 apollo::perception::trafficlight::TrafficLightDetectComponent 继承关系图:
apollo::perception::trafficlight::TrafficLightDetectComponent 的协作图:

Public 成员函数

 TrafficLightDetectComponent ()=default
 Construct a new traffic light detect component object.
 
 ~TrafficLightDetectComponent ()=default
 Destroy the traffic light detect component object.
 
bool Init () override
 Initialize configuration files, algorithm plug-ins.
 
bool Proc (const std::shared_ptr< TrafficDetectMessage > &message) override
 Trigger the detection process based on the traffic detect message.
 
- Public 成员函数 继承自 apollo::cyber::Component< TrafficDetectMessage >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< TrafficDetectMessage > &msg0, const std::shared_ptr< NullType > &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< Node > node_ = nullptr
 
std::string config_file_path_ = ""
 
std::vector< std::shared_ptr< ReaderBase > > readers_
 

详细描述

在文件 traffic_light_detection_component.h 第 33 行定义.

构造及析构函数说明

◆ TrafficLightDetectComponent()

apollo::perception::trafficlight::TrafficLightDetectComponent::TrafficLightDetectComponent ( )
default

Construct a new traffic light detect component object.

◆ ~TrafficLightDetectComponent()

apollo::perception::trafficlight::TrafficLightDetectComponent::~TrafficLightDetectComponent ( )
default

Destroy the traffic light detect component object.

成员函数说明

◆ Init()

bool apollo::perception::trafficlight::TrafficLightDetectComponent::Init ( )
overridevirtual

Initialize configuration files, algorithm plug-ins.

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 traffic_light_detection_component.cc 第 29 行定义.

29 {
30 // init component config
31 if (InitConfig() != cyber::SUCC) {
32 AERROR << "TrafficLightDetectComponent InitConfig failed.";
33 return false;
34 }
35 // init algorithm plugin
36 if (InitAlgorithmPlugin() != cyber::SUCC) {
37 AERROR << "TrafficLightDetectComponent InitAlgorithmPlugin failed.";
38 return false;
39 }
40
41 return true;
42}
#define AERROR
Definition log.h:44

◆ Proc()

bool apollo::perception::trafficlight::TrafficLightDetectComponent::Proc ( const std::shared_ptr< TrafficDetectMessage > &  message)
override

Trigger the detection process based on the traffic detect message.

参数
message
返回
true
false

在文件 traffic_light_detection_component.cc 第 44 行定义.

45 {
47 auto time_imags = std::to_string(message->timestamp_);
48 AINFO << "Enter detection component, message timestamp: " << time_imags;
49
50 bool status = InternalProc(message);
51 if (status) {
52 writer_->Write(message);
53 AINFO << "Send trafficlight detect output message.";
54 }
55 return status;
56}
#define AINFO
Definition log.h:42
Definition future.h:29
#define PERF_FUNCTION(...)
Definition profiler.h:54

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