Apollo  v5.5.0
Open source self driving car software
base_object_filter.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  std::string sensor_name = "velodyne64";
30 };
31 
33 
35  public:
36  BaseObjectFilter() = default;
37 
38  virtual ~BaseObjectFilter() = default;
39 
40  virtual bool Init(
41  const ObjectFilterInitOptions& options = ObjectFilterInitOptions()) = 0;
42 
43  // @brief: filter objects
44  // @param [in]: options
45  // @param [in/out]: frame
46  // segmented_objects should be valid, and will be filtered,
47  virtual bool Filter(const ObjectFilterOptions& options,
48  LidarFrame* frame) = 0;
49 
50  virtual std::string Name() const = 0;
51 
52  private:
53  DISALLOW_COPY_AND_ASSIGN(BaseObjectFilter);
54 }; // class BaseObjectFilter
55 
57 #define PERCEPTION_REGISTER_OBJECTFILTER(name) \
58  PERCEPTION_REGISTER_CLASS(BaseObjectFilter, name)
59 
60 } // namespace lidar
61 } // namespace perception
62 } // namespace apollo
Definition: blob.h:72
std::string sensor_name
Definition: base_object_filter.h:29
Definition: base_object_filter.h:34
Definition: base_object_filter.h:28
PERCEPTION_REGISTER_REGISTERER(BaseOneShotTypeFusion)
Definition: lidar_frame.h:33
Definition: base_object_filter.h:32