Apollo 11.0
自动驾驶开放平台
interaction_filter.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2021 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_set>
22#include <vector>
23
24#include "cyber/common/macros.h"
25
30
31namespace apollo {
32namespace prediction {
33
35 public:
37
38 explicit InteractionFilter(
39 const std::shared_ptr<ContainerManager>& container_manager);
40
45
46 private:
50 void AssignInteractiveTagInJunction(const Obstacle& ego_vehicle,
51 ObstaclesContainer* obstacles_container,
52 const std::string& junction_id);
53
58 void AssignInteractiveTagCruiseKeepLane(
59 const Obstacle& ego_vehicle, ObstaclesContainer* obstacles_container);
60
65 void AssignInteractiveTagCruiseChangeLane(
66 const Obstacle& ego_vehicle, ObstaclesContainer* obstacles_container);
67
72 void AssignInteractiveTagByEgoReferenceLine(
73 const Obstacle& ego_vehicle, ObstaclesContainer* obstacles_container);
74
75 void RankingInteractiveTagObstacles(const Obstacle& ego_vehicle,
76 ObstaclesContainer* obstacles_container);
77
78 void AssignInteractiveByMerge(
79 const Obstacle& ego_vehicle,
80 std::shared_ptr<const hdmap::LaneInfo> lane_info_ptr,
81 std::unordered_set<std::string>* const visited_lanes,
82 ObstaclesContainer* obstacles_container);
83
84 void AssignInteractiveByOverlap(
85 const Obstacle& ego_vehicle,
86 std::shared_ptr<const hdmap::LaneInfo> lane_info_ptr,
87 std::unordered_set<std::string>* const visited_lanes,
88 ObstaclesContainer* obstacles_container);
89
90 void SetInteractiveBackward(
91 const double distance, const Obstacle& ego_vehicle,
92 std::shared_ptr<const hdmap::LaneInfo> start_lane_info_ptr,
93 std::unordered_set<std::string>* const visited_lanes,
94 ObstaclesContainer* obstacles_container);
95
96 void SetInteractiveIfCloseToEgo(const Obstacle& ego_vehicle,
97 const double distance_threshold,
98 Obstacle* obstacle_ptr);
99
100 private:
101 std::unordered_set<std::string> ego_back_lane_id_set_;
102
103 std::shared_ptr<ContainerManager> container_manager_;
104
105 std::string ego_lane_id_ = "";
106
107 double ego_lane_s_ = 0.0;
108};
109
110} // namespace prediction
111} // namespace apollo
void AssignInteractiveTag()
Assign interactive tag for vehicle type obstacles which are close to ADC
Prediction obstacle.
Definition obstacle.h:52
Use container manager to manage all containers
class register implement
Definition arena_queue.h:37
Obstacles container