#include <object_builder.h>
◆ ObjectBuilder()
| apollo::perception::lidar::ObjectBuilder::ObjectBuilder |
( |
| ) |
|
|
default |
Construct a new Object Builder object
◆ ~ObjectBuilder()
| apollo::perception::lidar::ObjectBuilder::~ObjectBuilder |
( |
| ) |
|
|
default |
Destroy the Object Builder object
◆ Build()
Calculate and fill object size, center, directions.
- 参数
-
| options | object builder options |
| frame | lidar frame |
- 返回
- true
-
false
在文件 object_builder.cc 第 34 行定义.
35 {
36 if (frame == nullptr) {
37 return false;
38 }
39 std::vector<ObjectPtr>* objects = &(frame->segmented_objects);
40 for (size_t i = 0; i < objects->size(); ++i) {
41 if (objects->at(i)) {
42 objects->at(i)->id = static_cast<int>(i);
47 if (FLAGS_need_judge_front_critical) {
49 }
50 }
51 }
52 return true;
53}
void ComputeHeightAboveGround(std::shared_ptr< apollo::perception::base::Object > object)
void ComputeOtherObjectInformation(std::shared_ptr< apollo::perception::base::Object > object)
void ComputePolygon2D(std::shared_ptr< apollo::perception::base::Object > object)
void JudgeFrontCritical(std::shared_ptr< apollo::perception::base::Object > object, Eigen::Affine3d &lidar2novatel_pose)
void ComputePolygonSizeCenter(std::shared_ptr< apollo::perception::base::Object > object)
◆ ComputeHeightAboveGround()
在文件 object_builder.cc 第 109 行定义.
109 {
110 const float invalid_ground = std::numeric_limits<float>::max();
111 float above_min = std::numeric_limits<float>::max();
112 for (int j = 0; j < object->lidar_supplement.cloud.size(); j++) {
113 auto height =
object->lidar_supplement.cloud.points_height(j);
114 if (height == invalid_ground) {
115 continue;
116 }
117 above_min = std::min(above_min, height);
118 }
119 object->lidar_supplement.height_above_ground = above_min;
120}
uint32_t height
Height of point cloud
◆ ComputeOtherObjectInformation()
◆ ComputePolygon2D()
◆ ComputePolygonSizeCenter()
◆ GetMinMax3D()
◆ Init()
Init the Object Builder object with initialization options
- 参数
-
- 返回
- true
-
false
在文件 object_builder.cc 第 30 行定义.
◆ JudgeFrontCritical()
| void apollo::perception::lidar::ObjectBuilder::JudgeFrontCritical |
( |
std::shared_ptr< apollo::perception::base::Object > |
object, |
|
|
Eigen::Affine3d & |
lidar2novatel_pose |
|
) |
| |
在文件 object_builder.cc 第 213 行定义.
214 {
215 Eigen::Vector3d obj_center = object->center;
216 obj_center = lidar2novatel_pose * obj_center;
217 auto x_in_novatel = obj_center(0);
218 auto y_in_novatel = obj_center(1);
219 if (y_in_novatel > FLAGS_y_back && y_in_novatel < FLAGS_y_front &&
220 x_in_novatel > FLAGS_x_back && x_in_novatel < FLAGS_x_front &&
221 object->lidar_supplement.is_clustered) {
222 object->is_front_critical = true;
223 AINFO <<
"Object " <<
object->id <<
" is FRONT-CRITICAL";
224 }
225}
◆ LinePerturbation()
◆ Name()
| std::string apollo::perception::lidar::ObjectBuilder::Name |
( |
| ) |
const |
|
inline |
Name of Object Builder
- 返回
- std::string
在文件 object_builder.h 第 88 行定义.
88{ return "ObjectBuilder"; }
◆ SetDefaultValue()
| void apollo::perception::lidar::ObjectBuilder::SetDefaultValue |
( |
const Eigen::Vector3f & |
min_pt, |
|
|
const Eigen::Vector3f & |
max_pt, |
|
|
std::shared_ptr< apollo::perception::base::Object > |
object |
|
) |
| |
该类的文档由以下文件生成: