Apollo  6.0
Open source self driving car software
dummy_algorithms.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 
28 
29 namespace apollo {
30 namespace perception {
31 namespace fusion {
32 
34  public:
35  DummyFusionSystem() = default;
36  ~DummyFusionSystem() = default;
37  DummyFusionSystem(const DummyFusionSystem&) = delete;
39 
40  bool Init(const FusionInitOptions& options) override;
41  std::string Name() const override { return "DummyFusionSystem"; }
42 
43  bool Fuse(const FusionOptions& options,
44  const base::FrameConstPtr& sensor_frame,
45  std::vector<base::ObjectPtr>* fused_objects) override;
46 };
47 
49  public:
50  DummyDataAssociation() = default;
51  ~DummyDataAssociation() = default;
54 
55  bool Init() override;
56  bool Associate(const AssociationOptions& options,
57  SensorFramePtr sensor_measurements, ScenePtr scene,
58  AssociationResult* association_result) override;
59 
60  std::string Name() const override { return "DummyDataAssociation"; }
61 };
62 
63 class DummyTracker : public BaseTracker {
64  public:
65  DummyTracker() = default;
66  ~DummyTracker() = default;
67  DummyTracker(const DummyTracker&) = delete;
68  DummyTracker& operator=(const DummyTracker&) = delete;
69 
70  bool Init(TrackPtr track, SensorObjectPtr measurement) override;
71 
72  void UpdateWithMeasurement(const TrackerOptions& options,
73  const SensorObjectPtr measurement,
74  double target_timestamp) override;
75 
76  void UpdateWithoutMeasurement(const TrackerOptions& options,
77  const std::string& sensor_id,
78  double measurement_timestamp,
79  double target_timestamp) override;
80 
81  std::string Name() const override { return "DummyTracker"; }
82 };
83 
84 } // namespace fusion
85 } // namespace perception
86 } // 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
bool Init(const FusionInitOptions &options) override
std::string Name() const override
Definition: dummy_algorithms.h:41
Definition: base_fusion_system.h:31
Definition: dummy_algorithms.h:48
std::shared_ptr< SensorObject > SensorObjectPtr
Definition: sensor_object.h:68
Definition: base_data_association.h:43
bool Fuse(const FusionOptions &options, const base::FrameConstPtr &sensor_frame, std::vector< base::ObjectPtr > *fused_objects) override
std::shared_ptr< const Frame > FrameConstPtr
Definition: frame.h:61
Definition: base_tracker.h:32
std::shared_ptr< Track > TrackPtr
Definition: track.h:160
std::shared_ptr< SensorFrame > SensorFramePtr
Definition: base_forward_declaration.h:28
Definition: base_data_association.h:31
Definition: base_fusion_system.h:35
Definition: base_tracker.h:28
Definition: dummy_algorithms.h:63
Definition: dummy_algorithms.h:33
DummyFusionSystem & operator=(const DummyFusionSystem &)=delete
std::string Name() const override
Definition: dummy_algorithms.h:81
Definition: base_data_association.h:35
std::string Name() const override
Definition: dummy_algorithms.h:60
std::shared_ptr< Scene > ScenePtr
Definition: scene.h:58