Apollo 11.0
自动驾驶开放平台
hm_matcher.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 <vector>
20
25
26namespace apollo {
27namespace perception {
28namespace radar {
29
30class HMMatcher : public BaseMatcher {
31 public:
32 HMMatcher() = default;
33 virtual ~HMMatcher() = default;
34
42 bool Init(const MatcherInitOptions &options) override;
43
56 bool Match(const std::vector<RadarTrackPtr> &radar_tracks,
57 const base::Frame &radar_frame,
58 const TrackObjectMatcherOptions &options,
59 std::vector<TrackObjectPair> *assignments,
60 std::vector<size_t> *unassigned_tracks,
61 std::vector<size_t> *unassigned_objects) override;
62
68 std::string Name() const override { return "HMMatcher"; }
69
70 protected:
81 bool RefinedTrack(const base::ObjectPtr &track_object, double track_timestamp,
82 const base::ObjectPtr &radar_object,
83 double radar_timestamp) override;
84
85 private:
87 void TrackObjectPropertyMatch(const std::vector<RadarTrackPtr> &radar_tracks,
88 const base::Frame &radar_frame,
89 std::vector<TrackObjectPair> *assignments,
90 std::vector<size_t> *unassigned_tracks,
91 std::vector<size_t> *unassigned_objects);
92 void ComputeAssociationMat(const std::vector<RadarTrackPtr> &radar_tracks,
93 const base::Frame &radar_frame,
94 const std::vector<size_t> &unassigned_tracks,
95 const std::vector<size_t> &unassigned_objects,
96 std::vector<std::vector<double>> *association_mat);
97 double DistanceBetweenObs(const base::ObjectPtr &obs1, double timestamp1,
98 const base::ObjectPtr &obs2, double timestamp2);
99};
100
101} // namespace radar
102} // namespace perception
103} // namespace apollo
bool Init(const MatcherInitOptions &options) override
Init HMMatcher config
Definition hm_matcher.cc:32
bool Match(const std::vector< RadarTrackPtr > &radar_tracks, const base::Frame &radar_frame, const TrackObjectMatcherOptions &options, std::vector< TrackObjectPair > *assignments, std::vector< size_t > *unassigned_tracks, std::vector< size_t > *unassigned_objects) override
match radar objects to tracks
Definition hm_matcher.cc:53
std::string Name() const override
The name of the HMMatcher
Definition hm_matcher.h:68
bool RefinedTrack(const base::ObjectPtr &track_object, double track_timestamp, const base::ObjectPtr &radar_object, double radar_timestamp) override
After the IDMatch, then track targets based on their features.
Definition hm_matcher.cc:66
std::shared_ptr< Object > ObjectPtr
Definition object.h:127
class register implement
Definition arena_queue.h:37