Apollo 11.0
自动驾驶开放平台
apollo::perception::fusion::PbfTracker类 参考

#include <pbf_tracker.h>

类 apollo::perception::fusion::PbfTracker 继承关系图:
apollo::perception::fusion::PbfTracker 的协作图:

Public 成员函数

 PbfTracker ()=default
 
virtual ~PbfTracker ()=default
 
bool Init (TrackPtr track, SensorObjectPtr measurement) override
 Init
 
void UpdateWithMeasurement (const TrackerOptions &options, const SensorObjectPtr measurement, double target_timestamp) override
 Update with measurement
 
void UpdateWithoutMeasurement (const TrackerOptions &options, const std::string &sensor_id, double measurement_timestamp, double target_timestamp) override
 Update without measurement
 
std::string Name () const override
 The name of BaseTracker
 
- Public 成员函数 继承自 apollo::perception::fusion::BaseTracker
 BaseTracker ()=default
 
virtual ~BaseTracker ()=default
 

静态 Public 成员函数

static bool InitParams (const TrackerInitOptions &options)
 Init params
 

Protected 成员函数

bool InitMethods ()
 Init fusion methods
 
 DISALLOW_COPY_AND_ASSIGN (PbfTracker)
 
- Protected 成员函数 继承自 apollo::perception::fusion::BaseTracker
 DISALLOW_COPY_AND_ASSIGN (BaseTracker)
 

Protected 属性

std::unique_ptr< BaseTypeFusion > type_fusion_ = nullptr
 
std::unique_ptr< BaseMotionFusion > motion_fusion_ = nullptr
 
std::unique_ptr< BaseExistenceFusion > existence_fusion_ = nullptr
 
std::unique_ptr< BaseShapeFusion > shape_fusion_ = nullptr
 
- Protected 属性 继承自 apollo::perception::fusion::BaseTracker
TrackPtr track_ = nullptr
 

静态 Protected 属性

static std::string s_type_fusion_method_ = "DstTypeFusion"
 
static std::string s_motion_fusion_method_
 
static std::string s_shape_fusion_method_ = "PbfShapeFusion"
 
static std::string s_existence_fusion_method_
 

详细描述

在文件 pbf_tracker.h 第 34 行定义.

构造及析构函数说明

◆ PbfTracker()

apollo::perception::fusion::PbfTracker::PbfTracker ( )
default

◆ ~PbfTracker()

virtual apollo::perception::fusion::PbfTracker::~PbfTracker ( )
virtualdefault

成员函数说明

◆ DISALLOW_COPY_AND_ASSIGN()

apollo::perception::fusion::PbfTracker::DISALLOW_COPY_AND_ASSIGN ( PbfTracker  )
protected

◆ Init()

bool apollo::perception::fusion::PbfTracker::Init ( TrackPtr  track,
SensorObjectPtr  measurement 
)
overridevirtual

Init

参数
track
measurement
返回
true
false

实现了 apollo::perception::fusion::BaseTracker.

在文件 pbf_tracker.cc 第 107 行定义.

107 {
108 track_ = track;
109 if (!InitMethods()) {
110 return false;
111 }
112 motion_fusion_->Init();
113 return true;
114}
std::unique_ptr< BaseMotionFusion > motion_fusion_
bool InitMethods()
Init fusion methods

◆ InitMethods()

bool apollo::perception::fusion::PbfTracker::InitMethods ( )
protected

Init fusion methods

返回
true
false

在文件 pbf_tracker.cc 第 75 行定义.

