CARLA
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
carla::road Namespace Reference

Namespaces

 element
 
 object
 

Classes

class  Controller
 
class  InformationSet
 
class  Junction
 
class  Lane
 
class  LaneSection
 
class  LaneSectionMap
 
struct  LaneValidity
 
class  Map
 
class  MapBuilder
 
class  MapData
 
class  Object
 
class  Road
 
class  RoadElementSet
 A set of elements ordered by its position on the road. More...
 
class  Signal
 
struct  SignalDependency
 
class  SignalType
 Using OpenDRIVE 1.5M (6.10 Country Codes) More...
 

Typedefs

using ConId = uint32_t
 
using ContId = std::string
 
using JuncId = int32_t
 
using LaneId = int32_t
 
using ObjId = uint32_t
 
using RoadId = uint32_t
 
using SectionId = uint32_t
 
using SignId = std::string
 

Enumerations

enum  SignalOrientation { Positive, Negative, Both }
 

Functions

template<typename T >
static std::pair< double, double > ComputeTotalLaneWidth (const T container, const double s, const LaneId lane_id)
 Returns a pair containing first = width, second = tangent, for an specific Lane given an s and a iterator over lanes. More...
 
template<typename T >
static std::vector< T > ConcatVectors (std::vector< T > dst, std::vector< T > src)
 
template<typename FuncT >
static void ForEachDrivableLane (const Road &road, FuncT &&func)
 Return a waypoint for each drivable lane on each lane section of road. More...
 
template<typename FuncT >
static void ForEachDrivableLaneAt (const Road &road, double distance, FuncT &&func)
 Return a waypoint for each drivable lane at distance on road. More...
 
template<typename FuncT >
static void ForEachDrivableLaneImpl (RoadId road_id, const LaneSection &lane_section, double distance, FuncT &&func)
 Return a waypoint for each drivable lane on lane_section. More...
 
template<typename FuncT >
static void ForEachLane (const Road &road, Lane::LaneType lane_type, FuncT &&func)
 Return a waypoint for each lane of the specified type on each lane section of road. More...
 
template<typename FuncT >
static void ForEachLaneImpl (RoadId road_id, const LaneSection &lane_section, double distance, Lane::LaneType lane_type, FuncT &&func)
 
static double GetDistanceAtEndOfLane (const Lane &lane)
 
static double GetDistanceAtStartOfLane (const Lane &lane)
 
double GetRemainingLength (const Lane &lane, double current_s)
 
static bool IsLanePresent (const MapData &data, Waypoint waypoint)
 Assumes road_id and section_id are valid. More...
 

Variables

static constexpr double EPSILON = 10.0 * std::numeric_limits<double>::epsilon()
 We use this epsilon to shift the waypoints away from the edges of the lane sections to avoid floating point precision errors. More...
 

Typedef Documentation

◆ ConId

using carla::road::ConId = typedef uint32_t

Definition at line 27 of file RoadTypes.h.

◆ ContId

using carla::road::ContId = typedef std::string

Definition at line 29 of file RoadTypes.h.

◆ JuncId

using carla::road::JuncId = typedef int32_t

Definition at line 17 of file RoadTypes.h.

◆ LaneId

using carla::road::LaneId = typedef int32_t

Definition at line 19 of file RoadTypes.h.

◆ ObjId

using carla::road::ObjId = typedef uint32_t

Definition at line 23 of file RoadTypes.h.

◆ RoadId

using carla::road::RoadId = typedef uint32_t

Definition at line 15 of file RoadTypes.h.

◆ SectionId

using carla::road::SectionId = typedef uint32_t

Definition at line 21 of file RoadTypes.h.

◆ SignId

using carla::road::SignId = typedef std::string

Definition at line 25 of file RoadTypes.h.

Enumeration Type Documentation

◆ SignalOrientation

Enumerator
Positive 
Negative 
Both 

Definition at line 21 of file Signal.h.

Function Documentation

◆ ComputeTotalLaneWidth()

template<typename T >
static std::pair<double, double> carla::road::ComputeTotalLaneWidth ( const T  container,
const double  s,
const LaneId  lane_id 
)
static

Returns a pair containing first = width, second = tangent, for an specific Lane given an s and a iterator over lanes.

Definition at line 101 of file Lane.cpp.

References RELEASE_ASSERT.

Referenced by carla::road::Lane::ComputeTransform(), and carla::road::Lane::GetCornerPositions().

+ Here is the caller graph for this function:

◆ ConcatVectors()

template<typename T >
static std::vector<T> carla::road::ConcatVectors ( std::vector< T >  dst,
std::vector< T >  src 
)
static

