Apollo 10.0
自动驾驶开放平台
apollo::prediction::CyclistKeepLaneEvaluator类 参考

#include <cyclist_keep_lane_evaluator.h>

类 apollo::prediction::CyclistKeepLaneEvaluator 继承关系图:
apollo::prediction::CyclistKeepLaneEvaluator 的协作图:

Public 成员函数

 CyclistKeepLaneEvaluator ()
 Constructor
 
virtual ~CyclistKeepLaneEvaluator ()=default
 Destructor
 
bool Evaluate (Obstacle *obstacle_ptr, ObstaclesContainer *obstacles_container) override
 Override Evaluate
 
std::string GetName () override
 Get the name of evaluator.
 
- Public 成员函数 继承自 apollo::prediction::Evaluator
 Evaluator ()=default
 Constructor
 
virtual ~Evaluator ()=default
 Destructor
 
virtual bool Evaluate (Obstacle *obstacle, ObstaclesContainer *obstacles_container, std::vector< Obstacle * > dynamic_env)
 Evaluate an obstacle
 
virtual bool Evaluate (const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container)
 Evaluate an obstacle
 

额外继承的成员函数

- Protected 成员函数 继承自 apollo::prediction::Evaluator
std::pair< double, double > WorldCoordToObjCoord (std::pair< double, double > input_world_coord, std::pair< double, double > obj_world_coord, double obj_world_angle)
 
std::pair< double, double > WorldCoordToObjCoordNorth (std::pair< double, double > input_world_coord, std::pair< double, double > obj_world_coord, double obj_world_angle)
 
double WorldAngleToObjAngle (double input_world_angle, double obj_world_angle)
 
Eigen::MatrixXf VectorToMatrixXf (const std::vector< double > &nums, const int start_index, const int end_index)
 
Eigen::MatrixXf VectorToMatrixXf (const std::vector< double > &nums, const int start_index, const int end_index, const int output_num_row, const int output_num_col)
 
- Protected 属性 继承自 apollo::prediction::Evaluator
ObstacleConf::EvaluatorType evaluator_type_
 

详细描述

在文件 cyclist_keep_lane_evaluator.h37 行定义.

构造及析构函数说明

◆ CyclistKeepLaneEvaluator()

apollo::prediction::CyclistKeepLaneEvaluator::CyclistKeepLaneEvaluator ( )

◆ ~CyclistKeepLaneEvaluator()

virtual apollo::prediction::CyclistKeepLaneEvaluator::~CyclistKeepLaneEvaluator ( )
virtualdefault

Destructor

成员函数说明

◆ Evaluate()

bool apollo::prediction::CyclistKeepLaneEvaluator::Evaluate ( Obstacle obstacle_ptr,
ObstaclesContainer obstacles_container 
)
overridevirtual

Override Evaluate

参数
Obstaclepointer

实现了 apollo::prediction::Evaluator.

在文件 cyclist_keep_lane_evaluator.cc26 行定义.

27 {
28 CHECK_NOTNULL(obstacle_ptr);
29
30 obstacle_ptr->SetEvaluatorType(evaluator_type_);
31
32 int id = obstacle_ptr->id();
33 if (!obstacle_ptr->latest_feature().IsInitialized()) {
34 AERROR << "Obstacle [" << id << "] has no latest feature.";
35 return false;
36 }
37
38 Feature* latest_feature_ptr = obstacle_ptr->mutable_latest_feature();
39 CHECK_NOTNULL(latest_feature_ptr);
40 if (!latest_feature_ptr->has_lane() ||
41 !latest_feature_ptr->lane().has_lane_graph() ||
42 !latest_feature_ptr->lane().has_lane_feature()) {
43 ADEBUG << "Obstacle [" << id << "] has no lane graph.";
44 return false;
45 }
46
47 LaneGraph* lane_graph_ptr =
48 latest_feature_ptr->mutable_lane()->mutable_lane_graph();
49 CHECK_NOTNULL(lane_graph_ptr);
50 if (lane_graph_ptr->lane_sequence().empty()) {
51 AERROR << "Obstacle [" << id << "] has no lane sequences.";
52 return false;
53 }
54
55 std::string curr_lane_id =
56 latest_feature_ptr->lane().lane_feature().lane_id();
57
58 for (auto& lane_sequence : *lane_graph_ptr->mutable_lane_sequence()) {
59 const double probability = ComputeProbability(curr_lane_id, lane_sequence);
60 lane_sequence.set_probability(probability);
61 }
62 return true;
63}
#define ADEBUG
Definition log.h:41
#define AERROR
Definition log.h:44

◆ GetName()

std::string apollo::prediction::CyclistKeepLaneEvaluator::GetName ( )
inlineoverridevirtual

Get the name of evaluator.

实现了 apollo::prediction::Evaluator.

在文件 cyclist_keep_lane_evaluator.h59 行定义.

59{ return "CYCLIST_KEEP_LANE_EVALUATOR"; }

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