CARLA
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
carla::client::Waypoint Class Reference

#include <Waypoint.h>

+ Inheritance diagram for carla::client::Waypoint:
+ Collaboration diagram for carla::client::Waypoint:

Public Member Functions

std::vector< SharedPtr< Landmark > > GetAllLandmarksInDistance (double distance, bool stop_at_junction=false) const
 Returns a list of landmarks from the current position to a certain distance. More...
 
auto GetDistance () const
 
uint64_t GetId () const
 Returns an unique Id identifying this waypoint. More...
 
SharedPtr< JunctionGetJunction () const
 
road::JuncId GetJunctionId () const
 
std::vector< SharedPtr< Landmark > > GetLandmarksOfTypeInDistance (double distance, std::string filter_type, bool stop_at_junction=false) const
 Returns a list of landmarks from the current position to a certain distance Filters by specified type. More...
 
road::element::LaneMarking::LaneChange GetLaneChange () const
 
auto GetLaneId () const
 
double GetLaneWidth () const
 
SharedPtr< WaypointGetLeft () const
 
boost::optional< road::element::LaneMarkingGetLeftLaneMarking () const
 
std::vector< SharedPtr< Waypoint > > GetNext (double distance) const
 
std::vector< SharedPtr< Waypoint > > GetNextUntilLaneEnd (double distance) const
 Returns a list of waypoints separated by distance from the current waypoint to the end of the lane. More...
 
std::vector< SharedPtr< Waypoint > > GetPrevious (double distance) const
 
std::vector< SharedPtr< Waypoint > > GetPreviousUntilLaneStart (double distance) const
 Returns a list of waypoints separated by distance from the current waypoint to the start of the lane. More...
 
SharedPtr< WaypointGetRight () const
 
boost::optional< road::element::LaneMarkingGetRightLaneMarking () const
 
auto GetRoadId () const
 
auto GetSectionId () const
 
const geom::TransformGetTransform () const
 
road::Lane::LaneType GetType () const
 
bool IsJunction () const
 
 ~Waypoint ()
 

Private Member Functions

 Waypoint (SharedPtr< const Map > parent, road::element::Waypoint waypoint)
 
- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Private Attributes

std::pair< const road::element::RoadInfoMarkRecord *, const road::element::RoadInfoMarkRecord * > _mark_record
 
SharedPtr< const Map_parent
 
geom::Transform _transform
 
road::element::Waypoint _waypoint
 

Friends

class Map
 

Detailed Description

Definition at line 27 of file client/Waypoint.h.

Constructor & Destructor Documentation

◆ ~Waypoint()

carla::client::Waypoint::~Waypoint ( )
default

Referenced by Waypoint().

+ Here is the caller graph for this function:

◆ Waypoint()

carla::client::Waypoint::Waypoint ( SharedPtr< const Map parent,
road::element::Waypoint  waypoint 
)
private

Definition at line 18 of file client/Waypoint.cpp.

References ~Waypoint().

Referenced by GetAllLandmarksInDistance(), GetLandmarksOfTypeInDistance(), GetLeft(), GetNext(), GetPrevious(), and GetRight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ GetAllLandmarksInDistance()

std::vector< SharedPtr< Landmark > > carla::client::Waypoint::GetAllLandmarksInDistance ( double  distance,
bool  stop_at_junction = false 
) const

Returns a list of landmarks from the current position to a certain distance.

Definition at line 218 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by carla::client::World::GetTrafficLightsFromWaypoint(), and GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDistance()

auto carla::client::Waypoint::GetDistance ( ) const
inline

Definition at line 54 of file client/Waypoint.h.

References _waypoint, and carla::road::element::Waypoint::s.

Referenced by GetNextUntilLaneEnd(), and GetPreviousUntilLaneStart().

+ Here is the caller graph for this function:

◆ GetId()

uint64_t carla::client::Waypoint::GetId ( ) const
inline

Returns an unique Id identifying this waypoint.

The Id takes into account OpenDrive's road Id, lane Id, and s distance on its road segment up to half-centimetre precision.

Definition at line 38 of file client/Waypoint.h.

References _waypoint.

◆ GetJunction()

SharedPtr< Junction > carla::client::Waypoint::GetJunction ( ) const

Definition at line 34 of file client/Waypoint.cpp.

References _parent, and IsJunction().

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetJunctionId()

road::JuncId carla::client::Waypoint::GetJunctionId ( ) const

Definition at line 26 of file client/Waypoint.cpp.

References _parent, _waypoint, and carla::road::element::Waypoint::road_id.

Referenced by carla::client::Map::GetJunction(), and GetTransform().

+ Here is the caller graph for this function:

◆ GetLandmarksOfTypeInDistance()

std::vector< SharedPtr< Landmark > > carla::client::Waypoint::GetLandmarksOfTypeInDistance ( double  distance,
std::string  filter_type,
bool  stop_at_junction = false 
) const

Returns a list of landmarks from the current position to a certain distance Filters by specified type.

Definition at line 236 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLaneChange()

road::element::LaneMarking::LaneChange carla::client::Waypoint::GetLaneChange ( ) const

Definition at line 176 of file client/Waypoint.cpp.

