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

Definition at line 29 of file RoadTypes.h.

◆ ContId

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

Definition at line 31 of file RoadTypes.h.

◆ JuncId

using carla::road::JuncId = int32_t

Definition at line 17 of file RoadTypes.h.

◆ LaneId

using carla::road::LaneId = int32_t

Definition at line 19 of file RoadTypes.h.

◆ ObjId

using carla::road::ObjId = uint32_t

Definition at line 23 of file RoadTypes.h.

◆ RoadId

using carla::road::RoadId = uint32_t

Definition at line 15 of file RoadTypes.h.

◆ SectionId

using carla::road::SectionId = uint32_t

Definition at line 21 of file RoadTypes.h.

◆ SignId

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

Definition at line 25 of file RoadTypes.h.

◆ StencilId

using carla::road::StencilId = 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()

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

◆ ComputeTotalLaneWidth()

template<typename T>
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 ComputeTotalLaneWidth(), and RELEASE_ASSERT.

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

◆ ConcatVectors()

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

◆ ForEachDrivableLane()

template<typename FuncT>
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 ForEachDrivableLane(), and ForEachDrivableLaneImpl().

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

◆ ForEachDrivableLaneAt()

template<typename FuncT>
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 ForEachDrivableLaneAt(), and ForEachDrivableLaneImpl().

Referenced by ForEachDrivableLaneAt(), and carla::road::Map::GenerateWaypoints().

◆ ForEachDrivableLaneImpl()

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

◆ ForEachLane()

template<typename FuncT>
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 ForEachLane(), and ForEachLaneImpl().

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

◆ ForEachLaneImpl()

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

◆ GetDistanceAtEndOfLane()

◆ GetDistanceAtStartOfLane()

◆ GetRemainingLength()

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

◆ IsLanePresent()

◆ IsOrphanSliverRoad()

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

Variable Documentation

◆ EPSILON

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

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().