CARLA
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
carla::road Namespace Reference

Namespaces

namespace  element
 
namespace  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...
 
class  Stencil
 

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
 
using StencilId = std::string
 

Enumerations

enum  SignalOrientation { Positive , Negative , Both }
 
enum class  StencilOrientation { Positive , Negative , Both }
 

Functions

static std::unordered_set< RoadId > ComputeDuplicateTraceRoads (const Map &map, const std::unordered_set< RoadId > &candidate_ids)
 
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.
 
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.
 
template<typename FuncT >
static void ForEachDrivableLaneAt (const Road &road, double distance, FuncT &&func)
 Return a waypoint for each drivable lane at distance on road.
 
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.
 
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.
 
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.
 
static bool IsOrphanSliverRoad (const road::Road &road)
 

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.
 
static constexpr double TREE_PLACEMENT_EPSILON = 1.0e-4
 

Typedef Documentation

◆ ConId

using carla::road::ConId = typedef uint32_t

Definition at line 29 of file RoadTypes.h.

◆ ContId

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

Definition at line 31 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.

◆ StencilId

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

Definition at line 27 of file RoadTypes.h.

Enumeration Type Documentation

◆ SignalOrientation

Enumerator
Positive 
Negative 
Both 

Definition at line 21 of file Signal.h.

◆ StencilOrientation

Enumerator
Positive 
Negative 
Both 

Definition at line 14 of file Stencil.h.

Function Documentation

◆ ComputeDuplicateTraceRoads()

static std::unordered_set< RoadId > carla::road::ComputeDuplicateTraceRoads ( const Map &  map,
const std::unordered_set< RoadId > &  candidate_ids 
)
static

◆ 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 road/Lane.cpp.

References RELEASE_ASSERT.

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

◆ ConcatVectors()

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

◆ 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 125 of file road/Map.cpp.

References ForEachDrivableLaneImpl(), and road.

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

◆ 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 150 of file road/Map.cpp.

References distance, ForEachDrivableLaneImpl(), and road.

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

◆ 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 81 of file road/Map.cpp.

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

Referenced by ForEachDrivableLane(), and ForEachDrivableLaneAt().

◆ 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 137 of file road/Map.cpp.

References ForEachLaneImpl(), and road.

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

◆ 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

◆ GetDistanceAtEndOfLane()

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

◆ GetDistanceAtStartOfLane()

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

◆ GetRemainingLength()

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

◆ IsLanePresent()

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

◆ IsOrphanSliverRoad()

static bool carla::road::IsOrphanSliverRoad ( const road::Road &  road)
static

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

References road.

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

Variable Documentation

◆ EPSILON

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

We use this epsilon to shift the waypoints away from the edges of the lane sections to avoid floating point precision errors.

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

Referenced by carla::road::Map::GenerateWaypoints(), GetDistanceAtEndOfLane(), GetDistanceAtStartOfLane(), carla::road::Map::GetNext(), and carla::road::Map::GetPrevious().

◆ TREE_PLACEMENT_EPSILON

constexpr double carla::road::TREE_PLACEMENT_EPSILON = 1.0e-4
staticconstexpr

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

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