Apollo 11.0
自动驾驶开放平台
base_stage_creep.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
21#pragma once
22
23#include <memory>
24#include <string>
25
27
28namespace apollo {
29namespace common {
30class Status;
31} // namespace common
32} // namespace apollo
33
34namespace apollo {
35namespace planning {
36
37class Frame;
38class ReferenceLineInfo;
39class CreepStageConfig;
40
41class BaseStageCreep : public Stage {
42 public:
44 ReferenceLineInfo* reference_line_info) const;
45
46 bool CheckCreepDone(const Frame& frame,
47 const ReferenceLineInfo& reference_line_info,
48 const double stop_sign_overlap_end_s,
49 const double wait_time_sec, const double timeout_sec);
60 double GetCreepFinishS(double overlap_end_s, const Frame& frame,
61 const ReferenceLineInfo& reference_line_info) const;
62
63 private:
74 double GetCreepTargetS(double overlap_end_s, const Frame& frame,
75 const ReferenceLineInfo& reference_line_info) const;
76
83 virtual const CreepStageConfig& GetCreepStageConfig() const = 0;
84
95 virtual bool GetOverlapStopInfo(Frame* frame,
96 ReferenceLineInfo* reference_line_info,
97 double* overlap_end_s,
98 std::string* overlap_id) const = 0;
99
100 static constexpr const char* CREEP_VO_ID_PREFIX_ = "CREEP_";
101};
102
103} // namespace planning
104} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
double GetCreepFinishS(double overlap_end_s, const Frame &frame, const ReferenceLineInfo &reference_line_info) const
Get the postion where creeping stage finishes.
bool CheckCreepDone(const Frame &frame, const ReferenceLineInfo &reference_line_info, const double stop_sign_overlap_end_s, const double wait_time_sec, const double timeout_sec)
common::Status ProcessCreep(Frame *frame, ReferenceLineInfo *reference_line_info) const
Frame holds all data for one planning cycle.
Definition frame.h:62
ReferenceLineInfo holds all data for one reference line.
Planning module main class.
class register implement
Definition arena_queue.h:37