Apollo  6.0
Open source self driving car software
navi_task.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 
23 #include <string>
24 
28 #include "modules/planning/proto/planning_config.pb.h"
29 
30 namespace apollo {
31 namespace planning {
32 
33 class NaviTask {
34  public:
35  explicit NaviTask(const std::string& name);
36  virtual ~NaviTask() = default;
37  virtual const std::string& Name() const;
38 
40  Frame* frame, ReferenceLineInfo* reference_line_info);
41 
42  virtual bool Init(const PlanningConfig& config);
43 
44  protected:
45  bool is_init_ = false;
46  Frame* frame_ = nullptr;
48 
49  private:
50  const std::string name_;
51 };
52 
53 } // namespace planning
54 } // namespace apollo
bool is_init_
Definition: navi_task.h:45
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
virtual apollo::common::Status Execute(Frame *frame, ReferenceLineInfo *reference_line_info)
ReferenceLineInfo holds all data for one reference line.
Definition: reference_line_info.h:54
virtual bool Init(const PlanningConfig &config)
Definition: navi_task.h:33
ReferenceLineInfo * reference_line_info_
Definition: navi_task.h:47
NaviTask(const std::string &name)
virtual ~NaviTask()=default
virtual const std::string & Name() const
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
Frame * frame_
Definition: navi_task.h:46