Apollo 10.0
自动驾驶开放平台
hdmap_roi_filter.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 <string>
20#include <vector>
21
22#include "modules/perception/pointcloud_map_based_roi/roi_filter/hdmap_roi_filter/proto/hdmap_roi_filter.pb.h"
23
31
32namespace apollo {
33namespace perception {
34namespace lidar {
35
37 public:
43 : range_(120.0),
44 cell_size_(0.25),
45 extend_dist_(0.0),
46 no_edge_table_(false) {}
51 ~HdmapROIFilter() = default;
52
60 bool Init(const ROIFilterInitOptions& options) override;
61
70 bool Filter(const ROIFilterOptions& options, LidarFrame* frame) override;
71
77 std::string Name() const override { return "HdmapROIFilter"; }
78
79 private:
80 void TransformFrame(
81 const base::PointFCloudPtr& cloud, const Eigen::Affine3d& vel_pose,
84 base::PointFCloudPtr* cloud_local);
85
86 bool FilterWithPolygonMask(
87 const base::PointFCloudPtr& cloud,
89 base::PointIndices* roi_indices);
90
91 bool Bitmap2dFilter(const base::PointFCloudPtr& in_cloud,
92 const Bitmap2D& bitmap, base::PointIndices* roi_indices);
93
94 // parameters for polygons scans convert
95 double range_ = 120.0;
96 double cell_size_ = 0.25;
97 double extend_dist_ = 0.0;
98 bool no_edge_table_ = false;
99 bool set_roi_service_ = false;
102 Bitmap2D bitmap_;
103 ROIServiceContent roi_service_content_;
104};
105
107 BaseROIFilter)
108
109} // namespace lidar
110} // namespace perception
111} // namespace apollo
bool Filter(const ROIFilterOptions &options, LidarFrame *frame) override
filter point cloud outside of hdmap roi
~HdmapROIFilter()=default
Destroy the Hdmap ROI Filter object
bool Init(const ROIFilterInitOptions &options) override
Init of Hdmap ROI Filter object
HdmapROIFilter()
Construct a new Hdmap ROI Filter object
std::string Name() const override
Name of Hdmap ROI Filter object
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
std::vector< EigenType, Eigen::aligned_allocator< EigenType > > EigenVector
Definition eigen_defs.h:33
std::shared_ptr< PointFCloud > PointFCloudPtr
class register implement
Definition arena_queue.h:37