Apollo 11.0
自动驾驶开放平台
spatio_temporal_ground_detector.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#include <utility>
22#include <limits>
23#include <list>
24
29
30namespace apollo {
31namespace perception {
32namespace lidar {
33
35 public:
38 if (pfdetector_ != nullptr) {
39 delete pfdetector_;
40 }
41 if (param_ != nullptr) {
42 delete param_;
43 }
44 }
52 bool Init(const GroundDetectorInitOptions& options =
53 GroundDetectorInitOptions()) override;
62 bool Detect(const GroundDetectorOptions& options, LidarFrame* frame) override;
68 std::string Name() const override { return "SpatioTemporalGroundDetector"; }
69
70 private:
72 algorithm::PlaneFitGroundDetector* pfdetector_ = nullptr;
73 std::vector<float> data_;
74 std::vector<int> semantic_data_;
75 std::vector<float> ground_height_signed_;
76 std::vector<int> point_indices_temp_;
77 std::vector<std::pair<int, int>> point_attribute_;
78
79 bool use_roi_ = true;
80 bool use_ground_service_ = false;
81 bool use_semantic_ground_ = false;
82 float ground_thres_ = 0.25f;
83 float near_range_dist_ = 15.0;
84 float near_range_ground_thres_ = 0.10;
85 float middle_range_dist_ = 15.0;
86 float middle_range_ground_thres_ = 0.10;
87 int grid_size_ = 256;
88
89 float ori_sample_z_lower_ = -3.0;
90 float ori_sample_z_upper_ = -1.0;
91 float parsing_height_buffer_ = 0.2;
92 float near_range_ = 15.0;
93 bool debug_output_ = false;
94 bool single_ground_detect_ = true;
95
96 size_t default_point_size_ = 320000;
97 Eigen::Vector3d cloud_center_ = Eigen::Vector3d(0.0, 0.0, 0.0);
98 GroundServiceContent ground_service_content_;
99
100 // average ground z
101 std::list<float> origin_ground_z_array_;
102 const size_t ground_z_average_frame = 5;
103}; // class SpatioTemporalGroundDetector
104
105} // namespace lidar
106} // namespace perception
107} // namespace apollo
bool Detect(const GroundDetectorOptions &options, LidarFrame *frame) override
Detect ground point
bool Init(const GroundDetectorInitOptions &options=GroundDetectorInitOptions()) override
Init ground detector
class register implement
Definition arena_queue.h:37