Apollo 11.0
自动驾驶开放平台
trajectory_evaluator.h
浏览该文件的文档.
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/planning_base/proto/learning_data.pb.h"
23
24namespace apollo {
25namespace planning {
26
27class TrajectoryEvaluator {
28 public:
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, const double timestamp_sec,
61 TrajectoryPointFeature* trajectory_point);
62
63 void WriteLog(const std::string& msg);
64};
65
66} // namespace planning
67} // namespace apollo
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)
void EvaluateADCTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
void EvaluateObstacleTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
void EvaluateObstaclePredictionTrajectory(const double start_point_timestamp_sec, const double delta_time, LearningDataFrame *learning_data_frame)
Planning module main class.
class register implement
Definition arena_queue.h:37