Apollo 11.0
自动驾驶开放平台
object_sequence.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 <map>
19#include <memory>
20#include <mutex>
21#include <vector>
22
23#include "gtest/gtest_prod.h"
24
26
27namespace apollo {
28namespace perception {
29namespace radar4d {
30
32 public:
33 typedef int TrackIdKey;
34 typedef double TimeStampKey;
35 typedef std::map<TimeStampKey,
36 std::shared_ptr<apollo::perception::base::Object>>
38
39 public:
40 ObjectSequence() = default;
41 ~ObjectSequence() = default;
42
44 const std::vector<std::shared_ptr<perception::base::Object>>& objects,
45 TimeStampKey timestamp);
46
48 TimeStampKey window_time);
49
50 protected:
51 FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion);
52 FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion_bad_timestamp);
53 void RemoveStaleTracks(TimeStampKey current_stamp);
54
56 std::map<TrackIdKey, TrackedObjects> sequence_;
57 std::mutex mutex_;
58 static constexpr TimeStampKey kMaxTimeOut = 5.0; // 5 second
59};
60
61} // namespace radar4d
62} // namespace perception
63} // namespace apollo
FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion)
bool AddTrackedFrameObjects(const std::vector< std::shared_ptr< perception::base::Object > > &objects, TimeStampKey timestamp)
static constexpr TimeStampKey kMaxTimeOut
std::map< TimeStampKey, std::shared_ptr< apollo::perception::base::Object > > TrackedObjects
bool GetTrackInTemporalWindow(TrackIdKey track_id, TrackedObjects *track, TimeStampKey window_time)
FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion_bad_timestamp)
void RemoveStaleTracks(TimeStampKey current_stamp)
std::map< TrackIdKey, TrackedObjects > sequence_
class register implement
Definition arena_queue.h:37