75 {
76 if (s_type_fusion_method_ == "DstTypeFusion") {
77 type_fusion_.reset(new DstTypeFusion(track_));
78 } else {
79 AERROR << "Unknown type fusion : " << s_type_fusion_method_;
80 return false;
81 }
82
83 if (s_motion_fusion_method_ == "KalmanMotionFusion") {
84 motion_fusion_.reset(new KalmanMotionFusion(track_));
85 } else {
86 AERROR << "Unknown motion fusion : " << s_motion_fusion_method_;
87 return false;
88 }
89
90 if (s_existence_fusion_method_ == "DstExistenceFusion") {
91 existence_fusion_.reset(new DstExistenceFusion(track_));
92 } else {
93 AERROR << "Unknown existence fusion : " << s_existence_fusion_method_;
94 return false;
95 }
96
97 if (s_shape_fusion_method_ == "PbfShapeFusion") {
98 shape_fusion_.reset(new PbfShapeFusion(track_));
99 } else {
100 AERROR << "Unknown shape fusion : " << s_shape_fusion_method_;
101 return false;
102 }
103
104 return true;
105}
std::unique_ptr< BaseTypeFusion > type_fusion_
Definition pbf_tracker.h:99
static std::string s_existence_fusion_method_
Definition pbf_tracker.h:97
static std::string s_shape_fusion_method_
Definition pbf_tracker.h:96
std::unique_ptr< BaseExistenceFusion > existence_fusion_
static std::string s_motion_fusion_method_
Definition pbf_tracker.h:95
std::unique_ptr< BaseShapeFusion > shape_fusion_
#define AERROR
Definition log.h:44

◆ InitParams()

bool apollo::perception::fusion::PbfTracker::InitParams ( const TrackerInitOptions &  options)
static

Init params

参数
options
返回
true
false

在文件 pbf_tracker.cc 第 41 行定义.

41 {
42 std::string config_file =
43 GetConfigFile(options.config_path, options.config_file);
44
45 PbfTrackerConfig params;
46 if (!cyber::common::GetProtoFromFile(config_file, &params)) {
47 AERROR << "Read config failed: " << config_file;
48 return false;
49 }
50
51 AINFO << "Load PbfTrackerConfig: " << params.DebugString();
52
53 s_type_fusion_method_ = params.type_fusion_param().name();
54 s_motion_fusion_method_ = params.motion_fusion_param().name();
55 s_shape_fusion_method_ = params.shape_fusion_param().name();
56 s_existence_fusion_method_ = params.existence_fusion_param().name();
57
58 TypeFusionInitOptions type_fusion_init_options;
59 auto type_fusion_param = params.type_fusion_param();
60 type_fusion_init_options.config_path = type_fusion_param.config_path();
61 type_fusion_init_options.config_file = type_fusion_param.config_file();
62 DstTypeFusion::Init(type_fusion_init_options);
63
64 ExistenceFusionInitOptions existence_fusion_init_options;
65 auto existence_fusion_param = params.existence_fusion_param();
66 existence_fusion_init_options.config_path =
67 existence_fusion_param.config_path();
68 existence_fusion_init_options.config_file =
69 existence_fusion_param.config_file();
70 DstExistenceFusion::Init(existence_fusion_init_options);
71
72 return true;
73}
static bool Init(const ExistenceFusionInitOptions &options)
add dst application
static bool Init(const TypeFusionInitOptions &options)
#define AINFO
Definition log.h:42
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
Definition file.cc:132
std::string GetConfigFile(const std::string &config_path, const std::string &config_file)
Definition util.cc:80

◆ Name()

std::string apollo::perception::fusion::PbfTracker::Name ( ) const
inlineoverridevirtual

The name of BaseTracker

返回
std::string

实现了 apollo::perception::fusion::BaseTracker.

在文件 pbf_tracker.h 第 82 行定义.

82{ return "PbfTracker"; }

◆ UpdateWithMeasurement()

void apollo::perception::fusion::PbfTracker::UpdateWithMeasurement ( const TrackerOptions &  options,
const SensorObjectPtr  measurement,
double  target_timestamp 
)
overridevirtual

Update with measurement

参数
options
measurement
target_timestamp

实现了 apollo::perception::fusion::BaseTracker.

