Apollo  6.0
Open source self driving car software
Public Member Functions | Static Public Member Functions | List of all members
apollo::prediction::Obstacle Class Reference

Prediction obstacle. More...

#include <obstacle.h>

Collaboration diagram for apollo::prediction::Obstacle:
Collaboration graph

Public Member Functions

 Obstacle ()=default
 
virtual ~Obstacle ()=default
 Destructor. More...
 
void SetJunctionAnalyzer (JunctionAnalyzer *junction_analyzer)
 
bool Insert (const perception::PerceptionObstacle &perception_obstacle, const double timestamp, const int prediction_id)
 Insert a perception obstacle with its timestamp. More...
 
bool InsertFeature (const Feature &feature)
 Insert a feature proto message. More...
 
void ClearOldInformation ()
 
void TrimHistory (const size_t remain_size)
 
perception::PerceptionObstacle::Type type () const
 Get the type of perception obstacle's type. More...
 
bool IsPedestrian () const
 
int id () const
 Get the obstacle's ID. More...
 
double timestamp () const
 Get the obstacle's timestamp. More...
 
bool ReceivedOlderMessage (const double timestamp) const
 
const Feature & feature (const size_t i) const
 Get the ith feature from latest to earliest. More...
 
Feature * mutable_feature (const size_t i)
 Get a pointer to the ith feature from latest to earliest. More...
 
const Feature & latest_feature () const
 Get the latest feature. More...
 
const Feature & earliest_feature () const
 Get the earliest feature. More...
 
Feature * mutable_latest_feature ()
 Get a pointer to the latest feature. More...
 
void SetNearbyObstacles ()
 Set nearby obstacles. More...
 
size_t history_size () const
 Get the number of historical features. More...
 
bool IsStill ()
 Check if the obstacle is still. More...
 
bool IsSlow ()
 Check if the obstacle is slow. More...
 
bool IsOnLane () const
 Check if the obstacle is on any lane. More...
 
bool ToIgnore ()
 Check if the obstacle can be ignored. More...
 
bool IsNearJunction ()
 Check if the obstacle is near a junction. More...
 
bool IsInJunction (const std::string &junction_id) const
 Check if the obstacle is a junction. More...
 
bool IsCloseToJunctionExit () const
 Check if the obstacle is close to a junction exit. More...
 
bool HasJunctionFeatureWithExits () const
 Check if the obstacle has junction feature. More...
 
void BuildJunctionFeature ()
 Build junction feature. More...
 
void BuildLaneGraph ()
 Build obstacle's lane graph. More...
 
void BuildLaneGraphFromLeftToRight ()
 Build obstacle's lane graph with lanes being ordered. This would be useful for lane-scanning algorithms. More...
 
void SetCaution ()
 Set the obstacle as caution level. More...
 
bool IsCaution () const
 
void SetEvaluatorType (const ObstacleConf::EvaluatorType &evaluator_type)
 
void SetPredictorType (const ObstacleConf::PredictorType &predictor_type)
 
const ObstacleConf & obstacle_conf ()
 
PredictionObstacle GeneratePredictionObstacle ()
 

Static Public Member Functions

static std::unique_ptr< ObstacleCreate (const perception::PerceptionObstacle &perception_obstacle, const double timestamp, const int prediction_id, ObstacleClusters *clusters_ptr)
 Constructor. More...
 
static std::unique_ptr< ObstacleCreate (const Feature &feature, ObstacleClusters *clusters_ptr)
 

Detailed Description

Prediction obstacle.

Constructor & Destructor Documentation

◆ Obstacle()

apollo::prediction::Obstacle::Obstacle ( )
default

◆ ~Obstacle()

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

Destructor.

Member Function Documentation

◆ BuildJunctionFeature()

void apollo::prediction::Obstacle::BuildJunctionFeature ( )

Build junction feature.

◆ BuildLaneGraph()

void apollo::prediction::Obstacle::BuildLaneGraph ( )

Build obstacle's lane graph.

◆ BuildLaneGraphFromLeftToRight()

void apollo::prediction::Obstacle::BuildLaneGraphFromLeftToRight ( )

Build obstacle's lane graph with lanes being ordered. This would be useful for lane-scanning algorithms.

◆ ClearOldInformation()

void apollo::prediction::Obstacle::ClearOldInformation ( )

◆ Create() [1/2]

static std::unique_ptr<Obstacle> apollo::prediction::Obstacle::Create ( const perception::PerceptionObstacle &  perception_obstacle,
const double  timestamp,
const int  prediction_id,
ObstacleClusters clusters_ptr 
)
static

Constructor.

◆ Create() [2/2]

static std::unique_ptr<Obstacle> apollo::prediction::Obstacle::Create ( const Feature &  feature,
ObstacleClusters clusters_ptr 
)
static

◆ earliest_feature()

const Feature& apollo::prediction::Obstacle::earliest_feature ( ) const

Get the earliest feature.

