Apollo 10.0
自动驾驶开放平台
mrf_tracker.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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 <limits>
19#include <string>
20#include <vector>
21
26
27namespace apollo {
28namespace perception {
29namespace radar4d {
30
32
34
36
38 public:
39 MrfTracker() = default;
41 for (auto& filter : filters_) {
42 delete filter;
43 }
44 }
52 bool Init(const MrfTrackerInitOptions options = MrfTrackerInitOptions());
53
60 void InitializeTrack(MrfTrackDataPtr new_track_data,
61 TrackedObjectPtr new_object);
62
70 TrackedObjectPtr new_object);
71
78 void UpdateTrackDataWithoutObject(double timestamp,
79 MrfTrackDataPtr track_data);
80
86 std::string Name() const { return "MrfTracker"; }
87
88 protected:
95 if (global_track_id_counter_ == std::numeric_limits<int>::max()) {
97 }
99 }
100
101 protected:
102 // a single whole state filter or separate state filters
103 std::vector<MrfBaseFilter*> filters_;
104 // global track id
106 // filter option
108}; // class MrfTracker
109
110} // namespace radar4d
111} // namespace perception
112} // namespace apollo
void UpdateTrackDataWithoutObject(double timestamp, MrfTrackDataPtr track_data)
Update track data without object
std::vector< MrfBaseFilter * > filters_
bool Init(const MrfTrackerInitOptions options=MrfTrackerInitOptions())
Init mrf tracker
void InitializeTrack(MrfTrackDataPtr new_track_data, TrackedObjectPtr new_object)
Initialize new track data and push new object to cache
void UpdateTrackDataWithObject(MrfTrackDataPtr track_data, TrackedObjectPtr new_object)
Update track data with object
std::string Name() const
Get class name
Definition mrf_tracker.h:86
int GetNextTrackId()
Get next track id
Definition mrf_tracker.h:94
std::shared_ptr< MrfTrackData > MrfTrackDataPtr
std::shared_ptr< TrackedObject > TrackedObjectPtr
class register implement
Definition arena_queue.h:37