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

#include <obstacle_clusters.h>

Collaboration diagram for apollo::prediction::ObstacleClusters:
Collaboration graph

Public Member Functions

 ObstacleClusters ()=default
 Constructor. More...
 
void Init ()
 Remove all lane graphs. More...
 
LaneGraph GetLaneGraph (const double start_s, const double length, const bool consider_lane_split, std::shared_ptr< const apollo::hdmap::LaneInfo > lane_info_ptr)
 Obtain a lane graph given a lane info and s. More...
 
LaneGraph GetLaneGraphWithoutMemorizing (const double start_s, const double length, const bool is_on_lane, std::shared_ptr< const apollo::hdmap::LaneInfo > lane_info_ptr)
 Obtain a lane graph given a lane info and s, but don't memorize it. More...
 
bool ForwardNearbyObstacle (const LaneSequence &lane_sequence, const double s, LaneObstacle *const lane_obstacle)
 Get the nearest obstacle on lane sequence at s. More...
 
void AddObstacle (const int obstacle_id, const std::string &lane_id, const double lane_s, const double lane_l)
 Add an obstacle into clusters. More...
 
void SortObstacles ()
 Sort lane obstacles by lane s. More...
 
bool ForwardNearbyObstacle (const LaneSequence &lane_sequence, const int obstacle_id, const double obstacle_s, const double obstacle_l, NearbyObstacle *const nearby_obstacle_ptr)
 Get the forward nearest obstacle on lane sequence at s. More...
 
bool BackwardNearbyObstacle (const LaneSequence &lane_sequence, const int obstacle_id, const double obstacle_s, const double obstacle_l, NearbyObstacle *const nearby_obstacle_ptr)
 Get the backward nearest obstacle on lane sequence at s. More...
 
StopSign QueryStopSignByLaneId (const std::string &lane_id)
 Query stop sign by lane ID. More...
 
std::unordered_map< std::string, std::vector< LaneObstacle > > & GetLaneObstacles ()
 

Constructor & Destructor Documentation

◆ ObstacleClusters()

apollo::prediction::ObstacleClusters::ObstacleClusters ( )
default

Constructor.

Member Function Documentation

◆ AddObstacle()

void apollo::prediction::ObstacleClusters::AddObstacle ( const int  obstacle_id,
const std::string &  lane_id,
const double  lane_s,
const double  lane_l 
)

Add an obstacle into clusters.

Parameters
obstacleid
laneid
lanes
lanel

◆ BackwardNearbyObstacle()

bool apollo::prediction::ObstacleClusters::BackwardNearbyObstacle ( const LaneSequence &  lane_sequence,
const int  obstacle_id,
const double  obstacle_s,
const double  obstacle_l,
NearbyObstacle *const  nearby_obstacle_ptr 
)

Get the backward nearest obstacle on lane sequence at s.

Parameters
Lanesequence
soffset in the first lane of the lane sequence
theforward obstacle on lane
Returns
If the backward obstacle is found

◆ ForwardNearbyObstacle() [1/2]

bool apollo::prediction::ObstacleClusters::ForwardNearbyObstacle ( const LaneSequence &  lane_sequence,
const double  s,
LaneObstacle *const  lane_obstacle 
)

Get the nearest obstacle on lane sequence at s.

Parameters
Lanesequence
soffset in the first lane of the lane sequence
theforward obstacle on lane
Returns
If the forward obstacle is found

◆ ForwardNearbyObstacle() [2/2]

bool apollo::prediction::ObstacleClusters::ForwardNearbyObstacle ( const LaneSequence &  lane_sequence,
const int  obstacle_id,
const double  obstacle_s,
const double  obstacle_l,
NearbyObstacle *const  nearby_obstacle_ptr 
)

Get the forward nearest obstacle on lane sequence at s.

Parameters
Lanesequence
soffset in the first lane of the lane sequence
theforward obstacle on lane
Returns
If the forward obstacle is found

◆ GetLaneGraph()

LaneGraph apollo::prediction::ObstacleClusters::GetLaneGraph ( const double  start_s,
const double  length,
const bool  consider_lane_split,
std::shared_ptr< const apollo::hdmap::LaneInfo lane_info_ptr 
)

Obtain a lane graph given a lane info and s.

Parameters
lanestart s
lanetotal length
ifconsider lane split ahead
laneinfo
Returns
a corresponding lane graph

◆ GetLaneGraphWithoutMemorizing()

LaneGraph apollo::prediction::ObstacleClusters::GetLaneGraphWithoutMemorizing ( const double  start_s,
const double  length,
const bool  is_on_lane,
std::shared_ptr< const apollo::hdmap::LaneInfo lane_info_ptr 
)

Obtain a lane graph given a lane info and s, but don't memorize it.

Parameters
lanestart s
lanetotal length
ifthe obstacle is on lane
laneinfo
Returns
a corresponding lane graph

◆ GetLaneObstacles()

std::unordered_map<std::string, std::vector<LaneObstacle> >& apollo::prediction::ObstacleClusters::GetLaneObstacles ( )
inline

◆ Init()

void apollo::prediction::ObstacleClusters::Init ( )

Remove all lane graphs.

◆ QueryStopSignByLaneId()

StopSign apollo::prediction::ObstacleClusters::QueryStopSignByLaneId ( const std::string &  lane_id)

Query stop sign by lane ID.

Parameters
laneID
Returns
the stop sign

◆ SortObstacles()

void apollo::prediction::ObstacleClusters::SortObstacles ( )

Sort lane obstacles by lane s.


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