CARLA
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
carla::client::Junction Class Reference

#include <Junction.h>

+ Inheritance diagram for carla::client::Junction:

Public Member Functions

std::vector< SharedPtr< Road > > GetAdjacentRoads () const
 The roads outside the junction that meet it.
 
geom::BoundingBox GetBoundingBox () const
 
std::vector< SharedPtr< Road > > GetConnectingRoads () const
 The roads inside the junction, carrying traffic through it.
 
std::vector< SharedPtr< Lane > > GetEntryLanes (road::Lane::LaneType type=road::Lane::LaneType::Driving) const
 Lanes on the adjacent roads that feed into the junction.
 
std::vector< SharedPtr< Waypoint > > GetEntryWaypoints (road::Lane::LaneType type=road::Lane::LaneType::Driving) const
 One waypoint per entry lane, on the adjacent road where it meets the junction.
 
std::vector< SharedPtr< Lane > > GetExitLanes (road::Lane::LaneType type=road::Lane::LaneType::Driving) const
 Lanes on the adjacent roads that the junction feeds into.
 
std::vector< SharedPtr< Waypoint > > GetExitWaypoints (road::Lane::LaneType type=road::Lane::LaneType::Driving) const
 One waypoint per exit lane, on the adjacent road where it leaves the junction.
 
carla::road::JuncId GetId () const
 
std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > GetWaypoints (road::Lane::LaneType type=road::Lane::LaneType::Driving) const
 

Private Member Functions

std::vector< SharedPtr< Lane > > GetNeighbourLanes (road::Lane::LaneType type, bool entering) const
 Shared implementation of GetEntryLanes / GetExitLanes.
 
std::vector< SharedPtr< Waypoint > > GetNeighbourWaypoints (road::Lane::LaneType type, bool entering) const
 Shared implementation of GetEntryWaypoints / GetExitWaypoints.
 
 Junction (SharedPtr< const Map > parent, const road::Junction *junction)
 
- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyable & operator= (const NonCopyable &)=delete
 
NonCopyable & operator= (NonCopyable &&)=delete
 

Private Attributes

geom::BoundingBox _bounding_box
 
road::JuncId _id
 
SharedPtr< const Map > _parent
 

Friends

class Map
 

Detailed Description

Definition at line 25 of file client/Junction.h.

Constructor & Destructor Documentation

◆ Junction()

carla::client::Junction::Junction ( SharedPtr< const Map >  parent,
const road::Junction *  junction 
)
private

Definition at line 19 of file Junction.cpp.

References _bounding_box, _id, and junction.

Member Function Documentation

◆ GetAdjacentRoads()

std::vector< SharedPtr< Road > > carla::client::Junction::GetAdjacentRoads ( ) const

The roads outside the junction that meet it.

OpenDRIVE calls these "incoming", but a road has no inherent direction – the same road is an exit for traffic going the other way – so they are adjacent here.

Definition at line 53 of file Junction.cpp.

References _id, _parent, junction, road, and road_id.

◆ GetBoundingBox()

geom::BoundingBox carla::client::Junction::GetBoundingBox ( ) const

Definition at line 29 of file Junction.cpp.

References _bounding_box.

◆ GetConnectingRoads()

std::vector< SharedPtr< Road > > carla::client::Junction::GetConnectingRoads ( ) const

The roads inside the junction, carrying traffic through it.

This is OpenDRIVE's "connecting road"; the name is kept so the API agrees with the .xodr.

Definition at line 33 of file Junction.cpp.

References _id, _parent, junction, road, and road_id.

◆ GetEntryLanes()

std::vector< SharedPtr< Lane > > carla::client::Junction::GetEntryLanes ( road::Lane::LaneType  type = road::Lane::LaneType::Driving) const

Lanes on the adjacent roads that feed into the junction.

Definition at line 111 of file Junction.cpp.

References GetNeighbourLanes().

◆ GetEntryWaypoints()

std::vector< SharedPtr< Waypoint > > carla::client::Junction::GetEntryWaypoints ( road::Lane::LaneType  type = road::Lane::LaneType::Driving) const

One waypoint per entry lane, on the adjacent road where it meets the junction.

Outside the junction, like GetEntryLanes(); for the waypoints on the connecting roads inside it, use GetWaypoints().

Definition at line 150 of file Junction.cpp.

References GetNeighbourWaypoints().

◆ GetExitLanes()

std::vector< SharedPtr< Lane > > carla::client::Junction::GetExitLanes ( road::Lane::LaneType  type = road::Lane::LaneType::Driving) const

Lanes on the adjacent roads that the junction feeds into.

Definition at line 115 of file Junction.cpp.

References GetNeighbourLanes().

◆ GetExitWaypoints()

std::vector< SharedPtr< Waypoint > > carla::client::Junction::GetExitWaypoints ( road::Lane::LaneType  type = road::Lane::LaneType::Driving) const

One waypoint per exit lane, on the adjacent road where it leaves the junction.

Definition at line 154 of file Junction.cpp.

References GetNeighbourWaypoints().

◆ GetId()

carla::road::JuncId carla::client::Junction::GetId ( ) const
inline

Definition at line 31 of file client/Junction.h.

References _id.

Referenced by GetWaypoints().

◆ GetNeighbourLanes()

std::vector< SharedPtr< Lane > > carla::client::Junction::GetNeighbourLanes ( road::Lane::LaneType  type,
bool  entering 
) const
private

Shared implementation of GetEntryLanes / GetExitLanes.

Definition at line 78 of file Junction.cpp.

References _id, GetWaypoints(), and road.

Referenced by GetEntryLanes(), GetExitLanes(), and GetNeighbourWaypoints().

◆ GetNeighbourWaypoints()

std::vector< SharedPtr< Waypoint > > carla::client::Junction::GetNeighbourWaypoints ( road::Lane::LaneType  type,
bool  entering 
) const
private

Shared implementation of GetEntryWaypoints / GetExitWaypoints.

Definition at line 137 of file Junction.cpp.

References GetNeighbourLanes(), and carla::client::JunctionSideDistance().

Referenced by GetEntryWaypoints(), and GetExitWaypoints().

◆ GetWaypoints()

std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > carla::client::Junction::GetWaypoints ( road::Lane::LaneType  type = road::Lane::LaneType::Driving) const

Definition at line 24 of file Junction.cpp.

References _parent, and GetId().

Referenced by GetNeighbourLanes().

Friends And Related Symbol Documentation

◆ Map

friend class Map
friend

Definition at line 71 of file client/Junction.h.

Member Data Documentation

◆ _bounding_box

geom::BoundingBox carla::client::Junction::_bounding_box
private

Definition at line 87 of file client/Junction.h.

Referenced by GetBoundingBox(), and Junction().

◆ _id

road::JuncId carla::client::Junction::_id
private

◆ _parent

SharedPtr<const Map> carla::client::Junction::_parent
private

Definition at line 85 of file client/Junction.h.

Referenced by GetAdjacentRoads(), GetConnectingRoads(), and GetWaypoints().


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