Apollo  6.0
Open source self driving car software
speed_optimizer.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 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 
27 
28 namespace apollo {
29 namespace planning {
30 
31 class SpeedOptimizer : public Task {
32  public:
33  explicit SpeedOptimizer(const TaskConfig& config);
34 
35  virtual ~SpeedOptimizer() = default;
37  ReferenceLineInfo* reference_line_info) override;
38 
39  protected:
40  virtual common::Status Process(const PathData& path_data,
41  const common::TrajectoryPoint& init_point,
42  SpeedData* const speed_data) = 0;
43 
44  void RecordDebugInfo(const SpeedData& speed_data);
45  void RecordDebugInfo(const SpeedData& speed_data,
46  planning_internal::STGraphDebug* st_graph_debug);
47 };
48 
49 } // namespace planning
50 } // namespace apollo
SpeedOptimizer(const TaskConfig &config)
common::Status Execute(Frame *frame, ReferenceLineInfo *reference_line_info) override
void RecordDebugInfo(const SpeedData &speed_data)
Definition: speed_optimizer.h:31
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Planning module main class. It processes GPS and IMU as input, to generate planning info...
Frame holds all data for one planning cycle.
Definition: frame.h:61
ReferenceLineInfo holds all data for one reference line.
Definition: reference_line_info.h:54
virtual ~SpeedOptimizer()=default
Definition: path_data.h:36
: data with map info and obstacle info
Definition: task.h:35
A general class to denote the return status of an API call. It can either be an OK status for success...
Definition: status.h:43
Definition: speed_data.h:30
virtual common::Status Process(const PathData &path_data, const common::TrajectoryPoint &init_point, SpeedData *const speed_data)=0