Apollo  6.0
Open source self driving car software
base_data_association.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 <utility>
20 #include <vector>
21 
26 
27 namespace apollo {
28 namespace perception {
29 namespace fusion {
30 
32 
33 typedef std::pair<size_t, size_t> TrackMeasurmentPair;
34 
36  std::vector<TrackMeasurmentPair> assignments;
37  std::vector<size_t> unassigned_tracks;
38  std::vector<size_t> unassigned_measurements;
39  std::vector<double> track2measurements_dist;
40  std::vector<double> measurement2track_dist;
41 };
42 
44  public:
46  virtual ~BaseDataAssociation() {}
48  BaseDataAssociation& operator=(const BaseDataAssociation&) = delete;
49 
50  virtual bool Init() = 0;
51 
52  // @brief: associate sensor measurements with global scene
53  // @param [in]: options
54  // @param [in]: sensor_measurements
55  // @param [in]: scene
56  // @param [out]: association_result
57  virtual bool Associate(const AssociationOptions& options,
58  SensorFramePtr sensor_measurements, ScenePtr scene,
59  AssociationResult* association_result) = 0;
60 
61  virtual std::string Name() const = 0;
62 };
63 
64 } // namespace fusion
65 } // namespace perception
66 } // namespace apollo
std::pair< size_t, size_t > TrackMeasurmentPair
Definition: base_data_association.h:33
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::vector< double > track2measurements_dist
Definition: base_data_association.h:39
Definition: base_data_association.h:43
std::vector< double > measurement2track_dist
Definition: base_data_association.h:40
std::vector< TrackMeasurmentPair > assignments
Definition: base_data_association.h:36
std::shared_ptr< SensorFrame > SensorFramePtr
Definition: base_forward_declaration.h:28
Definition: base_data_association.h:31
BaseDataAssociation()
Definition: base_data_association.h:45
bool Init(const char *binary_name)
std::vector< size_t > unassigned_measurements
Definition: base_data_association.h:38
std::vector< size_t > unassigned_tracks
Definition: base_data_association.h:37
virtual ~BaseDataAssociation()
Definition: base_data_association.h:46
Definition: base_data_association.h:35
std::shared_ptr< Scene > ScenePtr
Definition: scene.h:58