Returns
The earliest feature.

◆ feature()

const Feature& apollo::prediction::Obstacle::feature ( const size_t  i) const

Get the ith feature from latest to earliest.

Parameters
iThe index of the feature.
Returns
The ith feature.

◆ GeneratePredictionObstacle()

PredictionObstacle apollo::prediction::Obstacle::GeneratePredictionObstacle ( )

◆ HasJunctionFeatureWithExits()

bool apollo::prediction::Obstacle::HasJunctionFeatureWithExits ( ) const

Check if the obstacle has junction feature.

Returns
If the obstacle has junction feature.

◆ history_size()

size_t apollo::prediction::Obstacle::history_size ( ) const

Get the number of historical features.

Returns
The number of historical features.

◆ id()

int apollo::prediction::Obstacle::id ( ) const

Get the obstacle's ID.

Returns
The obstacle's ID.

◆ Insert()

bool apollo::prediction::Obstacle::Insert ( const perception::PerceptionObstacle &  perception_obstacle,
const double  timestamp,
const int  prediction_id 
)

Insert a perception obstacle with its timestamp.

Parameters
perception_obstacleThe obstacle from perception.
timestampThe timestamp when the perception obstacle was detected.

◆ InsertFeature()

bool apollo::prediction::Obstacle::InsertFeature ( const Feature &  feature)

Insert a feature proto message.

Parameters
featureproto message.

◆ IsCaution()

bool apollo::prediction::Obstacle::IsCaution ( ) const

◆ IsCloseToJunctionExit()

bool apollo::prediction::Obstacle::IsCloseToJunctionExit ( ) const

Check if the obstacle is close to a junction exit.

Returns
If the obstacle is closed to a junction exit.

◆ IsInJunction()

bool apollo::prediction::Obstacle::IsInJunction ( const std::string &  junction_id) const

Check if the obstacle is a junction.

Parameters
junctionID
Returns
If the obstacle is in a junction.

◆ IsNearJunction()

bool apollo::prediction::Obstacle::IsNearJunction ( )

Check if the obstacle is near a junction.

Returns
If the obstacle is near a junction.

◆ IsOnLane()

bool apollo::prediction::Obstacle::IsOnLane ( ) const

Check if the obstacle is on any lane.

Returns
If the obstacle is on any lane.

◆ IsPedestrian()

bool apollo::prediction::Obstacle::IsPedestrian ( ) const

◆ IsSlow()

bool apollo::prediction::Obstacle::IsSlow ( )

Check if the obstacle is slow.

Returns
If the obstacle is slow.

◆ IsStill()

bool apollo::prediction::Obstacle::IsStill ( )

Check if the obstacle is still.

Returns
If the obstacle is still.

◆ latest_feature()

const Feature& apollo::prediction::Obstacle::latest_feature ( ) const

Get the latest feature.

Returns
The latest feature.

◆ mutable_feature()

Feature* apollo::prediction::Obstacle::mutable_feature ( const size_t  i)

Get a pointer to the ith feature from latest to earliest.

Parameters
iThe index of the feature.
Returns
A pointer to the ith feature.

◆ mutable_latest_feature()

Feature* apollo::prediction::Obstacle::mutable_latest_feature ( )

Get a pointer to the latest feature.

Returns
A pointer to the latest feature.

◆ obstacle_conf()

const ObstacleConf& apollo::prediction::Obstacle::obstacle_conf ( )
inline

◆ ReceivedOlderMessage()

bool apollo::prediction::Obstacle::ReceivedOlderMessage ( const double  timestamp) const

◆ SetCaution()

void apollo::prediction::Obstacle::SetCaution ( )

Set the obstacle as caution level.

◆ SetEvaluatorType()

void apollo::prediction::Obstacle::SetEvaluatorType ( const ObstacleConf::EvaluatorType &  evaluator_type)

◆ SetJunctionAnalyzer()

void apollo::prediction::Obstacle::SetJunctionAnalyzer ( JunctionAnalyzer junction_analyzer)
inline

◆ SetNearbyObstacles()

void apollo::prediction::Obstacle::SetNearbyObstacles ( )

Set nearby obstacles.

◆ SetPredictorType()

void apollo::prediction::Obstacle::SetPredictorType ( const ObstacleConf::PredictorType &  predictor_type)

◆ timestamp()

double apollo::prediction::Obstacle::timestamp ( ) const

Get the obstacle's timestamp.

Returns
The obstacle's timestamp.

◆ ToIgnore()

bool apollo::prediction::Obstacle::ToIgnore ( )

Check if the obstacle can be ignored.

Returns
If the obstacle can be ignored.

◆ TrimHistory()

void apollo::prediction::Obstacle::TrimHistory ( const size_t  remain_size)

◆ type()

perception::PerceptionObstacle::Type apollo::prediction::Obstacle::type ( ) const

Get the type of perception obstacle's type.

Returns
The type pf perception obstacle.

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