Apollo  6.0
Open source self driving car software
rtk_replay_planner.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 
17 #pragma once
18 
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
26 #include "modules/planning/proto/planning_config.pb.h"
27 
32 namespace apollo {
33 namespace planning {
34 
43  public:
47  explicit RTKReplayPlanner(
48  const std::shared_ptr<DependencyInjector>& injector);
49 
53  virtual ~RTKReplayPlanner() = default;
54 
55  std::string Name() override { return "RTK"; }
56 
57  apollo::common::Status Init(const PlanningConfig& config) override;
58 
59  void Stop() override {}
60 
68  const common::TrajectoryPoint& planning_init_point, Frame* frame,
69  ADCTrajectory* ptr_computed_trajectory) override;
70 
79  const common::TrajectoryPoint& planning_init_point, Frame* frame,
80  ReferenceLineInfo* reference_line_info) override;
85  void ReadTrajectoryFile(const std::string& filename);
86 
87  private:
88  std::uint32_t QueryPositionMatchedPoint(
89  const common::TrajectoryPoint& start_point,
90  const std::vector<common::TrajectoryPoint>& trajectory) const;
91 
92  std::vector<common::TrajectoryPoint> complete_rtk_trajectory_;
93 };
94 
95 } // namespace planning
96 } // namespace apollo
RTKReplayPlanner is a derived class of Planner. It reads a recorded trajectory from a trajectory file...
Definition: rtk_replay_planner.h:42
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
apollo::common::Status PlanOnReferenceLine(const common::TrajectoryPoint &planning_init_point, Frame *frame, ReferenceLineInfo *reference_line_info) override
Override function Plan in parent class Planner.
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
apollo::common::Status Plan(const common::TrajectoryPoint &planning_init_point, Frame *frame, ADCTrajectory *ptr_computed_trajectory) override
Override function Plan in parent class Planner.
std::string Name() override
Definition: rtk_replay_planner.h:55
RTKReplayPlanner(const std::shared_ptr< DependencyInjector > &injector)
Constructor.
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
apollo::common::Status Init(const PlanningConfig &config) override
void Stop() override
Definition: rtk_replay_planner.h:59
virtual ~RTKReplayPlanner()=default
Destructor.
void ReadTrajectoryFile(const std::string &filename)
Read the recorded trajectory file.