Apollo  6.0
Open source self driving car software
base_classifier.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 #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 
31 
33  public:
34  BaseClassifier() = default;
35 
36  virtual ~BaseClassifier() = default;
37 
38  virtual bool Init(
39  const ClassifierInitOptions& options = ClassifierInitOptions()) = 0;
40 
41  // @brief: classify object list, and fill type in object.
42  // @param [in]: options
43  // @param [in/out]: object list
44  virtual bool Classify(const ClassifierOptions& options,
45  LidarFrame* frame) = 0;
46 
47  virtual std::string Name() const = 0;
48 
49  private:
51 }; // class BaseClassifier
52 
54 #define PERCEPTION_REGISTER_CLASSIFIER(name) \
55  PERCEPTION_REGISTER_CLASS(BaseClassifier, name)
56 
57 } // namespace lidar
58 } // namespace perception
59 } // namespace apollo
Definition: base_classifier.h:30
Definition: base_classifier.h:28
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition: macros.h:48
bool Init(const char *binary_name)
Definition: base_classifier.h:32
PERCEPTION_REGISTER_REGISTERER(BaseOneShotTypeFusion)
Definition: lidar_frame.h:33