ad_map_access
Public Member Functions | Static Public Member Functions | List of all members
ad::map::intersection::Intersection Class Reference

Logical representation of an intersection along the route. More...

#include <ad/map/intersection/Intersection.hpp>

Inheritance diagram for ad::map::intersection::Intersection:
Inheritance graph
[legend]
Collaboration diagram for ad::map::intersection::Intersection:
Collaboration graph
[legend]

Public Member Functions

IntersectionType intersectionType () const
 
TurnDirection turnDirection () const
 
const landmark::LandmarkIdSetapplicableTrafficLights () const
 return all traffic lights that are relevant for following the route
 
const lane::LaneIdSet & lanesOnRoute () const
 
const point::ParaPointListparaPointsOnRoute () const
 
const lane::LaneIdSet & incomingLanesOnRoute () const
 
const lane::LaneIdSet & outgoingLanesOnRoute () const
 
const point::ParaPointListincomingParaPointsOnRoute () const
 
const point::ParaPointListoutgoingParaPointsOnRoute () const
 
const point::ParaPointListoutgoingParaPoints () const
 
const lane::LaneIdSet & internalLanesWithHigherPriority () const
 
const lane::LaneIdSet & internalLanesWithLowerPriority () const
 
const lane::LaneIdSet & incomingLanes () const
 
const lane::LaneIdSet & outgoingLanes () const
 
const lane::LaneIdSet & incomingLanesWithLowerPriority () const
 
const lane::LaneIdSet & incomingLanesWithHigherPriority () const
 
const point::ParaPointListincomingParaPoints () const
 
const point::ParaPointListincomingParaPointsWithHigherPriority () const
 
const point::ParaPointListincomingParaPointsWithLowerPriority () const
 
const lane::LaneIdSet & crossingLanes () const
 
route::RoutePlanningCounter getRoutePlanningCounter () const
 
route::SegmentCounter getRouteSegmentCountFromDestination () const
 
void updateRouteCounters (route::RoutePlanningCounter newRoutePlanningCounter, route::SegmentCounter newRouteSegmentCounter)
 update the route counters according to new route
 
route::RouteParaPoint getIntersectionStartOnRoute () const
 
physics::Distance objectInterpenetrationDistanceWithIntersection (match::Object const &object) const
 calculate and return the physics::Distance the object interpenetrates with the intersection More...
 