在文件 pbf_tracker.cc 第 116 行定义.

118 {
119 std::string sensor_id = measurement->GetSensorId();
120 ADEBUG << "fusion_updating..." << track_->GetTrackId() << " with "
121 << sensor_id << "..." << measurement->GetBaseObject()->track_id << "@"
122 << FORMAT_TIMESTAMP(measurement->GetTimestamp());
123 existence_fusion_->UpdateWithMeasurement(measurement, target_timestamp,
124 options.match_distance);
125 motion_fusion_->UpdateWithMeasurement(measurement, target_timestamp);
126 shape_fusion_->UpdateWithMeasurement(measurement, target_timestamp);
127 type_fusion_->UpdateWithMeasurement(measurement, target_timestamp);
128 track_->UpdateWithSensorObject(measurement);
129}
#define ADEBUG
Definition log.h:41
#define FORMAT_TIMESTAMP(timestamp)
Definition string_util.h:29

◆ UpdateWithoutMeasurement()

void apollo::perception::fusion::PbfTracker::UpdateWithoutMeasurement ( const TrackerOptions &  options,
const std::string &  sensor_id,
double  measurement_timestamp,
double  target_timestamp 
)
overridevirtual

Update without measurement

参数
options
sensor_id
measurement_timestamp
target_timestamp

实现了 apollo::perception::fusion::BaseTracker.

在文件 pbf_tracker.cc 第 131 行定义.

134 {
135 existence_fusion_->UpdateWithoutMeasurement(sensor_id, measurement_timestamp,
136 target_timestamp,
137 options.match_distance);
138 motion_fusion_->UpdateWithoutMeasurement(sensor_id, measurement_timestamp,
139 target_timestamp);
140 shape_fusion_->UpdateWithoutMeasurement(sensor_id, measurement_timestamp,
141 target_timestamp);
142 type_fusion_->UpdateWithoutMeasurement(sensor_id, measurement_timestamp,
143 target_timestamp,
144 options.match_distance);
145 track_->UpdateWithoutSensorObject(sensor_id, measurement_timestamp);
146}

类成员变量说明

◆ existence_fusion_

std::unique_ptr<BaseExistenceFusion> apollo::perception::fusion::PbfTracker::existence_fusion_ = nullptr
protected

在文件 pbf_tracker.h 第 101 行定义.

◆ motion_fusion_

std::unique_ptr<BaseMotionFusion> apollo::perception::fusion::PbfTracker::motion_fusion_ = nullptr
protected

在文件 pbf_tracker.h 第 100 行定义.

◆ s_existence_fusion_method_

std::string apollo::perception::fusion::PbfTracker::s_existence_fusion_method_
staticprotected
初始值:
=
"DstExistenceFusion"

在文件 pbf_tracker.h 第 97 行定义.

◆ s_motion_fusion_method_

std::string apollo::perception::fusion::PbfTracker::s_motion_fusion_method_
staticprotected
初始值:
=
"KalmanMotionFusion"

在文件 pbf_tracker.h 第 95 行定义.

◆ s_shape_fusion_method_

std::string apollo::perception::fusion::PbfTracker::s_shape_fusion_method_ = "PbfShapeFusion"
staticprotected

在文件 pbf_tracker.h 第 96 行定义.

◆ s_type_fusion_method_

std::string apollo::perception::fusion::PbfTracker::s_type_fusion_method_ = "DstTypeFusion"
staticprotected

在文件 pbf_tracker.h 第 94 行定义.

◆ shape_fusion_

std::unique_ptr<BaseShapeFusion> apollo::perception::fusion::PbfTracker::shape_fusion_ = nullptr
protected

在文件 pbf_tracker.h 第 102 行定义.

◆ type_fusion_

std::unique_ptr<BaseTypeFusion> apollo::perception::fusion::PbfTracker::type_fusion_ = nullptr
protected

在文件 pbf_tracker.h 第 99 行定义.


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