Apollo  6.0
Open source self driving car software
spatio_temporal_ground_detector.h
Go to the documentation of this file.
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 
26 
27 namespace apollo {
28 namespace perception {
29 namespace lidar {
30 
32  public:
33  SpatioTemporalGroundDetector() = default;
35  if (pfdetector_ != nullptr) {
36  delete pfdetector_;
37  }
38  if (param_ != nullptr) {
39  delete param_;
40  }
41  }
42 
43  bool Init(const GroundDetectorInitOptions& options =
44  GroundDetectorInitOptions()) override;
45 
46  bool Detect(const GroundDetectorOptions& options, LidarFrame* frame) override;
47 
48  std::string Name() const override { return "SpatioTemporalGroundDetector"; }
49 
50  private:
51  common::PlaneFitGroundDetectorParam* param_ = nullptr;
52  common::PlaneFitGroundDetector* pfdetector_ = nullptr;
53  std::vector<float> data_;
54  std::vector<float> ground_height_signed_;
55  std::vector<int> point_indices_temp_;
56 
57  bool use_roi_ = true;
58  bool use_ground_service_ = false;
59  float ground_thres_ = 0.25f;
60  size_t default_point_size_ = 320000;
61  Eigen::Vector3d cloud_center_ = Eigen::Vector3d(0.0, 0.0, 0.0);
62  GroundServiceContent ground_service_content_;
63 }; // class SpatioTemporalGroundDetector
64 
65 } // namespace lidar
66 } // namespace perception
67 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
bool Detect(const GroundDetectorOptions &options, LidarFrame *frame) override
Definition: base_ground_detector.h:28
Definition: base_ground_detector.h:30
std::string Name() const override
Definition: spatio_temporal_ground_detector.h:48
Definition: base_ground_detector.h:32
Definition: spatio_temporal_ground_detector.h:31
bool Init(const GroundDetectorInitOptions &options=GroundDetectorInitOptions()) override
~SpatioTemporalGroundDetector()
Definition: spatio_temporal_ground_detector.h:34
Definition: lidar_frame.h:33