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

#include <junction_predictor.h>

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

Public 成员函数

 JunctionPredictor ()
 Constructor
 
virtual ~JunctionPredictor ()=default
 Destructor
 
bool Predict (const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container) override
 Make prediction
 
- Public 成员函数 继承自 apollo::prediction::Predictor
 Predictor ()=default
 Constructor
 
virtual ~Predictor ()=default
 Destructor
 
int NumOfTrajectories (const Obstacle &obstacle)
 Get trajectory size
 
virtual void Clear ()
 Clear all trajectories
 
void TrimTrajectories (const ADCTrajectoryContainer &adc_trajectory_container, Obstacle *obstacle)
 Trim prediction trajectories by adc trajectory
 
const ObstacleConf::PredictorTypepredictor_type ()
 get the predictor type
 

额外继承的成员函数

- Protected 成员函数 继承自 apollo::prediction::Predictor
void SetEqualProbability (const double probability, const int start_index, Obstacle *obstacle_ptr)
 Set equal probability to prediction trajectories
 
bool TrimTrajectory (const ADCTrajectoryContainer &adc_trajectory_container, Obstacle *obstacle, Trajectory *trajectory)
 Trim a single prediction trajectory, keep the portion that is not in junction.
 
bool SupposedToStop (const Feature &feature, const double stop_distance, double *acceleration)
 Determine if an obstacle is supposed to stop within a distance
 
- 静态 Protected 成员函数 继承自 apollo::prediction::Predictor
static Trajectory GenerateTrajectory (const std::vector< apollo::common::TrajectoryPoint > &points)
 Generate trajectory from trajectory points
 
- Protected 属性 继承自 apollo::prediction::Predictor
ObstacleConf::PredictorType predictor_type_
 

详细描述

在文件 junction_predictor.h33 行定义.

构造及析构函数说明

◆ JunctionPredictor()

apollo::prediction::JunctionPredictor::JunctionPredictor ( )

Constructor

在文件 junction_predictor.cc36 行定义.

◆ ~JunctionPredictor()

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

Destructor

成员函数说明

◆ Predict()

bool apollo::prediction::JunctionPredictor::Predict ( const ADCTrajectoryContainer adc_trajectory_container,
Obstacle obstacle,
ObstaclesContainer obstacles_container 
)
overridevirtual

Make prediction

参数
ADCtrajectory container
Obstaclepointer
Obstaclescontainer
返回
If predicted successfully

实现了 apollo::prediction::Predictor.

在文件 junction_predictor.cc40 行定义.

42 {
43 Clear();
44 CHECK_NOTNULL(obstacle);
45 CHECK_GT(obstacle->history_size(), 0U);
46
47 obstacle->SetPredictorType(predictor_type_);
48
49 const Feature& latest_feature = obstacle->latest_feature();
50 std::vector<JunctionExit> junction_exits =
51 MostLikelyJunctions(latest_feature);
52 for (const auto& junction_exit : junction_exits) {
53 std::vector<TrajectoryPoint> trajectory_points;
54 DrawJunctionTrajectoryPoints(
55 latest_feature, junction_exit, FLAGS_prediction_trajectory_time_length,
56 FLAGS_prediction_trajectory_time_resolution, &trajectory_points);
57 Trajectory trajectory = GenerateTrajectory(trajectory_points);
58 obstacle->mutable_latest_feature()->add_predicted_trajectory()->CopyFrom(
59 trajectory);
60 }
61 return true;
62}
static Trajectory GenerateTrajectory(const std::vector< apollo::common::TrajectoryPoint > &points)
Generate trajectory from trajectory points
Definition predictor.cc:34
virtual void Clear()
Clear all trajectories
Definition predictor.cc:55

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