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

#include <radar_track.h>

apollo::perception::radar::RadarTrack 的协作图:

Public 成员函数

 RadarTrack (const base::ObjectPtr &obs, const double timestamp)
 Construct a new Radar Track object
 
 ~RadarTrack ()
 
void UpdataObsRadar (const base::ObjectPtr &obs_radar, const double timestamp)
 update the object after association with a radar obervation
 
void SetObsRadarNullptr ()
 Set the Obs Radar Nullptr object
 
int GetObsId () const
 Get the Obs Id object
 
base::ObjectPtr GetObsRadar ()
 Get the Obs Radar object
 
base::ObjectPtr GetObs ()
 Get the Obs object
 
double GetTimestamp ()
 Get the Timestamp object
 
double GetTrackingTime ()
 Get the Tracking Time object
 
bool IsDead ()
 Track state is dead or not
 
void SetDead ()
 Set the Dead object
 
bool ConfirmTrack ()
 If the target tracking time is greater than the set threshold, which means that the target has been tracked.
 

静态 Public 成员函数

static void SetTrackedTimesThreshold (const int &threshold)
 Set the Tracked Times Threshold object
 
static void SetChosenFilter (const std::string &chosen_filter)
 Set the Chosen Filter object
 
static void SetUseFilter (bool use_filter)
 Set the Use Filter object
 

详细描述

在文件 radar_track.h 第 31 行定义.

构造及析构函数说明

◆ RadarTrack()

apollo::perception::radar::RadarTrack::RadarTrack ( const base::ObjectPtr &  obs,
const double  timestamp 
)

Construct a new Radar Track object

参数
obs
timestamp

在文件 radar_track.cc 第 31 行定义.

31 {
32 s_current_idx_ %= MAX_RADAR_IDX;
33 obs_id_ = s_current_idx_++;
34 obs_radar_ = base::ObjectPool::Instance().Get();
35 *obs_radar_ = *obs;
36 obs_ = base::ObjectPool::Instance().Get();
37 *obs_ = *obs;
38 timestamp_ = timestamp;
39 tracked_times_ = 1;
40 tracking_time_ = 0.0;
41 is_dead_ = false;
42
43 // Or use register class instead.
44 filter_.reset(new AdaptiveKalmanFilter);
45 filter_->Init(*obs);
46}
const int MAX_RADAR_IDX
Definition types.h:23

◆ ~RadarTrack()

apollo::perception::radar::RadarTrack::~RadarTrack ( )
inline

在文件 radar_track.h 第 40 行定义.

40{}

成员函数说明

◆ ConfirmTrack()

bool apollo::perception::radar::RadarTrack::ConfirmTrack ( )
inline

If the target tracking time is greater than the set threshold, which means that the target has been tracked.

返回
true
false

在文件 radar_track.h 第 112 行定义.

112{ return tracked_times_ > s_tracked_times_threshold_; }

◆ GetObs()

base::ObjectPtr apollo::perception::radar::RadarTrack::GetObs ( )

Get the Obs object

返回
base::ObjectPtr

在文件 radar_track.cc 第 78 行定义.

78{ return obs_; }

◆ GetObsId()

int apollo::perception::radar::RadarTrack::GetObsId ( ) const

Get the Obs Id object

返回
int

在文件 radar_track.cc 第 80 行定义.

80{ return obs_id_; }

◆ GetObsRadar()

base::ObjectPtr apollo::perception::radar::RadarTrack::GetObsRadar ( )

Get the Obs Radar object

返回
base::ObjectPtr

在文件 radar_track.cc 第 76 行定义.

76{ return obs_radar_; }

◆ GetTimestamp()

double apollo::perception::radar::RadarTrack::GetTimestamp ( )

Get the Timestamp object

返回
double

在文件 radar_track.cc 第 82 行定义.

82{ return timestamp_; }

◆ GetTrackingTime()

double apollo::perception::radar::RadarTrack::GetTrackingTime ( )

Get the Tracking Time object

返回
double

在文件 radar_track.cc 第 84 行定义.

84{ return tracking_time_; }

◆ IsDead()

bool apollo::perception::radar::RadarTrack::IsDead ( )
inline

Track state is dead or not

返回
true
false

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

97{ return is_dead_; }

◆ SetChosenFilter()

static void apollo::perception::radar::RadarTrack::SetChosenFilter ( const std::string &  chosen_filter)
inlinestatic

Set the Chosen Filter object

参数
chosen_filter

在文件 radar_track.h 第 128 行定义.

128 {
129 s_chosen_filter_ = chosen_filter;
130 }

◆ SetDead()

void apollo::perception::radar::RadarTrack::SetDead ( )
inline

Set the Dead object

在文件 radar_track.h 第 103 行定义.

103{ is_dead_ = true; }

◆ SetObsRadarNullptr()

void apollo::perception::radar::RadarTrack::SetObsRadarNullptr ( )

Set the Obs Radar Nullptr object

在文件 radar_track.cc 第 71 行定义.

71 {
72 obs_radar_ = nullptr;
73 obs_ = nullptr;
74}

◆ SetTrackedTimesThreshold()

static void apollo::perception::radar::RadarTrack::SetTrackedTimesThreshold ( const int &  threshold)
inlinestatic

Set the Tracked Times Threshold object

参数
threshold

在文件 radar_track.h 第 119 行定义.

119 {
120 s_tracked_times_threshold_ = threshold;
121 }
Image< uchar > * threshold(Image< T > *src, int t)
Threshold image
Definition imutil.h:79

◆ SetUseFilter()

static void apollo::perception::radar::RadarTrack::SetUseFilter ( bool  use_filter)
inlinestatic

Set the Use Filter object

参数
use_filter

在文件 radar_track.h 第 137 行定义.

137{ s_use_filter_ = use_filter; }

◆ UpdataObsRadar()

void apollo::perception::radar::RadarTrack::UpdataObsRadar ( const base::ObjectPtr &  obs_radar,
const double  timestamp 
)

update the object after association with a radar obervation

参数
obs_radar
timestamp

在文件 radar_track.cc 第 48 行定义.

49 {
50 *obs_radar_ = *obs_radar;
51 *obs_ = *obs_radar;
52 double time_diff = timestamp - timestamp_;
53 if (s_use_filter_) {
54 Eigen::VectorXd state;
55 state = filter_->UpdateWithObject(*obs_radar_, time_diff);
56 obs_->center(0) = static_cast<float>(state(0));
57 obs_->center(1) = static_cast<float>(state(1));
58 obs_->velocity(0) = static_cast<float>(state(2));
59 obs_->velocity(1) = static_cast<float>(state(3));
60 Eigen::Matrix4d covariance_matrix = filter_->GetCovarianceMatrix();
61 obs_->center_uncertainty(0) = static_cast<float>(covariance_matrix(0, 0));
62 obs_->center_uncertainty(1) = static_cast<float>(covariance_matrix(1, 1));
63 obs_->velocity_uncertainty(0) = static_cast<float>(covariance_matrix(2, 2));
64 obs_->velocity_uncertainty(1) = static_cast<float>(covariance_matrix(3, 3));
65 }
66 tracking_time_ += time_diff;
67 timestamp_ = timestamp;
68 ++tracked_times_;
69}

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