References _mark_record, _waypoint, carla::road::Both, and carla::road::element::Waypoint::lane_id.

Referenced by GetTransform().

+ Here is the caller graph for this function:

◆ GetLaneId()

auto carla::client::Waypoint::GetLaneId ( ) const
inline

Definition at line 50 of file client/Waypoint.h.

References _waypoint, and carla::road::element::Waypoint::lane_id.

◆ GetLaneWidth()

double carla::client::Waypoint::GetLaneWidth ( ) const

Definition at line 41 of file client/Waypoint.cpp.

References _parent, and _waypoint.

Referenced by GetTransform().

+ Here is the caller graph for this function:

◆ GetLeft()

SharedPtr< Waypoint > carla::client::Waypoint::GetLeft ( ) const

Definition at line 139 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLeftLaneMarking()

boost::optional< road::element::LaneMarking > carla::client::Waypoint::GetLeftLaneMarking ( ) const

Definition at line 155 of file client/Waypoint.cpp.

References _mark_record.

Referenced by GetTransform().

+ Here is the caller graph for this function:

◆ GetNext()

std::vector< SharedPtr< Waypoint > > carla::client::Waypoint::GetNext ( double  distance) const

Definition at line 50 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by GetNextUntilLaneEnd(), and GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNextUntilLaneEnd()

std::vector< SharedPtr< Waypoint > > carla::client::Waypoint::GetNextUntilLaneEnd ( double  distance) const

Returns a list of waypoints separated by distance from the current waypoint to the end of the lane.

Definition at line 70 of file client/Waypoint.cpp.

References _parent, _waypoint, GetDistance(), GetNext(), GetRoadId(), and carla::road::element::Waypoint::lane_id.

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPrevious()

std::vector< SharedPtr< Waypoint > > carla::client::Waypoint::GetPrevious ( double  distance) const

Definition at line 60 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by GetPreviousUntilLaneStart(), and GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPreviousUntilLaneStart()

std::vector< SharedPtr< Waypoint > > carla::client::Waypoint::GetPreviousUntilLaneStart ( double  distance) const

Returns a list of waypoints separated by distance from the current waypoint to the start of the lane.

Definition at line 99 of file client/Waypoint.cpp.

References _parent, _waypoint, GetDistance(), GetPrevious(), GetRoadId(), and carla::road::element::Waypoint::lane_id.

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRight()

SharedPtr< Waypoint > carla::client::Waypoint::GetRight ( ) const

Definition at line 130 of file client/Waypoint.cpp.

References _parent, _waypoint, and Waypoint().

Referenced by GetTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRightLaneMarking()

boost::optional< road::element::LaneMarking > carla::client::Waypoint::GetRightLaneMarking ( ) const

Definition at line 148 of file client/Waypoint.cpp.

References _mark_record.

Referenced by GetTransform().

+ Here is the caller graph for this function:

◆ GetRoadId()

auto carla::client::Waypoint::GetRoadId ( ) const
inline

Definition at line 42 of file client/Waypoint.h.

References _waypoint, and carla::road::element::Waypoint::road_id.

Referenced by GetNextUntilLaneEnd(), and GetPreviousUntilLaneStart().

+ Here is the caller graph for this function:

◆ GetSectionId()

auto carla::client::Waypoint::GetSectionId ( ) const
inline

Definition at line 46 of file client/Waypoint.h.

References _waypoint, and carla::road::element::Waypoint::section_id.

◆ GetTransform()

const geom::Transform& carla::client::Waypoint::GetTransform ( ) const
inline

Definition at line 58 of file client/Waypoint.h.

References _transform, GetAllLandmarksInDistance(), GetJunction(), GetJunctionId(), GetLandmarksOfTypeInDistance(), GetLaneChange(), GetLaneWidth(), GetLeft(), GetLeftLaneMarking(), GetNext(), GetNextUntilLaneEnd(), GetPrevious(), GetPreviousUntilLaneStart(), GetRight(), GetRightLaneMarking(), GetType(), and IsJunction().

+ Here is the call graph for this function:

◆ GetType()

road::Lane::LaneType carla::client::Waypoint::GetType ( ) const

Definition at line 46 of file client/Waypoint.cpp.

References _parent, and _waypoint.

Referenced by GetTransform().

+ Here is the caller graph for this function:

◆ IsJunction()

bool carla::client::Waypoint::IsJunction ( ) const

Definition at line 30 of file client/Waypoint.cpp.

References _parent, _waypoint, and carla::road::element::Waypoint::road_id.

Referenced by GetJunction(), and GetTransform().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Map

friend class Map
friend

Definition at line 105 of file client/Waypoint.h.

Member Data Documentation

◆ _mark_record

std::pair< const road::element::RoadInfoMarkRecord *, const road::element::RoadInfoMarkRecord *> carla::client::Waypoint::_mark_record
private

Definition at line 118 of file client/Waypoint.h.

Referenced by GetLaneChange(), GetLeftLaneMarking(), and GetRightLaneMarking().

◆ _parent

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

◆ _transform

geom::Transform carla::client::Waypoint::_transform
private

Definition at line 113 of file client/Waypoint.h.

Referenced by GetTransform().

◆ _waypoint

road::element::Waypoint carla::client::Waypoint::_waypoint
private

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