Apollo 11.0
自动驾驶开放平台
apollo::planning::AutotuningRawFeatureGenerator类 参考

#include <autotuning_raw_feature_generator.h>

apollo::planning::AutotuningRawFeatureGenerator 的协作图:

Public 成员函数

 AutotuningRawFeatureGenerator (const double time_range, const size_t num_points, const ReferenceLineInfo &reference_line_info, const Frame &frame, const SpeedLimit &speed_limit)
 
common::Status EvaluateTrajectory (const std::vector< common::TrajectoryPoint > &trajectory, autotuning::TrajectoryRawFeature *const trajectory_feature) const
 evaluate trajectory with environment, generate model trajectory features
 
common::Status EvaluateTrajectoryPoint (const common::TrajectoryPoint &trajectory_point, autotuning::TrajectoryPointRawFeature *const trajectory_point_feature) const
 evaluate trajectory point with environment, generate model trajectory features
 
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
 

详细描述

在文件 autotuning_raw_feature_generator.h 第 32 行定义.

构造及析构函数说明

◆ AutotuningRawFeatureGenerator()

apollo::planning::AutotuningRawFeatureGenerator::AutotuningRawFeatureGenerator ( const double  time_range,
const size_t  num_points,
const ReferenceLineInfo &  reference_line_info,
const Frame &  frame,
const SpeedLimit &  speed_limit 
)

在文件 autotuning_raw_feature_generator.cc 第 37 行定义.

41 : reference_line_info_(reference_line_info),
42 frame_(frame),
43 speed_limit_(speed_limit),
44 obs_boundaries_(num_points, std::vector<std::array<double, 3>>()),
45 stop_boundaries_(num_points, std::vector<std::array<double, 3>>()),
46 nudge_boundaries_(num_points, std::vector<std::array<double, 3>>()),
47 side_pass_boundaries_(num_points, std::vector<std::array<double, 3>>()) {
48 CHECK_GT(num_points, 0U);
49 CHECK_GT(time_range, kMinTimeRange);
50 double res = time_range / static_cast<double>(num_points);
51 for (double t = 0; t < res + time_range; t += res) {
52 eval_time_.push_back(t);
53 }
54}

成员函数说明

◆ EvaluateSpeedProfile()

common::Status apollo::planning::AutotuningRawFeatureGenerator::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

在文件 autotuning_raw_feature_generator.cc 第 129 行定义.

131 {
132 if (speed_profile.size() != eval_time_.size()) {
133 const std::string msg = "mismatched evaluated time and speed profile size";
134 AERROR << msg;
135 return Status(ErrorCode::PLANNING_ERROR, msg);
136 }
137 for (size_t i = 0; i < eval_time_.size(); ++i) {
138 auto* trajectory_point_feature = trajectory_feature->add_point_feature();
139 auto status =
140 EvaluateSpeedPoint(speed_profile[i], i, trajectory_point_feature);
141 if (status != common::Status::OK()) {
142 const std::string msg = "Extracting speed profile error";
143 AERROR << msg;
144 return Status(ErrorCode::PLANNING_ERROR, msg);
145 }
146 }
147 return common::Status::OK();
148}
static Status OK()
generate a success status.
Definition status.h:60
#define AERROR
Definition log.h:44

◆ EvaluateTrajectory()

common::Status apollo::planning::AutotuningRawFeatureGenerator::EvaluateTrajectory ( const std::vector< common::TrajectoryPoint > &  trajectory,
autotuning::TrajectoryRawFeature *const  trajectory_feature 
) const

evaluate trajectory with environment, generate model trajectory features

参数
referenceline related info
framerelated status
返回
OK if the evaluation succeeds; error otherwise.

在文件 autotuning_raw_feature_generator.cc 第 56 行定义.

58 {
59 return common::Status::OK();
60}

◆ EvaluateTrajectoryPoint()

common::Status apollo::planning::AutotuningRawFeatureGenerator::EvaluateTrajectoryPoint ( const common::TrajectoryPoint &  trajectory_point,
autotuning::TrajectoryPointRawFeature *const  trajectory_point_feature 
) const

evaluate trajectory point with environment, generate model trajectory features

参数
referenceline related info
framerelated status
返回
OK if the evaluation succeeds; error otherwise.

在文件 autotuning_raw_feature_generator.cc 第 62 行定义.

65 {
66 return common::Status::OK();
67}

该类的文档由以下文件生成: