Apollo
11.0
自动驾驶开放平台
pointcloud_preprocessor.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2018 The Apollo Authors. All Rights Reserved.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*****************************************************************************/
16
17
#pragma once
18
19
#include <memory>
20
#include <string>
21
22
#include "modules/common_msgs/sensor_msgs/pointcloud.pb.h"
23
#include "modules/perception/pointcloud_preprocess/preprocessor/proto/pointcloud_preprocessor_config.pb.h"
24
25
#include "
modules/perception/common/lidar/common/lidar_frame.h
"
26
#include "
modules/perception/pointcloud_preprocess/interface/base_pointcloud_preprocessor.h
"
27
28
namespace
apollo
{
29
namespace
perception {
30
namespace
lidar {
31
32
class
PointCloudPreprocessor
:
public
BasePointCloudPreprocessor
{
33
public
:
34
PointCloudPreprocessor
() =
default
;
35
36
~PointCloudPreprocessor
() =
default
;
44
bool
Init
(
const
PointCloudPreprocessorInitOptions
& options =
45
PointCloudPreprocessorInitOptions
());
46
56
bool
Preprocess
(
57
const
PointCloudPreprocessorOptions
& options,
58
const
std::shared_ptr<apollo::drivers::PointCloud const>& message,
59
LidarFrame
* frame)
const
;
68
bool
Preprocess
(
const
PointCloudPreprocessorOptions
& options,
69
LidarFrame
* frame)
const
;
75
std::string
Name
()
const
{
return
"PointCloudPreprocessor"
; }
76
77
private
:
78
bool
TransformCloud(
const
base::PointFCloudPtr
& local_cloud,
79
const
Eigen::Affine3d& pose,
80
base::PointDCloudPtr
world_cloud)
const
;
81
// params
82
bool
filter_naninf_points_ =
true
;
83
bool
filter_nearby_box_points_ =
true
;
84
float
box_forward_x_ = 0.0f;
85
float
box_backward_x_ = 0.0f;
86
float
box_forward_y_ = 0.0f;
87
float
box_backward_y_ = 0.0f;
88
bool
filter_high_z_points_ =
true
;
89
float
z_threshold_ = 5.0f;
90
static
const
float
kPointInfThreshold;
91
};
92
93
}
// namespace lidar
94
}
// namespace perception
95
}
// namespace apollo
base_pointcloud_preprocessor.h
apollo::perception::lidar::BasePointCloudPreprocessor
Definition
base_pointcloud_preprocessor.h:44
apollo::perception::lidar::PointCloudPreprocessor
Definition
pointcloud_preprocessor.h:32
apollo::perception::lidar::PointCloudPreprocessor::Name
std::string Name() const
Get class name
Definition
pointcloud_preprocessor.h:75
apollo::perception::lidar::PointCloudPreprocessor::~PointCloudPreprocessor
~PointCloudPreprocessor()=default
apollo::perception::lidar::PointCloudPreprocessor::Preprocess
bool Preprocess(const PointCloudPreprocessorOptions &options, const std::shared_ptr< apollo::drivers::PointCloud const > &message, LidarFrame *frame) const
Ireprocess point cloud
Definition
pointcloud_preprocessor.cc:51
apollo::perception::lidar::PointCloudPreprocessor::PointCloudPreprocessor
PointCloudPreprocessor()=default
apollo::perception::lidar::PointCloudPreprocessor::Init
bool Init(const PointCloudPreprocessorInitOptions &options=PointCloudPreprocessorInitOptions())
Init pointcloud preprocessor
Definition
pointcloud_preprocessor.cc:34
lidar_frame.h
apollo::perception::base::PointDCloudPtr
std::shared_ptr< PointDCloud > PointDCloudPtr
Definition
point_cloud.h:520
apollo::perception::base::PointFCloudPtr
std::shared_ptr< PointFCloud > PointFCloudPtr
Definition
point_cloud.h:517
apollo
class register implement
Definition
arena_queue.h:37
apollo::perception::lidar::LidarFrame
Definition
lidar_frame.h:33
apollo::perception::lidar::PointCloudPreprocessorInitOptions
Definition
base_pointcloud_preprocessor.h:34
apollo::perception::lidar::PointCloudPreprocessorOptions
Definition
base_pointcloud_preprocessor.h:38
modules
perception
pointcloud_preprocess
preprocessor
pointcloud_preprocessor.h