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

#include <mrf_shape_filter.h>

类 apollo::perception::radar4d::MrfShapeFilter 继承关系图:
apollo::perception::radar4d::MrfShapeFilter 的协作图:

Public 成员函数

 MrfShapeFilter ()=default
 
virtual ~MrfShapeFilter ()=default
 
bool Init (const MrfFilterInitOptions &options=MrfFilterInitOptions()) override
 Init mrf filter
 
void UpdateWithObject (const MrfFilterOptions &options, const MrfTrackDataConstPtr &track_data, TrackedObjectPtr new_object) override
 Updating shape filter with object
 
void UpdateWithoutObject (const MrfFilterOptions &options, double timestamp, MrfTrackDataPtr track_data) override
 Updating shape filter without object
 
std::string Name () const override
 Get class name
 
- Public 成员函数 继承自 apollo::perception::radar4d::MrfBaseFilter
 MrfBaseFilter ()=default
 
virtual ~MrfBaseFilter ()=default
 

Protected 属性

algorithm::ConvexHull2D< base::RadarPointDCloud, base::PolygonDTypehull_
 
double bottom_points_ignore_threshold_ = 0.1
 
double top_points_ignore_threshold_ = 1.6
 

详细描述

在文件 mrf_shape_filter.h27 行定义.

构造及析构函数说明

◆ MrfShapeFilter()

apollo::perception::radar4d::MrfShapeFilter::MrfShapeFilter ( )
default

◆ ~MrfShapeFilter()

virtual apollo::perception::radar4d::MrfShapeFilter::~MrfShapeFilter ( )
virtualdefault

成员函数说明

◆ Init()

bool apollo::perception::radar4d::MrfShapeFilter::Init ( const MrfFilterInitOptions options = MrfFilterInitOptions())
overridevirtual

Init mrf filter

参数
options
返回
true
false

实现了 apollo::perception::radar4d::MrfBaseFilter.

在文件 mrf_shape_filter.cc28 行定义.

28 {
29 std::string config_file = "mrf_shape_filter.pb.txt";
30 if (!options.config_file.empty()) {
31 config_file = options.config_file;
32 }
33 config_file = GetConfigFile(options.config_path, config_file);
34 MrfShapeFilterConfig config;
35 ACHECK(cyber::common::GetProtoFromFile(config_file, &config));
36
37 bottom_points_ignore_threshold_ = config.bottom_points_ignore_threshold();
38 top_points_ignore_threshold_ = config.top_points_ignore_threshold();
39 return true;
40}
#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

◆ Name()

std::string apollo::perception::radar4d::MrfShapeFilter::Name ( ) const
inlineoverridevirtual

Get class name

返回
std::string

实现了 apollo::perception::radar4d::MrfBaseFilter.

在文件 mrf_shape_filter.h64 行定义.

64{ return "MrfShapeFilter"; }

◆ UpdateWithObject()

void apollo::perception::radar4d::MrfShapeFilter::UpdateWithObject ( const MrfFilterOptions options,
const MrfTrackDataConstPtr track_data,
TrackedObjectPtr  new_object 
)
overridevirtual

Updating shape filter with object

参数
optionsfor updating
track_datanot include new object
new_objectnew object for updating

实现了 apollo::perception::radar4d::MrfBaseFilter.

在文件 mrf_shape_filter.cc42 行定义.

44 {
45 // compute tight object polygon
46 auto& obj = new_object->object_ptr;
47 hull_.GetConvexHull(obj->radar4d_supplement.cloud_world, &obj->polygon);
48
49 // simple moving average orientation filtering
50 if (track_data->age_ > 0) {
51 TrackedObjectConstPtr latest_object = track_data->GetLatestObject().second;
52 if (new_object->direction.dot(latest_object->direction) < 0) {
53 new_object->direction *= -1;
54 }
55 static const double kMovingAverage = 0.6;
56 new_object->direction =
57 latest_object->output_direction * (1 - kMovingAverage) +
58 new_object->direction * kMovingAverage;
59 new_object->direction.normalize();
60 }
61 Eigen::Vector3f local_direction = obj->direction;
62 Eigen::Vector3d local_center = obj->center;
63 Eigen::Vector3f local_size = obj->size;
64 obj->direction = new_object->direction.cast<float>(); // sync
65 // finally, recompute object shape
67 new_object->center = obj->center;
68 new_object->size = obj->size.cast<double>();
69 // center and size in object should not changed
70 obj->center = local_center;
71 obj->size = local_size;
72 obj->direction = local_direction;
73 new_object->output_center = new_object->center;
74 new_object->output_direction = new_object->direction;
75 new_object->output_size = new_object->size;
76}
algorithm::ConvexHull2D< base::RadarPointDCloud, base::PolygonDType > hull_
std::shared_ptr< const TrackedObject > TrackedObjectConstPtr
void ComputeObjectShapeFromPolygon(std::shared_ptr< Object > object, bool use_world_cloud)

◆ UpdateWithoutObject()

void apollo::perception::radar4d::MrfShapeFilter::UpdateWithoutObject ( const MrfFilterOptions options,
double  timestamp,
MrfTrackDataPtr  track_data 
)
overridevirtual

Updating shape filter without object

参数
optionsfor updating
timestampcurrent timestamp
track_datatrack data to be updated

实现了 apollo::perception::radar4d::MrfBaseFilter.

在文件 mrf_shape_filter.cc78 行定义.

80 {
81 // TODO(.)
82}

类成员变量说明

◆ bottom_points_ignore_threshold_

double apollo::perception::radar4d::MrfShapeFilter::bottom_points_ignore_threshold_ = 0.1
protected

在文件 mrf_shape_filter.h68 行定义.

◆ hull_

algorithm::ConvexHull2D<base::RadarPointDCloud, base::PolygonDType> apollo::perception::radar4d::MrfShapeFilter::hull_
protected

在文件 mrf_shape_filter.h67 行定义.

◆ top_points_ignore_threshold_

double apollo::perception::radar4d::MrfShapeFilter::top_points_ignore_threshold_ = 1.6
protected

在文件 mrf_shape_filter.h69 行定义.


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