Apollo  6.0
Open source self driving car software
base_lidar_detector.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2021 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 #pragma once
17 
18 #include <string>
19 
20 #include "cyber/common/macros.h"
23 
24 namespace apollo {
25 namespace perception {
26 namespace lidar {
27 
29  std::string sensor_name = "velodyne64";
30 };
31 
33 
35  public:
36  BaseLidarDetector() = default;
37 
38  virtual ~BaseLidarDetector() = default;
39 
40  virtual bool Init(
41  const LidarDetectorInitOptions& options = LidarDetectorInitOptions()) = 0;
42 
43  // @brief: process point cloud and get objects.
44  // @param [in]: options
45  // @param [in/out]: frame
46  // objects should be filled, required,
47  // label field of point cloud can be filled, optional,
48  virtual bool Detect(const LidarDetectorOptions& options,
49  LidarFrame* frame) = 0;
50 
51  virtual std::string Name() const = 0;
52 
53  private:
55 }; // class BaseLidarDetector
56 
58 #define PERCEPTION_REGISTER_LIDARDETECTOR(name) \
59  PERCEPTION_REGISTER_CLASS(BaseLidarDetector, name)
60 
61 } // namespace lidar
62 } // namespace perception
63 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::string sensor_name
Definition: base_lidar_detector.h:29
Definition: base_lidar_detector.h:34
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition: macros.h:48
bool Init(const char *binary_name)
PERCEPTION_REGISTER_REGISTERER(BaseOneShotTypeFusion)
Definition: lidar_frame.h:33
Definition: base_lidar_detector.h:28
Definition: base_lidar_detector.h:32