Apollo  6.0
Open source self driving car software
type_fusion_interface.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 <memory>
19 #include <string>
20 
24 
25 namespace apollo {
26 namespace perception {
27 namespace lidar {
28 
30 
31 struct TypeFusionOption {};
32 
34  public:
35  virtual bool Init(const TypeFusionInitOption& option) = 0;
36  virtual bool TypeFusion(const TypeFusionOption& option,
37  std::shared_ptr<perception::base::Object> object) = 0;
38  virtual std::string Name() const = 0;
39 };
40 
42 #define PERCEPTION_REGISTER_ONESHOTTYPEFUSION(name) \
43  PERCEPTION_REGISTER_CLASS(BaseOneShotTypeFusion, name)
44 
46  public:
48 
49  public:
50  virtual bool Init(const TypeFusionInitOption& option) = 0;
51  virtual bool TypeFusion(const TypeFusionOption& option,
52  TrackedObjects* tracked_objects) = 0;
53  virtual std::string Name() const = 0;
54 };
55 
57 #define PERCEPTION_REGISTER_SEQUENCETYPEFUSION(name) \
58  PERCEPTION_REGISTER_CLASS(BaseSequenceTypeFusion, name)
59 
60 } // namespace lidar
61 } // namespace perception
62 } // namespace apollo
ObjectSequence::TrackedObjects TrackedObjects
Definition: type_fusion_interface.h:47
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: type_fusion_interface.h:31
Definition: type_fusion_interface.h:29
Definition: type_fusion_interface.h:33
std::map< TimeStampKey, std::shared_ptr< apollo::perception::base::Object > > TrackedObjects
Definition: object_sequence.h:38
bool Init(const char *binary_name)
PERCEPTION_REGISTER_REGISTERER(BaseOneShotTypeFusion)
Definition: type_fusion_interface.h:45