Apollo 11.0
自动驾驶开放平台
base_data_association.h
浏览该文件的文档.
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
22#include "cyber/common/macros.h"
28
29namespace apollo {
30namespace perception {
31namespace fusion {
32
34
36
37typedef std::pair<size_t, size_t> TrackMeasurmentPair;
38
40 std::vector<TrackMeasurmentPair> assignments;
41 std::vector<size_t> unassigned_tracks;
42 std::vector<size_t> unassigned_measurements;
43 std::vector<double> track2measurements_dist;
44 std::vector<double> measurement2track_dist;
45};
46
48 public:
50 virtual ~BaseDataAssociation() = default;
51
59 virtual bool Init(const AssociationInitOptions& options) = 0;
60
71 virtual bool Associate(const AssociationOptions& options,
72 SensorFramePtr sensor_measurements, ScenePtr scene,
73 AssociationResult* association_result) = 0;
74
80 virtual std::string Name() const = 0;
81
83};
84
86#define PERCEPTION_REGISTER_ASSOCIATION(name) \
87 PERCEPTION_REGISTER_CLASS(BaseDataAssociation, name)
88
89} // namespace fusion
90} // namespace perception
91} // namespace apollo
virtual bool Associate(const AssociationOptions &options, SensorFramePtr sensor_measurements, ScenePtr scene, AssociationResult *association_result)=0
associate sensor measurements with global scene
virtual std::string Name() const =0
The name of BaseDataAssociation
virtual bool Init(const AssociationInitOptions &options)=0
Init base data association config
std::shared_ptr< SensorFrame > SensorFramePtr
std::shared_ptr< Scene > ScenePtr
Definition scene.h:88
std::pair< size_t, size_t > TrackMeasurmentPair
class register implement
Definition arena_queue.h:37
#define PERCEPTION_REGISTER_REGISTERER(base_class)
Definition registerer.h:92
std::vector< TrackMeasurmentPair > assignments