Apollo  6.0
Open source self driving car software
mlf_base_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"
24 
25 namespace apollo {
26 namespace perception {
27 namespace lidar {
28 
30 
31 struct MlfFilterOptions {};
32 
34  public:
35  MlfBaseFilter() = default;
36  virtual ~MlfBaseFilter() = default;
37 
38  virtual bool Init(
39  const MlfFilterInitOptions& options = MlfFilterInitOptions()) = 0;
40 
41  // @brief: interface for updating filter with object
42  // @params [in]: options for updating
43  // @params [in]: track data, not include new object
44  // @params [in/out]: new object for updating
45  virtual void UpdateWithObject(const MlfFilterOptions& options,
46  const MlfTrackDataConstPtr& track_data,
47  TrackedObjectPtr new_object) = 0;
48 
49  // @brief: interface for updating filter without object
50  // @params [in]: options for updating
51  // @params [in]: current timestamp
52  // @params [in/out]: track data to be updated
53  virtual void UpdateWithoutObject(const MlfFilterOptions& options,
54  double timestamp,
55  MlfTrackDataPtr track_data) = 0;
56 
57  virtual std::string Name() const = 0;
58 
59  private:
61 }; // class MlfBaseFilter
62 
64 #define PERCEPTION_REGISTER_MLFFILTER(name) \
65  PERCEPTION_REGISTER_CLASS(MlfBaseFilter, name)
66 
67 } // namespace lidar
68 } // namespace perception
69 } // namespace apollo
Definition: mlf_base_filter.h:31
Definition: mlf_base_filter.h:29
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
Definition: mlf_base_filter.h:33
std::shared_ptr< const MlfTrackData > MlfTrackDataConstPtr
Definition: mlf_track_data.h:118
std::shared_ptr< MlfTrackData > MlfTrackDataPtr
Definition: mlf_track_data.h:117
bool Init(const char *binary_name)
PERCEPTION_REGISTER_REGISTERER(BaseOneShotTypeFusion)
std::shared_ptr< TrackedObject > TrackedObjectPtr
Definition: tracked_object.h:156