Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
apollo::prediction::Predictor Class Referenceabstract

#include <predictor.h>

Inheritance diagram for apollo::prediction::Predictor:
Inheritance graph
Collaboration diagram for apollo::prediction::Predictor:
Collaboration graph

Public Member Functions

 Predictor ()=default
 Constructor. More...
 
virtual ~Predictor ()=default
 Destructor. More...
 
virtual bool Predict (const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container)=0
 Make prediction. More...
 
int NumOfTrajectories (const Obstacle &obstacle)
 Get trajectory size. More...
 
virtual void Clear ()
 Clear all trajectories. More...
 
void TrimTrajectories (const ADCTrajectoryContainer &adc_trajectory_container, Obstacle *obstacle)
 Trim prediction trajectories by adc trajectory. More...
 
const ObstacleConf::PredictorType & predictor_type ()
 get the predictor type More...
 

Protected Member Functions

void SetEqualProbability (const double probability, const int start_index, Obstacle *obstacle_ptr)
 Set equal probability to prediction trajectories. More...
 
bool TrimTrajectory (const ADCTrajectoryContainer &adc_trajectory_container, Obstacle *obstacle, Trajectory *trajectory)
 Trim a single prediction trajectory, keep the portion that is not in junction. More...
 
bool SupposedToStop (const Feature &feature, const double stop_distance, double *acceleration)
 Determine if an obstacle is supposed to stop within a distance. More...
 

Static Protected Member Functions

static Trajectory GenerateTrajectory (const std::vector< apollo::common::TrajectoryPoint > &points)
 Generate trajectory from trajectory points. More...
 

Protected Attributes

ObstacleConf::PredictorType predictor_type_
 

Constructor & Destructor Documentation

◆ Predictor()

apollo::prediction::Predictor::Predictor ( )
default

Constructor.

◆ ~Predictor()

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

Destructor.

Member Function Documentation

◆ Clear()

virtual void apollo::prediction::Predictor::Clear ( )
virtual

Clear all trajectories.

Reimplemented in apollo::prediction::SequencePredictor.

◆ GenerateTrajectory()

static Trajectory apollo::prediction::Predictor::GenerateTrajectory ( const std::vector< apollo::common::TrajectoryPoint > &  points)
staticprotected

Generate trajectory from trajectory points.

Parameters
Avector of trajectory points
Returns
Generated trajectory

◆ NumOfTrajectories()

int apollo::prediction::Predictor::NumOfTrajectories ( const Obstacle obstacle)

Get trajectory size.

Returns
Size of trajectories

◆ Predict()

virtual bool apollo::prediction::Predictor::Predict ( const ADCTrajectoryContainer adc_trajectory_container,
Obstacle obstacle,
ObstaclesContainer obstacles_container 
)
pure virtual

◆ predictor_type()

const ObstacleConf::PredictorType& apollo::prediction::Predictor::predictor_type ( )

get the predictor type

Returns
the predictor type

◆ SetEqualProbability()

void apollo::prediction::Predictor::SetEqualProbability ( const double  probability,
const int  start_index,
Obstacle obstacle_ptr 
)
protected

Set equal probability to prediction trajectories.

Parameters
probabilitytotal probability
start_indexThe start index to set equal probability
obstacle

◆ SupposedToStop()

bool apollo::prediction::Predictor::SupposedToStop ( const Feature &  feature,
const double  stop_distance,
double *  acceleration 
)
protected

Determine if an obstacle is supposed to stop within a distance.

Parameters
Thelatest feature of obstacle
Thedistance to stop
Theoutput param of acceleration
Returns
If the obstacle is supposed to stop within a distance

◆ TrimTrajectories()

void apollo::prediction::Predictor::TrimTrajectories ( const ADCTrajectoryContainer adc_trajectory_container,
Obstacle obstacle 
)

Trim prediction trajectories by adc trajectory.

Parameters
ADCtrajectory container
obstacle

◆ TrimTrajectory()

bool apollo::prediction::Predictor::TrimTrajectory ( const ADCTrajectoryContainer adc_trajectory_container,
Obstacle obstacle,
Trajectory *  trajectory 
)
protected

Trim a single prediction trajectory, keep the portion that is not in junction.

Parameters
adc_segmentstrajectory segments of ADC trajectory
obstacle
trajectoryThe trimed prediction trajectory
Returns
If the prediction trajectory is trimed

Member Data Documentation

◆ predictor_type_

ObstacleConf::PredictorType apollo::prediction::Predictor::predictor_type_
protected

The documentation for this class was generated from the following file: