Apollo  6.0
Open source self driving car software
trajectory_evaluator.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 #pragma once
17 
18 #include <string>
19 #include <utility>
20 #include <vector>
21 
22 #include "modules/planning/proto/learning_data.pb.h"
23 
24 namespace apollo {
25 namespace planning {
26 
28  public:
29  ~TrajectoryEvaluator() = default;
30 
31  void EvaluateADCTrajectory(const double start_point_timestamp_sec,
32  const double delta_time,
33  LearningDataFrame* learning_data_frame);
34 
36  const int frame_num,
37  const std::vector<TrajectoryPointFeature>& adc_future_trajectory,
38  const double start_point_timestamp_sec, const double delta_time,
39  std::vector<TrajectoryPointFeature>* evaluated_adc_future_trajectory);
40 
41  void EvaluateObstacleTrajectory(const double start_point_timestamp_sec,
42  const double delta_time,
43  LearningDataFrame* learning_data_frame);
44 
46  const double start_point_timestamp_sec, const double delta_time,
47  LearningDataFrame* learning_data_frame);
48 
49  private:
50  void EvaluateTrajectoryByTime(
51  const int frame_num, const std::string& obstacle_id,
52  const std::vector<std::pair<double, CommonTrajectoryPointFeature>>&
53  trajectory,
54  const double start_point_timestamp_sec, const double delta_time,
55  std::vector<TrajectoryPointFeature>* evaluated_trajectory);
56 
57  void Convert(const CommonTrajectoryPointFeature& tp,
58  const double relative_time,
59  common::TrajectoryPoint* trajectory_point);
60  void Convert(const common::TrajectoryPoint& tp,
61  const double timestamp_sec,
62  TrajectoryPointFeature* trajectory_point);
63 
64  void WriteLog(const std::string& msg);
65 };
66 
67 } // namespace planning
68 } // namespace apollo
void EvaluateADCTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: trajectory_evaluator.h:27
void EvaluateObstacleTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
Planning module main class. It processes GPS and IMU as input, to generate planning info...
void EvaluateObstaclePredictionTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
void EvaluateADCFutureTrajectory(const int frame_num, const std::vector< TrajectoryPointFeature > &adc_future_trajectory, const double start_point_timestamp_sec, const double delta_time, std::vector< TrajectoryPointFeature > *evaluated_adc_future_trajectory)