CARLA
Loading...
Searching...
No Matches
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:

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.
 
auto GetDistance () const
 
uint64_t GetId () const
 Returns an unique Id identifying this waypoint.
 
SharedPtr< Junction > GetJunction () 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.
 
SharedPtr< Lane > GetLane () const
 The lane this waypoint samples.
 
road::element::LaneMarking::LaneChange GetLaneChange () const
 
auto GetLaneId () const
 
double GetLaneWidth () const
 
SharedPtr< Waypoint > GetLeft () const
 
std::optional< road::element::LaneMarking > GetLeftLaneMarking () 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.
 
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.
 
SharedPtr< Waypoint > GetRight () const
 
std::optional< road::element::LaneMarking > GetRightLaneMarking () const
 
SharedPtr< Road > GetRoad () const
 The road this waypoint samples.
 
auto GetRoadId () const
 
auto GetSectionId () const
 
const geom::Transform & GetTransform () const
 
road::Lane::LaneType GetType () const
 
bool IsJunction () const
 
bool IsPositiveDirection () const
 
bool IsRHT () 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
 
NonCopyable & operator= (const NonCopyable &)=delete
 
NonCopyable & operator= (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 29 of file client/Waypoint.h.

Constructor & Destructor Documentation

◆ ~Waypoint()

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

◆ Waypoint()

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

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

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 234 of file client/Waypoint.cpp.

References _parent, _waypoint, and distance.

Referenced by carla::client::World::GetTrafficLightsFromWaypoint().

◆ GetDistance()

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

◆ 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 40 of file client/Waypoint.h.

References _waypoint.

◆ GetJunction()

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

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

References _parent, and IsJunction().

◆ GetJunctionId()

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

◆ 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 252 of file client/Waypoint.cpp.

References _parent, _waypoint, and distance.

◆ GetLane()

SharedPtr< Lane > carla::client::Waypoint::GetLane ( ) const

◆ GetLaneChange()

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

◆ GetLaneId()

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

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

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

◆ GetLaneWidth()

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

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

References _parent, and _waypoint.

◆ GetLeft()

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

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

References _parent, and _waypoint.

◆ GetLeftLaneMarking()

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

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

References _mark_record, _parent, _waypoint, and road.

◆ GetNext()

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

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

References _parent, _waypoint, and distance.

Referenced by GetNextUntilLaneEnd().

◆ 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 80 of file client/Waypoint.cpp.

References _parent, _waypoint, distance, GetDistance(), GetNext(), GetRoadId(), and IsPositiveDirection().

◆ GetPrevious()

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

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

References _parent, _waypoint, and distance.

Referenced by GetPreviousUntilLaneStart().

◆ 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 109 of file client/Waypoint.cpp.

References _parent, _waypoint, distance, GetDistance(), GetPrevious(), GetRoadId(), and IsPositiveDirection().

◆ GetRight()

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

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

References _parent, and _waypoint.

◆ GetRightLaneMarking()

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

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

References _mark_record, _parent, _waypoint, and road.

◆ GetRoad()

SharedPtr< Road > carla::client::Waypoint::GetRoad ( ) const

The road this waypoint samples.

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

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

◆ GetRoadId()

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

◆ GetSectionId()

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

Definition at line 48 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 60 of file client/Waypoint.h.

References _transform.

◆ GetType()

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

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

References _parent, and _waypoint.

◆ IsJunction()

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

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

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

Referenced by GetJunction().

◆ IsPositiveDirection()

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

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

References _parent, and _waypoint.

Referenced by GetLaneChange(), GetNextUntilLaneEnd(), and GetPreviousUntilLaneStart().

◆ IsRHT()

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

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

References _parent, and _waypoint.

Friends And Related Symbol Documentation

◆ Map

friend class Map
friend

Definition at line 117 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 130 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 125 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: