Apollo 10.0
自动驾驶开放平台
apollo::relative_map::RelativeMapComponent类 参考final

#include <relative_map_component.h>

类 apollo::relative_map::RelativeMapComponent 继承关系图:
apollo::relative_map::RelativeMapComponent 的协作图:

Public 成员函数

bool Init () override
 
bool Proc () override
 The Proc logic of the component, which called by the CyberRT frame.
 
- Public 成员函数 继承自 apollo::cyber::TimerComponent
 TimerComponent ()
 
 ~TimerComponent () override
 
bool Initialize (const TimerComponentConfig &config) override
 init the component by protobuf object.
 
void Clear () override
 
bool Process ()
 
uint32_t GetInterval () const
 
- Public 成员函数 继承自 apollo::cyber::ComponentBase
virtual ~ComponentBase ()
 
virtual bool Initialize (const ComponentConfig &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
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_
 

详细描述

在文件 relative_map_component.h30 行定义.

成员函数说明

◆ Init()

bool apollo::relative_map::RelativeMapComponent::Init ( )
overridevirtual

实现了 apollo::cyber::ComponentBase.

在文件 relative_map_component.cc28 行定义.

28 {
29 vehicle_state_provider_ = std::make_shared<common::VehicleStateProvider>();
30 InitReaders();
31 return relative_map_.Init(vehicle_state_provider_.get()).ok() &&
32 relative_map_.Start().ok();
33}
bool ok() const
check whether the return status is OK.
Definition status.h:67
apollo::common::Status Start()
module start function
apollo::common::Status Init(common::VehicleStateProvider *vehicle_state_provider)
module initialization function

◆ Proc()

bool apollo::relative_map::RelativeMapComponent::Proc ( )
overridevirtual

The Proc logic of the component, which called by the CyberRT frame.

返回
returns true if successful, otherwise returns false

实现了 apollo::cyber::TimerComponent.

在文件 relative_map_component.cc35 行定义.

35 {
36 auto map_msg = std::make_shared<MapMsg>();
37 if (!relative_map_.Process(map_msg.get())) {
38 return false;
39 }
40 common::util::FillHeader(node_->Name(), map_msg.get());
41 relative_map_writer_->Write(map_msg);
42 return true;
43}
std::shared_ptr< Node > node_
bool Process(MapMsg *const map_msg)
main logic of the relative_map module, runs periodically triggered by timer.

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