Apollo 11.0
自动驾驶开放平台
reuse_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 <utility>
26#include <vector>
27#include "modules/planning/tasks/reuse_path/proto/reuse_path.pb.h"
30
31namespace apollo {
32namespace planning {
33
34class ReusePath : public PathGeneration {
35 public:
36 bool Init(const std::string& config_dir, const std::string& name,
37 const std::shared_ptr<DependencyInjector>& injector) override;
38
39 private:
41 Frame* frame, ReferenceLineInfo* reference_line_info) override;
42
43 bool IsPathReusable(Frame* frame,
44 ReferenceLineInfo* const reference_line_info);
45
46 void GetCurrentStopPositions(
47 Frame* frame,
48 std::vector<const common::PointENU*>* current_stop_positions);
49
50 // get current s_projection of history objects which has stop decisions
51 void GetHistoryStopPositions(
52 ReferenceLineInfo* const reference_line_info,
53 const std::vector<const HistoryObjectDecision*>&
54 history_objects_decisions,
55 std::vector<std::pair<const double, const common::PointENU>>*
56 history_stop_positions);
57
58 void GetADCSLPoint(const ReferenceLine& reference_line,
59 common::SLPoint* adc_position_sl);
60
61 bool GetBlockingObstacleS(ReferenceLineInfo* const reference_line_info,
62 double* blocking_obstacle_s);
63 // ignore blocking obstacle when it is far away
64 bool IsIgnoredBlockingObstacle(ReferenceLineInfo* const reference_line_info);
65 // check if path is collision free
66 bool IsCollisionFree(ReferenceLineInfo* const reference_line_info);
67
68 // check path length
69 bool NotShortPath(const DiscretizedPath& current_path);
70
71 // trim history path
72 bool TrimHistoryPath(Frame* frame,
73 ReferenceLineInfo* const reference_line_info);
74
75 private:
76 ReusePathConfig config_;
77 bool path_reusable_;
78};
79
81} // namespace planning
82} // 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
Definition reuse_path.cc:34
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
class register implement
Definition arena_queue.h:37