Apollo 11.0
自动驾驶开放平台
barrier_status_tracker.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 <deque>
19#include <map>
20#include <string>
21#include <vector>
22
23#include "cyber/common/macros.h"
25
26namespace apollo {
27namespace perception {
28namespace lidar {
29
31
33public:
35 virtual ~BarrierStatusTracker() = default;
36
45
54 bool Track(double timestamp, const float open_percent, int& status_id);
55
56private:
57 double first_timestamp_ = 0.;
58 double s_tracking_time_win_;
59 double status_change_threshold_;
60 double open_threshold_;
61 double close_threshold_;
62
63 std::deque<std::pair<float, float>> prev_status_;
64
66};
67
68} // namespace lidar
69} // namespace perception
70} // namespace apollo
bool Track(double timestamp, const float open_percent, int &status_id)
Tracking status.
bool Init(const StatusTrackerInitOptions &options=StatusTrackerInitOptions())
Init BarrierStatusTracker config
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
class register implement
Definition arena_queue.h:37