Apollo 10.0
自动驾驶开放平台
apollo::third_party_perception::ThirdPartyPerceptionMobileye类 参考

#include <third_party_perception_mobileye.h>

类 apollo::third_party_perception::ThirdPartyPerceptionMobileye 继承关系图:
apollo::third_party_perception::ThirdPartyPerceptionMobileye 的协作图:

Public 成员函数

 ThirdPartyPerceptionMobileye (apollo::cyber::Node *const node)
 
 ThirdPartyPerceptionMobileye ()=default
 
 ~ThirdPartyPerceptionMobileye ()=default
 
void OnMobileye (const apollo::drivers::Mobileye &message)
 
void OnContiRadar (const apollo::drivers::ContiRadar &message)
 
void OnDelphiESR (const apollo::drivers::DelphiESR &message)
 
bool Process (apollo::perception::PerceptionObstacles *const response) override
 
- Public 成员函数 继承自 apollo::third_party_perception::ThirdPartyPerception
 ThirdPartyPerception (apollo::cyber::Node *const node)
 
 ThirdPartyPerception ()=default
 
virtual ~ThirdPartyPerception ()=default
 
std::string Name () const
 
apollo::common::Status Init ()
 
apollo::common::Status Start ()
 
void Stop ()
 
void OnLocalization (const apollo::localization::LocalizationEstimate &message)
 
void OnChassis (const apollo::canbus::Chassis &message)
 

额外继承的成员函数

- Protected 属性 继承自 apollo::third_party_perception::ThirdPartyPerception
std::mutex third_party_perception_mutex_
 
apollo::localization::LocalizationEstimate localization_
 
apollo::canbus::Chassis chassis_
 
RadarObstacles current_radar_obstacles_
 
RadarObstacles last_radar_obstacles_
 
std::shared_ptr< apollo::cyber::Nodenode_ = nullptr
 
std::shared_ptr< apollo::cyber::Reader< apollo::localization::LocalizationEstimate > > localization_reader_ = nullptr
 
std::shared_ptr< apollo::cyber::Reader< apollo::canbus::Chassis > > chassis_reader_ = nullptr
 

详细描述

在文件 third_party_perception_mobileye.h37 行定义.

构造及析构函数说明

◆ ThirdPartyPerceptionMobileye() [1/2]

apollo::third_party_perception::ThirdPartyPerceptionMobileye::ThirdPartyPerceptionMobileye ( apollo::cyber::Node *const  node)
explicit

在文件 third_party_perception_mobileye.cc34 行定义.

36 : ThirdPartyPerception(node) {
37 mobileye_reader_ = node_->CreateReader<apollo::drivers::Mobileye>(
38 FLAGS_mobileye_topic,
39 [this](const std::shared_ptr<apollo::drivers::Mobileye>& message) {
40 OnMobileye(*message.get());
41 });
42 delphi_esr_reader_ = node_->CreateReader<apollo::drivers::DelphiESR>(
43 FLAGS_delphi_esr_topic,
44 [this](const std::shared_ptr<apollo::drivers::DelphiESR>& message) {
45 OnDelphiESR(*message.get());
46 });
47
48 conti_radar_reader_ = node_->CreateReader<apollo::drivers::ContiRadar>(
49 FLAGS_conti_radar_topic,
50 [this](const std::shared_ptr<apollo::drivers::ContiRadar>& message) {
51 OnContiRadar(*message.get());
52 });
53}

◆ ThirdPartyPerceptionMobileye() [2/2]

apollo::third_party_perception::ThirdPartyPerceptionMobileye::ThirdPartyPerceptionMobileye ( )
default

◆ ~ThirdPartyPerceptionMobileye()

apollo::third_party_perception::ThirdPartyPerceptionMobileye::~ThirdPartyPerceptionMobileye ( )
default

成员函数说明

◆ OnContiRadar()

void apollo::third_party_perception::ThirdPartyPerceptionMobileye::OnContiRadar ( const apollo::drivers::ContiRadar message)

在文件 third_party_perception_mobileye.cc76 行定义.

76 {
77 ADEBUG << "Received delphi esr data: run continental radar callback.";
78 std::lock_guard<std::mutex> lock(third_party_perception_mutex_);
82 RadarObstacles filtered_radar_obstacles =
84 if (FLAGS_enable_radar) {
86 filtered_radar_obstacles);
87 }
88}
apollo::localization::LocalizationEstimate localization_
#define ADEBUG
Definition log.h:41
PerceptionObstacles RadarObstaclesToPerceptionObstacles(const RadarObstacles &radar_obstacles)
RadarObstacles ContiToRadarObstacles(const apollo::drivers::ContiRadar &conti_radar, const apollo::localization::LocalizationEstimate &localization, const RadarObstacles &last_radar_obstacles, const Chassis &chassis)
RadarObstacles FilterRadarObstacles(const RadarObstacles &radar_obstacles)
Definition filter.cc:49

◆ OnDelphiESR()

void apollo::third_party_perception::ThirdPartyPerceptionMobileye::OnDelphiESR ( const apollo::drivers::DelphiESR message)

在文件 third_party_perception_mobileye.cc62 行定义.

62 {
63 ADEBUG << "Received delphi esr data: run delphi esr callback.";
64 std::lock_guard<std::mutex> lock(third_party_perception_mutex_);
68 RadarObstacles filtered_radar_obstacles =
70 if (FLAGS_enable_radar) {
72 filtered_radar_obstacles);
73 }
74}
RadarObstacles DelphiToRadarObstacles(const DelphiESR &delphi_esr, const LocalizationEstimate &localization, const RadarObstacles &last_radar_obstacles)

◆ OnMobileye()

void apollo::third_party_perception::ThirdPartyPerceptionMobileye::OnMobileye ( const apollo::drivers::Mobileye message)

在文件 third_party_perception_mobileye.cc55 行定义.

55 {
56 ADEBUG << "Received mobileye data: run mobileye callback.";
57 std::lock_guard<std::mutex> lock(third_party_perception_mutex_);
59 message, localization_, chassis_);
60}
PerceptionObstacles MobileyeToPerceptionObstacles(const Mobileye &mobileye, const LocalizationEstimate &localization, const Chassis &chassis)

◆ Process()

bool apollo::third_party_perception::ThirdPartyPerceptionMobileye::Process ( apollo::perception::PerceptionObstacles *const  response)
overridevirtual

重载 apollo::third_party_perception::ThirdPartyPerception .

在文件 third_party_perception_mobileye.cc90 行定义.

91 {
92 ADEBUG << "Timer is triggered: publish PerceptionObstacles";
93 CHECK_NOTNULL(response);
94
95 std::lock_guard<std::mutex> lock(third_party_perception_mutex_);
96
97 *response = fusion::EyeRadarFusion(eye_obstacles_, radar_obstacles_);
98
99 common::util::FillHeader(FLAGS_third_party_perception_node_name, response);
100
101 eye_obstacles_.Clear();
102 radar_obstacles_.Clear();
103 return true;
104}
PerceptionObstacles EyeRadarFusion(const PerceptionObstacles &eye_obstacles, const PerceptionObstacles &radar_obstacles)
Definition fusion.cc:67

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