Apollo 11.0
自动驾驶开放平台
autotuning_raw_feature_generator.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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 <vector>
20
21#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
22#include "modules/planning/planning_base/proto/auto_tuning_raw_feature.pb.h"
23
28
29namespace apollo {
30namespace planning {
31
33 public:
34 // @brief class constructor
35 AutotuningRawFeatureGenerator(const double time_range,
36 const size_t num_points,
37 const ReferenceLineInfo& reference_line_info,
38 const Frame& frame,
39 const SpeedLimit& speed_limit);
40
41 // @evaluation interface
50 const std::vector<common::TrajectoryPoint>& trajectory,
51 autotuning::TrajectoryRawFeature* const trajectory_feature) const;
52
62 const common::TrajectoryPoint& trajectory_point,
63 autotuning::TrajectoryPointRawFeature* const trajectory_point_feature)
64 const;
65
70 const std::vector<common::SpeedPoint>& speed_profile,
71 autotuning::TrajectoryRawFeature* const trajectory_feature) const;
72
73 private:
74 void GenerateSTBoundaries(const ReferenceLineInfo& reference_line_info);
75
79 void ConvertToDiscretizedBoundaries(const STBoundary& boundary,
80 const double speed);
81
82 common::Status EvaluateSpeedPoint(const common::SpeedPoint& speed_point,
83 const size_t index,
85 trajectory_point_feature) const;
86
87 private:
88 std::vector<double> eval_time_;
89 const ReferenceLineInfo& reference_line_info_;
90 const Frame& frame_;
91 const SpeedLimit& speed_limit_;
92 std::vector<const STBoundary*> boundaries_;
93
94 // covers the boundary info lower s upper s as well as the speed of obs
95 std::vector<std::vector<std::array<double, 3>>> obs_boundaries_;
96 std::vector<std::vector<std::array<double, 3>>> stop_boundaries_;
97 std::vector<std::vector<std::array<double, 3>>> nudge_boundaries_;
98 std::vector<std::vector<std::array<double, 3>>> side_pass_boundaries_;
99};
100
101} // namespace planning
102} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
common::Status EvaluateSpeedProfile(const std::vector< common::SpeedPoint > &speed_profile, autotuning::TrajectoryRawFeature *const trajectory_feature) const
EvaluateSpeed Profile shall match the time range as well as resolution
common::Status EvaluateTrajectoryPoint(const common::TrajectoryPoint &trajectory_point, autotuning::TrajectoryPointRawFeature *const trajectory_point_feature) const
evaluate trajectory point with environment, generate model trajectory features
Frame holds all data for one planning cycle.
Definition frame.h:62
ReferenceLineInfo holds all data for one reference line.
Planning module main class.
class register implement
Definition arena_queue.h:37