Apollo 11.0
自动驾驶开放平台
pull_over_path.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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#include "modules/planning/tasks/pull_over_path/proto/pull_over_path.pb.h"
31
32namespace apollo {
33namespace planning {
34
35using SLState = std::pair<std::array<double, 3>, std::array<double, 3>>;
36
38 public:
39 bool Init(const std::string& config_dir, const std::string& name,
40 const std::shared_ptr<DependencyInjector>& injector) override;
41
42 private:
44 Frame* frame, ReferenceLineInfo* reference_line_info) override;
45
50 bool DecidePathBounds(std::vector<PathBoundary>* boundary);
56 bool OptimizePath(const std::vector<PathBoundary>& path_boundaries,
57 std::vector<PathData>* candidate_path_data);
63 bool AssessPath(std::vector<PathData>* candidate_path_data,
64 PathData* final_path);
70 bool GetBoundaryFromRoads(const ReferenceLineInfo& reference_line_info,
71 PathBoundary* const path_bound);
79 void UpdatePullOverBoundaryByLaneBoundary(bool is_pull_over_right,
80 PathBoundary* const path_bound);
88 bool SearchPullOverPosition(
89 const PathBound& path_bound,
90 std::tuple<double, double, double, int>* const pull_over_configuration);
95 bool FindNearestPullOverS(double* pull_over_s);
101 bool FindDestinationPullOverS(const PathBound& path_bound,
102 double* pull_over_s);
103
104 PullOverPathConfig config_;
105};
106
108} // namespace planning
109} // 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
bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector) override
ReferenceLineInfo holds all data for one reference line.
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
std::pair< std::array< double, 3 >, std::array< double, 3 > > SLState
std::vector< PathBoundPoint > PathBound
class register implement
Definition arena_queue.h:37