bool objectOnIncomingLane (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnIncomingLaneWithHigherPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnIncomingLaneWithLowerPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnInternalLaneWithHigherPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnInternalLaneWithLowerPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnLaneWithHigherPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnLaneWithLowerPriority (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnCrossingLane (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectOnIntersectionRoute (match::MapMatchedObjectBoundingBox const &object) const
 
bool objectRouteCrossesIntersectionRoute (route::FullRoute const &objectRoute) const
 
bool objectRouteFromSameArmAsIntersectionRoute (route::FullRoute const &objectRoute) const
 
bool objectRouteOppositeToIntersectionRoute (route::FullRoute const &objectRoute) const
 
bool objectRouteCrossesLanesWithHigherPriority (route::FullRoute const &objectRoute) const
 
physics::Speed getSpeedLimit () const
 return the speed limit of this intersection
 
bool onlySolidTrafficLightsOnRoute ()
 checks if there is just solid traffic lights on the intersection entry. More...
 
- Public Member Functions inherited from ad::map::intersection::CoreIntersection
bool objectRouteCrossesIntersection (route::FullRoute const &objectRoute) const
 
physics::Distance objectDistanceToIntersection (match::Object const &object) const
 calculate and return the physics::Distance of the object to the intersection
 
bool objectWithinIntersection (match::MapMatchedObjectBoundingBox const &object) const
 
const lane::LaneIdSet & internalLanes () const
 
const lane::LaneIdSet & entryLanes () const
 
const point::ParaPointListentryParaPoints () const
 
const lane::LaneIdSet & exitLanes () const
 
const point::ParaPointListexitParaPoints () const
 
const point::BoundingSpheregetBoundingSphere () const
 

Static Public Member Functions

static IntersectionPtr getIntersectionForRoadSegment (route::RouteIterator const &routeIterator)
 retrieve the intersection for the given routeIterator More...
 
static std::vector< IntersectionPtrgetIntersectionsForRoute (route::FullRoute const &route)
 retrieve all intersections for the given route More...
 
static IntersectionPtr getNextIntersectionOnRoute (route::FullRoute const &route)
 retrieve the next intersection for the given route More...
 
- Static Public Member Functions inherited from ad::map::intersection::CoreIntersection
static bool isLanePartOfAnIntersection (lane::LaneId const laneId)
 check if a lane is part of any intersection
 
static bool isRoutePartOfAnIntersection (route::FullRoute const &route)
 check if any lane in the route is part of any intersection More...
 
static bool isIntersectionOnRoute (route::FullRoute const &route)
 check if there is an intersection for the given route More...
 
static bool isRoadSegmentEnteringIntersection (route::RouteIterator const &routeIterator, route::RoadSegmentList::const_iterator &routePreviousSegmentIter)
 check if the road segment enters an intersection More...
 
static CoreIntersectionPtr getCoreIntersectionFor (lane::LaneId const &laneId)
 retrieve the core intersection for the given laneId More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsFor (lane::LaneIdSet const &laneIds)
 retrieve all CoreIntersection objects for the given lane Ids More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsFor (lane::LaneIdList const &laneIds)
 retrieve all CoreIntersection objects for the given lane Ids More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsForMap ()
 retrieve all CoreIntersection objects of the map More...
 
static CoreIntersectionPtr getCoreIntersectionFor (match::MapMatchedPosition const &mapMatchedPosition)
 retrieve the core intersection for the given mapMatchedPosition More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsForInLaneMatches (point::ENUPoint const &position)
 retrieve the core intersection for the given ENU position More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsForInLaneMatches (match::MapMatchedPositionConfidenceList const &mapMatchedPositionConfidenceList)
 retrieve the core intersection for the given mapMatchedPositionConfidenceList More...
 
static std::vector< CoreIntersectionPtrgetCoreIntersectionsForInLaneMatches (match::MapMatchedObjectBoundingBox const &object)
 retrieve the core intersection for the given object More...
 

Additional Inherited Members

- Protected Types inherited from ad::map::intersection::CoreIntersection
enum  SuccessorMode { OwnIntersection, AnyIntersection }
 
- Protected Member Functions inherited from ad::map::intersection::CoreIntersection
bool isLanePartOfCoreIntersection (lane::LaneId const laneId) const
 check if given lane is inside the intersection
 
void extractLanesOfCoreIntersection (lane::LaneId const laneId)
 
bool isLanePartOfIntersection (lane::LaneId const laneId, SuccessorMode const successorMode) const
 
std::pair< lane::LaneIdSet, lane::LaneIdSet > getDirectSuccessorsInLaneDirection (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the direct successor lane segments in lane direction within and outside of the intersection. More...
 
lane::LaneIdSet getDirectSuccessorsInLaneDirectionWithinIntersection (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the direct successor lane segments in lane direction within the intersection. More...
 
lane::LaneIdSet getAllSuccessorsInLaneDirectionWithinIntersection (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the successor lane segments in lane direction within the intersection recursively until the intersection is left. More...
 
lane::LaneIdSet getLaneAndAllSuccessorsInLaneDirectionWithinIntersection (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the successor lane segments in lane direction within the intersection recursively until the intersection is left including the input laneId if part of the inner lanes. More...
 
lane::LaneIdSet getAllReachableOutgoingLanes (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the outgoing lane segments that are reachable in lane direction. More...
 
std::pair< lane::LaneIdSet, lane::LaneIdSet > getAllReachableInternalAndOutgoingLanes (lane::LaneId const laneId, SuccessorMode const successorMode) const
 Provide the outgoing lane segments that are reachable in lane direction as well as the intersection internal lanes. More...
 
point::ParaPoint getEntryParaPointOfExternalLane (lane::LaneId const &laneId) const
 
point::ParaPoint getExitParaPointOfExternalLane (lane::LaneId const &laneId) const
 
point::ParaPoint getEntryParaPointOfInternalLane (lane::LaneId const &laneId) const
 
point::ParaPoint getExitParaPointOfInternalLane (lane::LaneId const &laneId) const
 
- Protected Attributes inherited from ad::map::intersection::CoreIntersection
lane::LaneIdSet mInternalLanes {}
 all lanes inside the intersection
 
lane::LaneIdSet mEntryLanes {}
 lanes going into the intersection
 
point::ParaPointList mEntryParaPoints {}
 lanes going into the intersection represented as ParaPoint
 
lane::LaneIdSet mExitLanes {}
 lanes going out of the intersection
 
point::ParaPointList mExitParaPoints {}
 lanes going out of the intersection represented as ParaPoint
 
std::map< lane::LaneId, lane::LaneIdSet > mOverlapping
 
std::map< lane::LaneId, lane::LaneIdSet > mSuccessor
 
std::map< lane::LaneId, lane::LaneIdSet > mPredecessor
 
point::BoundingSphere mInternalLanesBoundingSphere
 

Detailed Description

Logical representation of an intersection along the route.

There is no public constructor but the static method getIntersectionForRoadSegment which creates an Intersection for a specific road segment of a route and the static method getIntersectionsForRoute which extracts all intersections along the given route. The returned intersections provide the following information:

Member Function Documentation

◆ crossingLanes()

const lane::LaneIdSet& ad::map::intersection::Intersection::crossingLanes ( ) const
Returns
all lanes that cross the lanes of the route (in this intersection)

◆ getIntersectionForRoadSegment()

static IntersectionPtr ad::map::intersection::Intersection::getIntersectionForRoadSegment ( route::RouteIterator const &  routeIterator)
static

retrieve the intersection for the given routeIterator

Parameters
[in]routeIteratorthe route iterator of the road segment
Returns
If the route iterator refers to a road segment which is part of an intersection and the preceeding road segment within the route is not part of an intersection, an Intersection object for this specific route through the intersection is created and returned.

◆ getIntersectionsForRoute()

static std::vector<IntersectionPtr> ad::map::intersection::Intersection::getIntersectionsForRoute ( route::FullRoute const &  route)
static

retrieve all intersections for the given route

Parameters
[in]routeplanned route
Returns
list of all intersections along the route, see getIntersectionForRoadSegment() for details.

◆ getIntersectionStartOnRoute()

route::RouteParaPoint ad::map::intersection::Intersection::getIntersectionStartOnRoute ( ) const
Returns
the route para point this intersection start

That point marks the start of the intersection on the route.

◆ getNextIntersectionOnRoute()

static IntersectionPtr ad::map::intersection::Intersection::getNextIntersectionOnRoute ( route::FullRoute const &  route)
static

retrieve the next intersection for the given route

Parameters
[in]routeplanned route
Returns
If there is an intersection within the route, an Intersection object for the first intersection on the specific route through the intersection is created and returned.

◆ getRoutePlanningCounter()

route::RoutePlanningCounter ad::map::intersection::Intersection::getRoutePlanningCounter ( ) const
Returns
the route planning counter of the route used to create this intersection

◆ getRouteSegmentCountFromDestination()

route::SegmentCounter ad::map::intersection::Intersection::getRouteSegmentCountFromDestination ( ) const
Returns
the route segment counter of the road segment this intersection was created

◆ incomingLanes()

const lane::LaneIdSet& ad::map::intersection::Intersection::incomingLanes ( ) const
Returns
all lanes that lead into the intersection (except the lanes on the route leading into the intersection)

◆ incomingLanesOnRoute()

const lane::LaneIdSet& ad::map::intersection::Intersection::incomingLanesOnRoute ( ) const
Returns
all lanes that enter intersection on the route

◆ incomingLanesWithHigherPriority()

const lane::LaneIdSet& ad::map::intersection::Intersection::incomingLanesWithHigherPriority ( ) const
Returns
all lanes that lead into the intersection with higher priority (except the lanes on the route leading into the intersection)

◆ incomingLanesWithLowerPriority()

const lane::LaneIdSet& ad::map::intersection::Intersection::incomingLanesWithLowerPriority ( ) const
Returns
all lanes that lead into the intersection with lower priority (except the lanes on the route leading into the intersection)

◆ incomingParaPoints()

const point::ParaPointList& ad::map::intersection::Intersection::incomingParaPoints ( ) const
Returns
the border points of all lanes that lead into the intersection (incomingLanes() as ParaPoint's)

◆ incomingParaPointsOnRoute()

const point::ParaPointList& ad::map::intersection::Intersection::incomingParaPointsOnRoute ( ) const
Returns
all lanes that enter intersection on the route

◆ incomingParaPointsWithHigherPriority()

const point::ParaPointList& ad::map::intersection::Intersection::incomingParaPointsWithHigherPriority ( ) const
Returns
the border points of all lanes that lead into the intersection and have higher priority

◆ incomingParaPointsWithLowerPriority()

const point::ParaPointList& ad::map::intersection::Intersection::incomingParaPointsWithLowerPriority ( ) const
Returns
the border points of all lanes that lead into the intersection and have lower priority

◆ internalLanesWithHigherPriority()

const lane::LaneIdSet& ad::map::intersection::Intersection::internalLanesWithHigherPriority ( ) const
Returns
all lanes that are inside the intersection and have higher priority (subset of internalLanes)

◆ internalLanesWithLowerPriority()

const lane::LaneIdSet& ad::map::intersection::Intersection::internalLanesWithLowerPriority ( ) const
Returns
all lanes that are inside the intersection and have lower priority (subset of internalLanes)

◆ intersectionType()

IntersectionType ad::map::intersection::Intersection::intersectionType ( ) const
Returns
the type of this intersection

◆ lanesOnRoute()

const lane::LaneIdSet& ad::map::intersection::Intersection::lanesOnRoute ( ) const
Returns
all lanes along the route within the intersection

◆ objectInterpenetrationDistanceWithIntersection()

physics::Distance ad::map::intersection::Intersection::objectInterpenetrationDistanceWithIntersection ( match::Object const &  object) const

calculate and return the physics::Distance the object interpenetrates with the intersection

If the object is not within the intersection: result == 0. If the object is partly within the intersection: 0. < result < object length If the object is fully within the intersection: result == object length If the object is touching incoming/outgoing lanes of different intersection arms at the same time: result == object length

◆ objectOnCrossingLane()

bool ad::map::intersection::Intersection::objectOnCrossingLane ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the crossing lanes

◆ objectOnIncomingLane()

bool ad::map::intersection::Intersection::objectOnIncomingLane ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the incoming lanes

◆ objectOnIncomingLaneWithHigherPriority()

bool ad::map::intersection::Intersection::objectOnIncomingLaneWithHigherPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the incoming lanes with higher priority

◆ objectOnIncomingLaneWithLowerPriority()

bool ad::map::intersection::Intersection::objectOnIncomingLaneWithLowerPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the incoming lanes with lower priority

◆ objectOnInternalLaneWithHigherPriority()

bool ad::map::intersection::Intersection::objectOnInternalLaneWithHigherPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the internal lanes with higher priority

◆ objectOnInternalLaneWithLowerPriority()

bool ad::map::intersection::Intersection::objectOnInternalLaneWithLowerPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the internal lanes with lower priority

◆ objectOnIntersectionRoute()

bool ad::map::intersection::Intersection::objectOnIntersectionRoute ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches the route of the intersection

◆ objectOnLaneWithHigherPriority()

bool ad::map::intersection::Intersection::objectOnLaneWithHigherPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the incoming or internal lanes with higher priority

◆ objectOnLaneWithLowerPriority()

bool ad::map::intersection::Intersection::objectOnLaneWithLowerPriority ( match::MapMatchedObjectBoundingBox const &  object) const
Returns
true if the object touches one of the incoming or internal lanes with lower priority

◆ objectRouteCrossesIntersectionRoute()

bool ad::map::intersection::Intersection::objectRouteCrossesIntersectionRoute ( route::FullRoute const &  objectRoute) const
Returns
true if the provided objectRoute crosses the route of the intersection

This is the case if one of the crossingLanes() is part of the objectRoute.

◆ objectRouteCrossesLanesWithHigherPriority()

bool ad::map::intersection::Intersection::objectRouteCrossesLanesWithHigherPriority ( route::FullRoute const &  objectRoute) const
Returns
true if the provided objectRoute crosses a internal lane with higher priority

This is the case if one of the internalLanesWithHigherPriority() is part of the objectRoute.

◆ objectRouteFromSameArmAsIntersectionRoute()

bool ad::map::intersection::Intersection::objectRouteFromSameArmAsIntersectionRoute ( route::FullRoute const &  objectRoute) const
Returns
true if the beginning of the provided objectRoute is coming from the same arm as the intersection route

This means the object is driving from same direction through the intersection.

◆ objectRouteOppositeToIntersectionRoute()

bool ad::map::intersection::Intersection::objectRouteOppositeToIntersectionRoute ( route::FullRoute const &  objectRoute) const
Returns
true if the beginning of the provided objectRoute is coming from the same arm where the intersection route exits and leaves the intersection from the same arm the intersection route enters.

This means the object is driving from exactly the opposite direction through the intersection.

◆ onlySolidTrafficLightsOnRoute()

bool ad::map::intersection::Intersection::onlySolidTrafficLightsOnRoute ( )

checks if there is just solid traffic lights on the intersection entry.

Returns
true just if solid traffic lights are found

◆ outgoingLanes()

const lane::LaneIdSet& ad::map::intersection::Intersection::outgoingLanes ( ) const
Returns
all lanes that lead out from the intersection

◆ outgoingLanesOnRoute()

const lane::LaneIdSet& ad::map::intersection::Intersection::outgoingLanesOnRoute ( ) const
Returns
all lanes that leave the intersection on the route

◆ outgoingParaPoints()

const point::ParaPointList& ad::map::intersection::Intersection::outgoingParaPoints ( ) const
Returns
the border points of all lanes that exit the intersection

◆ outgoingParaPointsOnRoute()

const point::ParaPointList& ad::map::intersection::Intersection::outgoingParaPointsOnRoute ( ) const
Returns
the border points of all lanes that exit the intersection on the route

◆ paraPointsOnRoute()

const point::ParaPointList& ad::map::intersection::Intersection::paraPointsOnRoute ( ) const
Returns
all parametric points along the route within the intersection

◆ turnDirection()

TurnDirection ad::map::intersection::Intersection::turnDirection ( ) const
Returns
the turn direction of the ego route within this intersection

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