Apollo 11.0
自动驾驶开放平台
park_data_center.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2024 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
21#pragma once
22
23#include <string>
24
25#include "cyber/common/macros.h"
30
31namespace apollo {
32namespace planning {
33using NudgeInfoMap = std::map<std::size_t, NudgeInfo>;
35
37public:
39
40 void UpdateHistoryNudgeInfo(uint32_t sequence_num);
42 uint32_t sequence_num,
43 std::size_t reference_line_key,
44 std::unordered_map<std::string, NudgeObstacleInfo> *track_info);
45
46 const NudgeInfo &current_nudge_info(std::size_t reference_line_key);
47 NudgeInfo *mutable_current_nudge_info(std::size_t reference_line_key);
48 void set_need_escape(bool need) { need_escape_ = need; }
49 bool is_need_escape() { return need_escape_; }
50
51private:
52 static bool is_init_;
53 NudgeInfoMap current_nudge_info_data_;
54 NudgeInfoIndexedQueue history_nudge_info_data_ = NudgeInfoIndexedQueue(FLAGS_max_frame_history_num);
55 bool need_escape_ = false;
56
58};
59
60} // namespace planning
61} // namespace apollo
The class of Box2d.
NudgeInfo * mutable_current_nudge_info(std::size_t reference_line_key)
bool GetLastFrameNudgeTrackInfo(uint32_t sequence_num, std::size_t reference_line_key, std::unordered_map< std::string, NudgeObstacleInfo > *track_info)
void UpdateHistoryNudgeInfo(uint32_t sequence_num)
const NudgeInfo & current_nudge_info(std::size_t reference_line_key)
Planning module main class.
#define DECLARE_SINGLETON(classname)
Definition macros.h:52
std::map< std::size_t, NudgeInfo > NudgeInfoMap
IndexedQueue< uint32_t, NudgeInfoMap > NudgeInfoIndexedQueue
class register implement
Definition arena_queue.h:37