Definition at line 47 of file road/Map.cpp.

Referenced by carla::road::Map::GetNext(), carla::road::Map::GetPrevious(), and carla::road::Map::GetSignalsInDistance().

+ Here is the caller graph for this function:

◆ ForEachDrivableLane()

template<typename FuncT >
static void carla::road::ForEachDrivableLane ( const Road road,
FuncT &&  func 
)
static

Return a waypoint for each drivable lane on each lane section of road.

Definition at line 120 of file road/Map.cpp.

References ForEachDrivableLaneImpl(), carla::road::Road::GetId(), and carla::road::Road::GetLaneSections().

Referenced by carla::road::Map::GenerateTopology().

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

◆ ForEachDrivableLaneAt()

template<typename FuncT >
static void carla::road::ForEachDrivableLaneAt ( const Road road,
double  distance,
FuncT &&  func 
)
static

Return a waypoint for each drivable lane at distance on road.

Definition at line 145 of file road/Map.cpp.

References ForEachDrivableLaneImpl(), carla::road::Road::GetId(), and carla::road::Road::GetLaneSectionsAt().

Referenced by carla::road::Map::GenerateWaypoints().

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

◆ ForEachDrivableLaneImpl()

template<typename FuncT >
static void carla::road::ForEachDrivableLaneImpl ( RoadId  road_id,
const LaneSection lane_section,
double  distance,
FuncT &&  func 
)
static

Return a waypoint for each drivable lane on lane_section.

Definition at line 76 of file road/Map.cpp.

References carla::road::Lane::Driving, GetDistanceAtStartOfLane(), carla::road::LaneSection::GetId(), and carla::road::LaneSection::GetLanes().

Referenced by ForEachDrivableLane(), and ForEachDrivableLaneAt().

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

◆ ForEachLane()

template<typename FuncT >
static void carla::road::ForEachLane ( const Road road,
Lane::LaneType  lane_type,
FuncT &&  func 
)
static

Return a waypoint for each lane of the specified type on each lane section of road.

Definition at line 132 of file road/Map.cpp.

References ForEachLaneImpl(), carla::road::Road::GetId(), and carla::road::Road::GetLaneSections().

Referenced by carla::road::Map::CreateRtree(), and carla::road::Map::GetJunctionWaypoints().

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

◆ ForEachLaneImpl()

template<typename FuncT >
static void carla::road::ForEachLaneImpl ( RoadId  road_id,
const LaneSection lane_section,
double  distance,
Lane::LaneType  lane_type,
FuncT &&  func 
)
static

Definition at line 97 of file road/Map.cpp.

References GetDistanceAtStartOfLane(), carla::road::LaneSection::GetId(), and carla::road::LaneSection::GetLanes().

Referenced by ForEachLane().

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

◆ GetDistanceAtEndOfLane()

static double carla::road::GetDistanceAtEndOfLane ( const Lane lane)
static

Definition at line 66 of file road/Map.cpp.

References EPSILON, carla::road::Lane::GetDistance(), carla::road::Lane::GetId(), and carla::road::Lane::GetLength().

Referenced by carla::road::Map::GenerateTopology(), carla::road::Map::GetJunctionWaypoints(), and carla::road::Map::GetPredecessors().

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

◆ GetDistanceAtStartOfLane()

static double carla::road::GetDistanceAtStartOfLane ( const Lane lane)
static

Definition at line 58 of file road/Map.cpp.

References EPSILON, carla::road::Lane::GetDistance(), carla::road::Lane::GetId(), and carla::road::Lane::GetLength().

Referenced by ForEachDrivableLaneImpl(), ForEachLaneImpl(), and carla::road::Map::GetSuccessors().

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

◆ GetRemainingLength()

double carla::road::GetRemainingLength ( const Lane lane,
double  current_s 
)

Definition at line 879 of file road/Map.cpp.

References carla::road::Lane::GetDistance(), carla::road::Lane::GetId(), and carla::road::Lane::GetLength().

Referenced by carla::road::Map::CreateRtree().

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

◆ IsLanePresent()

static bool carla::road::IsLanePresent ( const MapData data,
Waypoint  waypoint 
)
static

Assumes road_id and section_id are valid.

Definition at line 156 of file road/Map.cpp.

References carla::road::LaneSection::ContainsLane(), carla::road::Road::GetLaneSectionById(), carla::road::MapData::GetRoad(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::road_id, and carla::road::element::Waypoint::section_id.

Referenced by carla::road::Map::GetLeft(), and carla::road::Map::GetRight().

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

Variable Documentation

◆ EPSILON

constexpr double carla::road::EPSILON = 10.0 * std::numeric_limits<double>::epsilon()
static