Apollo 10.0
自动驾驶开放平台
junction_analyzer.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
17#pragma once
18
19#include <memory>
20#include <string>
21#include <unordered_map>
22#include <vector>
23
25#include "modules/common_msgs/prediction_msgs/feature.pb.h"
26
27namespace apollo {
28namespace prediction {
29
31 public:
36 void Init(const std::string& junction_id);
37
41 void Clear();
42
47 const std::string& GetJunctionId();
48
53 double ComputeJunctionRange();
54
60 const JunctionFeature& GetJunctionFeature(const std::string& start_lane_id);
61
68 const std::vector<std::string>& start_lane_ids);
69
70 private:
74 void SetAllJunctionExits();
75
81 std::vector<JunctionExit> GetJunctionExits(const std::string& start_lane_id);
82
88 bool IsExitLane(const std::string& lane_id);
89
90 private:
91 // junction_info pointer associated to the input junction_id
92 std::shared_ptr<const apollo::hdmap::JunctionInfo> junction_info_ptr_;
93 // Hashtable: exit_lane_id -> junction_exit
94 std::unordered_map<std::string, JunctionExit> junction_exits_;
95 // Hashtable: start_lane_id -> junction_feature
96 std::unordered_map<std::string, JunctionFeature> junction_features_;
97};
98
99} // namespace prediction
100} // namespace apollo
const std::string & GetJunctionId()
Get junction ID
double ComputeJunctionRange()
Compute junction range
void Clear()
Clear all stored data
const JunctionFeature & GetJunctionFeature(const std::string &start_lane_id)
Get junction feature starting from start_lane_id
void Init(const std::string &junction_id)
Initialize by junction ID, if junction id differs from prev cycle
class register implement
Definition arena_queue.h:37