Apollo
6.0
Open source self driving car software
|
This is the class that associates an Obstacle with its path properties. An obstacle's path properties relative to a path. The s
and l
values are examples of path properties. The decision of an obstacle is also associated with a path.
More...
#include <obstacle.h>
Public Member Functions | |
Obstacle ()=default | |
Obstacle (const std::string &id, const perception::PerceptionObstacle &perception_obstacle, const prediction::ObstaclePriority::Priority &obstacle_priority, const bool is_static) | |
Obstacle (const std::string &id, const perception::PerceptionObstacle &perception_obstacle, const prediction::Trajectory &trajectory, const prediction::ObstaclePriority::Priority &obstacle_priority, const bool is_static) | |
const std::string & | Id () const |
void | SetId (const std::string &id) |
double | speed () const |
int32_t | PerceptionId () const |
bool | IsStatic () const |
bool | IsVirtual () const |
common::TrajectoryPoint | GetPointAtTime (const double time) const |
common::math::Box2d | GetBoundingBox (const common::TrajectoryPoint &point) const |
const common::math::Box2d & | PerceptionBoundingBox () const |
const common::math::Polygon2d & | PerceptionPolygon () const |
const prediction::Trajectory & | Trajectory () const |
common::TrajectoryPoint * | AddTrajectoryPoint () |
bool | HasTrajectory () const |
const perception::PerceptionObstacle & | Perception () const |
bool | IsCautionLevelObstacle () const |
const ObjectDecisionType & | LateralDecision () const |
const ObjectDecisionType & | LongitudinalDecision () const |
return the merged longitudinal decision Longitudinal decision is one of {Stop, Yield, Follow, Overtake, Ignore} More... | |
std::string | DebugString () const |
const SLBoundary & | PerceptionSLBoundary () const |
const STBoundary & | reference_line_st_boundary () const |
const STBoundary & | path_st_boundary () const |
const std::vector< std::string > & | decider_tags () const |
const std::vector< ObjectDecisionType > & | decisions () const |
void | AddLongitudinalDecision (const std::string &decider_tag, const ObjectDecisionType &decision) |
void | AddLateralDecision (const std::string &decider_tag, const ObjectDecisionType &decision) |
bool | HasLateralDecision () const |
void | set_path_st_boundary (const STBoundary &boundary) |
bool | is_path_st_boundary_initialized () |
void | SetStBoundaryType (const STBoundary::BoundaryType type) |
void | EraseStBoundary () |
void | SetReferenceLineStBoundary (const STBoundary &boundary) |
void | SetReferenceLineStBoundaryType (const STBoundary::BoundaryType type) |
void | EraseReferenceLineStBoundary () |
bool | HasLongitudinalDecision () const |
bool | HasNonIgnoreDecision () const |
double | MinRadiusStopDistance (const common::VehicleParam &vehicle_param) const |
Calculate stop distance with the obstacle using the ADC's minimum turning radius. More... | |
bool | IsIgnore () const |
Check if this object can be safely ignored. The object will be ignored if the lateral decision is ignore and the longitudinal decision is ignore return longitudinal_decision_ == ignore && lateral_decision == ignore. More... | |
bool | IsLongitudinalIgnore () const |
bool | IsLateralIgnore () const |
void | BuildReferenceLineStBoundary (const ReferenceLine &reference_line, const double adc_start_s) |
void | SetPerceptionSlBoundary (const SLBoundary &sl_boundary) |
void | SetBlockingObstacle (bool blocking) |
bool | IsBlockingObstacle () const |
bool | IsLaneBlocking () const |
void | CheckLaneBlocking (const ReferenceLine &reference_line) |
bool | IsLaneChangeBlocking () const |
void | SetLaneChangeBlocking (const bool is_distance_clear) |
Static Public Member Functions | |
static std::list< std::unique_ptr< Obstacle > > | CreateObstacles (const prediction::PredictionObstacles &predictions) |
This is a helper function that can create obstacles from prediction data. The original prediction may have multiple trajectories for each obstacle. But this function will create one obstacle for each trajectory. More... | |
static std::unique_ptr< Obstacle > | CreateStaticVirtualObstacles (const std::string &id, const common::math::Box2d &obstacle_box) |
static bool | IsValidPerceptionObstacle (const perception::PerceptionObstacle &obstacle) |
static bool | IsValidTrajectoryPoint (const common::TrajectoryPoint &point) |
static bool | IsLongitudinalDecision (const ObjectDecisionType &decision) |
check if an ObjectDecisionType is a longitudinal decision. More... | |
static bool | IsLateralDecision (const ObjectDecisionType &decision) |
check if an ObjectDecisionType is a lateral decision. More... | |
This is the class that associates an Obstacle with its path properties. An obstacle's path properties relative to a path. The s
and l
values are examples of path properties. The decision of an obstacle is also associated with a path.
The decisions have two categories: lateral decision and longitudinal decision. Lateral decision includes: nudge, ignore. Lateral decision safety priority: nudge > ignore. Longitudinal decision includes: stop, yield, follow, overtake, ignore. Decision safety priorities order: stop > yield >= follow > overtake > ignore
Ignore decision belongs to both lateral decision and longitudinal decision, and it has the lowest priority.
|
default |
apollo::planning::Obstacle::Obstacle | ( | const std::string & | id, |
const perception::PerceptionObstacle & | perception_obstacle, | ||
const prediction::ObstaclePriority::Priority & | obstacle_priority, | ||
const bool | is_static | ||
) |
apollo::planning::Obstacle::Obstacle | ( | const std::string & | id, |
const perception::PerceptionObstacle & | perception_obstacle, | ||
const prediction::Trajectory & | trajectory, | ||
const prediction::ObstaclePriority::Priority & | obstacle_priority, | ||
const bool | is_static | ||
) |
void apollo::planning::Obstacle::AddLateralDecision | ( | const std::string & | decider_tag, |
const ObjectDecisionType & | decision | ||
) |
void apollo::planning::Obstacle::AddLongitudinalDecision | ( | const std::string & | decider_tag, |
const ObjectDecisionType & | decision | ||
) |
|
inline |
void apollo::planning::Obstacle::BuildReferenceLineStBoundary | ( | const ReferenceLine & | reference_line, |
const double | adc_start_s | ||
) |
void apollo::planning::Obstacle::CheckLaneBlocking | ( | const ReferenceLine & | reference_line | ) |
|
static |
This is a helper function that can create obstacles from prediction data. The original prediction may have multiple trajectories for each obstacle. But this function will create one obstacle for each trajectory.
predictions | The prediction results |
|
static |
std::string apollo::planning::Obstacle::DebugString | ( | ) | const |
const std::vector<std::string>& apollo::planning::Obstacle::decider_tags | ( | ) | const |
const std::vector<ObjectDecisionType>& apollo::planning::Obstacle::decisions | ( | ) | const |
void apollo::planning::Obstacle::EraseReferenceLineStBoundary | ( | ) |
void apollo::planning::Obstacle::EraseStBoundary | ( | ) |
common::math::Box2d apollo::planning::Obstacle::GetBoundingBox | ( | const common::TrajectoryPoint & | point | ) | const |
common::TrajectoryPoint apollo::planning::Obstacle::GetPointAtTime | ( | const double | time | ) | const |
bool apollo::planning::Obstacle::HasLateralDecision | ( | ) | const |
bool apollo::planning::Obstacle::HasLongitudinalDecision | ( | ) | const |
bool apollo::planning::Obstacle::HasNonIgnoreDecision | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool apollo::planning::Obstacle::IsIgnore | ( | ) | const |
Check if this object can be safely ignored. The object will be ignored if the lateral decision is ignore and the longitudinal decision is ignore return longitudinal_decision_ == ignore && lateral_decision == ignore.
|
inline |
|
inline |
|
static |
check if an ObjectDecisionType is a lateral decision.
bool apollo::planning::Obstacle::IsLateralIgnore | ( | ) | const |
|
static |
check if an ObjectDecisionType is a longitudinal decision.
bool apollo::planning::Obstacle::IsLongitudinalIgnore | ( | ) | const |
|
inline |
|
static |
|
static |
|
inline |
const ObjectDecisionType& apollo::planning::Obstacle::LateralDecision | ( | ) | const |
return the merged lateral decision Lateral decision is one of {Nudge, Ignore}
const ObjectDecisionType& apollo::planning::Obstacle::LongitudinalDecision | ( | ) | const |
return the merged longitudinal decision Longitudinal decision is one of {Stop, Yield, Follow, Overtake, Ignore}
double apollo::planning::Obstacle::MinRadiusStopDistance | ( | const common::VehicleParam & | vehicle_param | ) | const |
Calculate stop distance with the obstacle using the ADC's minimum turning radius.
const STBoundary& apollo::planning::Obstacle::path_st_boundary | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
const SLBoundary& apollo::planning::Obstacle::PerceptionSLBoundary | ( | ) | const |
const STBoundary& apollo::planning::Obstacle::reference_line_st_boundary | ( | ) | const |
void apollo::planning::Obstacle::set_path_st_boundary | ( | const STBoundary & | boundary | ) |
|
inline |
|
inline |
void apollo::planning::Obstacle::SetLaneChangeBlocking | ( | const bool | is_distance_clear | ) |
void apollo::planning::Obstacle::SetPerceptionSlBoundary | ( | const SLBoundary & | sl_boundary | ) |
void apollo::planning::Obstacle::SetReferenceLineStBoundary | ( | const STBoundary & | boundary | ) |
void apollo::planning::Obstacle::SetReferenceLineStBoundaryType | ( | const STBoundary::BoundaryType | type | ) |
void apollo::planning::Obstacle::SetStBoundaryType | ( | const STBoundary::BoundaryType | type | ) |
|
inline |
|
inline |