Apollo  6.0
Open source self driving car software
base_fusion_system.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 #include <vector>
20 
26 
27 namespace apollo {
28 namespace perception {
29 namespace fusion {
30 
32  std::vector<std::string> main_sensors;
33 };
34 
35 struct FusionOptions {};
36 
38  public:
39  BaseFusionSystem() = default;
40  virtual ~BaseFusionSystem() = default;
41  BaseFusionSystem(const BaseFusionSystem&) = delete;
42  BaseFusionSystem& operator=(const BaseFusionSystem&) = delete;
43 
44  virtual bool Init(const FusionInitOptions& options) = 0;
45 
46  // @brief: fuse a sensor frame
47  // @param [in]: options
48  // @param [in]: sensor_frame
49  // @param [out]: fused objects
50  virtual bool Fuse(const FusionOptions& options,
51  const base::FrameConstPtr& sensor_frame,
52  std::vector<base::ObjectPtr>* fused_objects) = 0;
53 
54  virtual std::string Name() const = 0;
55 
56  protected:
57  std::vector<std::string> main_sensors_;
58 };
59 
61 #define FUSION_REGISTER_FUSIONSYSTEM(name) \
62  PERCEPTION_REGISTER_CLASS(BaseFusionSystem, name)
63 
64 } // namespace fusion
65 } // namespace perception
66 } // namespace apollo
Definition: base_fusion_system.h:37
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
PERCEPTION_REGISTER_REGISTERER(BaseFusionSystem)
Definition: base_fusion_system.h:31
std::vector< std::string > main_sensors_
Definition: base_fusion_system.h:57
std::shared_ptr< const Frame > FrameConstPtr
Definition: frame.h:61
std::vector< std::string > main_sensors
Definition: base_fusion_system.h:32
bool Init(const char *binary_name)
Definition: base_fusion_system.h:35