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
27
28namespace apollo {
29namespace perception {
30namespace lidar {
31
33 public:
35
44 bool Init(const PointCloudPreprocessorInitOptions& options =
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
bool Preprocess(const PointCloudPreprocessorOptions &options, const std::shared_ptr< apollo::drivers::PointCloud const > &message, LidarFrame *frame) const
Ireprocess point cloud
bool Init(const PointCloudPreprocessorInitOptions &options=PointCloudPreprocessorInitOptions())
Init pointcloud preprocessor
std::shared_ptr< PointDCloud > PointDCloudPtr
std::shared_ptr< PointFCloud > PointFCloudPtr
class register implement
Definition arena_queue.h:37