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

#include <hm_matcher.h>

类 apollo::perception::camera::HMMatcher 继承关系图:
apollo::perception::camera::HMMatcher 的协作图:

Public 成员函数

 HMMatcher ()=default
 
virtual ~HMMatcher ()=default
 
bool Init (const MatcherInitOptions &options) override
 Init HMMatcher config
 
bool Match (const std::vector< CameraTrackPtr > &camera_tracks, const base::Frame &camera_frame, const TrackObjectMatcherOptions &options, std::vector< TrackObjectPair > *assignments, std::vector< size_t > *unassigned_tracks, std::vector< size_t > *unassigned_objects) override
 match camera objects to tracks
 
std::string Name () const override
 The name of the HMMatcher
 
- Public 成员函数 继承自 apollo::perception::camera::BaseMatcher
 BaseMatcher ()=default
 Construct a new Base Matcher object
 
virtual ~BaseMatcher ()=default
 

Protected 成员函数

bool RefinedTrack (const base::ObjectPtr &track_object, double track_timestamp, const base::ObjectPtr &camera_object, double camera_timestamp) override
 After the IDMatch, then track targets based on their features.
 
- Protected 成员函数 继承自 apollo::perception::camera::BaseMatcher
 FRIEND_TEST (BaseMatcherTest, base_matcher_test)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::perception::camera::BaseMatcher
static void SetMaxMatchDistance (double dist)
 Set the Max Match Distance
 
static double GetMaxMatchDistance ()
 Get the Max Match Distance
 
static void SetBoundMatchDistance (double dist)
 Set the Bound Match Distance
 
static double GetBoundMatchDistance ()
 Get the Bound Match Distance
 
- 静态 Protected 属性 继承自 apollo::perception::camera::BaseMatcher
static double s_max_match_distance_ = 2.5
 
static double s_bound_match_distance_ = 10.0
 

详细描述

在文件 hm_matcher.h30 行定义.

构造及析构函数说明

◆ HMMatcher()

apollo::perception::camera::HMMatcher::HMMatcher ( )
default

◆ ~HMMatcher()

virtual apollo::perception::camera::HMMatcher::~HMMatcher ( )
virtualdefault

成员函数说明

◆ Init()

bool apollo::perception::camera::HMMatcher::Init ( const MatcherInitOptions options)
overridevirtual

Init HMMatcher config

参数
optionsinit options
返回
true
false

重载 apollo::perception::camera::BaseMatcher .

在文件 hm_matcher.cc33 行定义.

33 {
34 std::string config_file =
35 GetConfigFile(options.config_path, options.config_file);
36 MatcherConfig config_params;
37 ACHECK(cyber::common::GetProtoFromFile(config_file, &config_params))
38 << "Failed to parse MatcherConfig config file.";
39 double max_match_distance = config_params.max_match_distance();
40 double bound_match_distance = config_params.bound_match_distance();
41 BaseMatcher::SetMaxMatchDistance(max_match_distance);
42 BaseMatcher::SetBoundMatchDistance(bound_match_distance);
43 return true;
44}
static void SetBoundMatchDistance(double dist)
Set the Bound Match Distance
static void SetMaxMatchDistance(double dist)
Set the Max Match Distance
#define ACHECK(cond)
Definition log.h:80
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

◆ Match()

bool apollo::perception::camera::HMMatcher::Match ( const std::vector< CameraTrackPtr > &  camera_tracks,
const base::Frame camera_frame,
const TrackObjectMatcherOptions options,
std::vector< TrackObjectPair > *  assignments,
std::vector< size_t > *  unassigned_tracks,
std::vector< size_t > *  unassigned_objects 
)
overridevirtual

match camera objects to tracks

参数
camera_tracksglobal tracks
camera_framecurrent camera frame
optionsmatcher options for future use
assignmentsmatched pair of tracks and measurements
unassigned_tracksunmatched tracks
unassigned_objectsunmatched objects
返回
true
false

重载 apollo::perception::camera::BaseMatcher .

在文件 hm_matcher.cc54 行定义.

59 {
60 TrackObjectPropertyMatch(camera_tracks, camera_frame, assignments,
61 unassigned_tracks, unassigned_objects);
62 return true;
63}

◆ Name()

std::string apollo::perception::camera::HMMatcher::Name ( ) const
inlineoverridevirtual

The name of the HMMatcher

返回
std::string

重载 apollo::perception::camera::BaseMatcher .

在文件 hm_matcher.h68 行定义.

68{ return "HMMatcher"; }

◆ RefinedTrack()

bool apollo::perception::camera::HMMatcher::RefinedTrack ( const base::ObjectPtr track_object,
double  track_timestamp,
const base::ObjectPtr camera_object,
double  camera_timestamp 
)
overrideprotectedvirtual

After the IDMatch, then track targets based on their features.

参数
track_objecttracked targets
track_timestamptarget tracked timestamp
camera_objectcamera detection objects
camera_timestampcamera detection timestamp
返回
true
false

重载 apollo::perception::camera::BaseMatcher .

在文件 hm_matcher.cc65 行定义.

68 {
69 double dist = 0.5 * DistanceBetweenObs(track_object, track_timestamp,
70 camera_object, camera_timestamp) +
71 0.5 * DistanceBetweenObs(camera_object, camera_timestamp,
72 track_object, track_timestamp);
73
75}
static double GetMaxMatchDistance()
Get the Max Match Distance

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