Apollo 11.0
自动驾驶开放平台
st_bounds_decider.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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 <memory>
24#include <string>
25#include <tuple>
26#include <utility>
27#include <vector>
28
29#include "modules/planning/tasks/st_bounds_decider/proto/st_bounds_decider.pb.h"
37
38namespace apollo {
39namespace planning {
40
41constexpr double kSTBoundsDeciderResolution = 0.1;
42constexpr double kSTPassableThreshold = 3.0;
43
44class STBoundsDecider : public Decider {
45 public:
46 bool Init(const std::string& config_dir, const std::string& name,
47 const std::shared_ptr<DependencyInjector>& injector) override;
48
49 private:
50 common::Status Process(Frame* const frame,
51 ReferenceLineInfo* const reference_line_info) override;
52
53 void InitSTBoundsDecider(const Frame& frame,
54 ReferenceLineInfo* const reference_line_info);
55
56 common::Status GenerateFallbackSTBound(
57 std::vector<std::tuple<double, double, double>>* const st_bound,
58 std::vector<std::tuple<double, double, double>>* const vt_bound);
59
60 common::Status GenerateRegularSTBound(
61 std::vector<std::tuple<double, double, double>>* const st_bound,
62 std::vector<std::tuple<double, double, double>>* const vt_bound,
63 std::vector<std::pair<double, double>>* const st_guide_line);
64
65 void RemoveInvalidDecisions(
66 std::pair<double, double> driving_limit,
67 std::vector<
68 std::pair<std::tuple<double, double, double>,
69 std::vector<std::pair<std::string, ObjectDecisionType>>>>*
70 available_choices);
71
72 void RankDecisions(
73 double s_guide_line, std::pair<double, double> driving_limit,
74 std::vector<
75 std::pair<std::tuple<double, double, double>,
76 std::vector<std::pair<std::string, ObjectDecisionType>>>>*
77 available_choices);
78
79 bool BackwardFlatten(
80 std::vector<std::tuple<double, double, double>>* const st_bound);
81
82 void RecordSTGraphDebug(
83 const std::vector<STBoundary>& st_graph_data,
84 const std::vector<std::tuple<double, double, double>>& st_bound,
85 const std::vector<std::pair<double, double>>& st_guide_line,
86 planning_internal::STGraphDebug* const st_graph_debug);
87
88 private:
90
91 STGuideLine st_guide_line_;
92 STDrivingLimits st_driving_limits_;
93 STObstaclesProcessor st_obstacles_processor_;
94};
95
97
98} // namespace planning
99} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
Frame holds all data for one planning cycle.
Definition frame.h:62
ReferenceLineInfo holds all data for one reference line.
bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector) override
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
constexpr double kSTPassableThreshold
constexpr double kSTBoundsDeciderResolution
class register implement
Definition arena_queue.h:37
: data with map info and obstacle info