CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::road::MapBuilder Class Reference

#include <MapBuilder.h>

+ Collaboration diagram for carla::road::MapBuilder:

Public Member Functions

void AddConnection (const JuncId junction_id, const ConId connection_id, const RoadId incoming_road, const RoadId connecting_road)
 
void AddDependencyToSignal (const SignId signal_id, const std::string dependency_id, const std::string dependency_type)
 
void AddJunction (const JuncId id, const std::string name)
 
void AddJunctionController (const JuncId junction_id, std::set< ContId > &&controllers)
 
void AddLaneLink (const JuncId junction_id, const ConId connection_id, const LaneId from, const LaneId to)
 
carla::road::RoadAddRoad (const RoadId road_id, const std::string name, const double length, const JuncId junction_id, const RoadId predecessor, const RoadId successor)
 
void AddRoadElevationProfile (Road *road, const double s, const double a, const double b, const double c, const double d)
 
void AddRoadGeometryArc (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvature)
 
void AddRoadGeometryLine (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length)
 
void AddRoadGeometryParamPoly3 (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double aU, const double bU, const double cU, const double dU, const double aV, const double bV, const double cV, const double dV, const std::string p_range)
 
void AddRoadGeometryPoly3 (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double a, const double b, const double c, const double d)
 
void AddRoadGeometrySpiral (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvStart, const double curvEnd)
 
void AddRoadObjectCrosswalk (Road *road, const std::string name, const double s, const double t, const double zOffset, const double hdg, const double pitch, const double roll, const std::string orientation, const double width, const double length, const std::vector< road::element::CrosswalkPoint > points)
 
carla::road::LaneSectionAddRoadSection (carla::road::Road *road, const SectionId id, const double s)
 
void AddRoadSection (const RoadId road_id, const SectionId section_index, const double s, const double a, const double b, const double c, const double d)
 
carla::road::LaneAddRoadSectionLane (carla::road::LaneSection *section, const LaneId lane_id, const uint32_t lane_type, const bool lane_level, const LaneId predecessor, const LaneId successor)
 
element::RoadInfoSignalAddSignal (Road *road, const SignId signal_id, const double s, const double t, const std::string name, const std::string dynamic, const std::string orientation, const double zOffset, const std::string country, const std::string type, const std::string subtype, const double value, const std::string unit, const double height, const double width, const std::string text, const double hOffset, const double pitch, const double roll)
 
void AddSignalPositionInertial (const SignId signal_id, const double x, const double y, const double z, const double hdg, const double pitch, const double roll)
 
void AddSignalPositionRoad (const SignId signal_id, const RoadId road_id, const double s, const double t, const double zOffset, const double hOffset, const double pitch, const double roll)
 
element::RoadInfoSignalAddSignalReference (Road *road, const SignId signal_id, const double s_position, const double t_position, const std::string signal_reference_orientation)
 
void AddValidityToSignalReference (element::RoadInfoSignal *signal_reference, const LaneId from_lane, const LaneId to_lane)
 
boost::optional< MapBuild ()
 
void CreateController (const ContId controller_id, const std::string controller_name, const uint32_t controller_sequence, const std::set< road::SignId > &&signals)
 
void CreateLaneAccess (Lane *lane, const double s, const std::string restriction)
 
void CreateLaneBorder (Lane *lane, const double s, const double a, const double b, const double c, const double d)
 
void CreateLaneHeight (Lane *lane, const double s, const double inner, const double outer)
 
void CreateLaneMaterial (Lane *lane, const double s, const std::string surface, const double friction, const double roughness)
 
void CreateLaneRule (Lane *lane, const double s, const std::string value)
 
void CreateLaneSpeed (Lane *lane, const double s, const double max, const std::string unit)
 
void CreateLaneVisibility (Lane *lane, const double s, const double forward, const double back, const double left, const double right)
 
void CreateLaneWidth (Lane *lane, const double s, const double a, const double b, const double c, const double d)
 
void CreateRoadMark (Lane *lane, const int road_mark_id, const double s, const std::string type, const std::string weight, const std::string color, const std::string material, const double width, const std::string lane_change, const double height, const std::string type_name, const double type_width)
 
void CreateRoadMarkTypeLine (Lane *lane, const int road_mark_id, const double length, const double space, const double tOffset, const double s, const std::string rule, const double width)
 
void CreateRoadSpeed (Road *road, const double s, const std::string type, const double max, const std::string unit)
 
void CreateSectionOffset (Road *road, const double s, const double a, const double b, const double c, const double d)
 
LaneGetLane (const RoadId road_id, const LaneId lane_id, const double s)
 
RoadGetRoad (const RoadId road_id)
 
void SetGeoReference (const geom::GeoLocation &geo_reference)
 
void SetRoadLaneLink (const RoadId road_id, const SectionId section_index, const LaneId lane_id, const Lane::LaneType lane_type, const bool lane_level, const LaneId predecessor, const LaneId successor)
 

Private Member Functions

void CheckSignalsOnRoads (Map &map)
 Checks signals overlapping driving lanes and emits a warning. More...
 
void ComputeJunctionRoadConflicts (Map &map)
 Compute the conflicts of the roads (intersecting roads) More...
 
geom::Transform ComputeSignalTransform (std::unique_ptr< Signal > &signal, MapData &data)
 
void CreateJunctionBoundingBoxes (Map &map)
 Create the bounding boxes of each junction. More...
 
void CreatePointersBetweenRoadSegments ()
 Create the pointers between RoadSegments based on the ids. More...
 
void GenerateDefaultValiditiesForSignalReferences ()
 Generates a default validity field for signal references with missing validity record in OpenDRIVE. More...
 
LaneGetEdgeLanePointer (RoadId road_id, bool from_start, LaneId lane_id)
 Return the pointer to a lane object. More...
 
std::vector< std::pair< RoadId, LaneId > > GetJunctionLanes (JuncId junction_id, RoadId road_id, LaneId lane_id)
 
std::vector< Lane * > GetLaneNext (RoadId road_id, SectionId section_id, LaneId lane_id)
 Return a list of pointers to all lanes from a lane (using road and junction info). More...
 
void RemoveZeroLaneValiditySignalReferences ()
 Removes signal references with lane validity equal to [0,0] as they have no effect on any road. More...
 
void SolveControllerAndJuntionReferences ()
 Solve the references between Controllers and Juntions. More...
 
void SolveSignalReferencesAndTransforms ()
 Solves the signal references in the road. More...
 

Private Attributes

MapData _map_data
 
std::unordered_map< Lane *, std::vector< std::unique_ptr< element::RoadInfo > > > _temp_lane_info_container
 
std::unordered_map< Road *, std::vector< std::unique_ptr< element::RoadInfo > > > _temp_road_info_container
 Map to temporary store all the road and lane infos until the map is built, so they can be added all together. More...
 
std::unordered_map< SignId, std::unique_ptr< Signal > > _temp_signal_container
 
std::vector< element::RoadInfoSignal * > _temp_signal_reference_container
 

Detailed Description

Definition at line 20 of file MapBuilder.h.

Member Function Documentation

◆ AddConnection()

void carla::road::MapBuilder::AddConnection ( const JuncId  junction_id,
const ConId  connection_id,
const RoadId  incoming_road,
const RoadId  connecting_road 
)

Definition at line 570 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::JunctionParser::Parse().

+ Here is the caller graph for this function:

◆ AddDependencyToSignal()

void carla::road::MapBuilder::AddDependencyToSignal ( const SignId  signal_id,
const std::string  dependency_id,
const std::string  dependency_type 
)

Definition at line 344 of file MapBuilder.cpp.

Referenced by carla::opendrive::parser::SignalParser::Parse().

+ Here is the caller graph for this function:

◆ AddJunction()

void carla::road::MapBuilder::AddJunction ( const JuncId  id,
const std::string  name 
)

Definition at line 566 of file MapBuilder.cpp.

Referenced by carla::opendrive::parser::JunctionParser::Parse().

+ Here is the caller graph for this function:

◆ AddJunctionController()

void carla::road::MapBuilder::AddJunctionController ( const JuncId  junction_id,
std::set< ContId > &&  controllers 
)

Definition at line 589 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::JunctionParser::Parse().

+ Here is the caller graph for this function:

◆ AddLaneLink()

void carla::road::MapBuilder::AddLaneLink ( const JuncId  junction_id,
const ConId  connection_id,
const LaneId  from,
const LaneId  to 
)

Definition at line 580 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::JunctionParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoad()

carla::road::Road * carla::road::MapBuilder::AddRoad ( const RoadId  road_id,
const std::string  name,
const double  length,
const JuncId  junction_id,
const RoadId  predecessor,
const RoadId  successor 
)

Definition at line 353 of file MapBuilder.cpp.

References carla::road::Road::_map_data.

Referenced by carla::opendrive::parser::RoadParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadElevationProfile()

void carla::road::MapBuilder::AddRoadElevationProfile ( Road road,
const double  s,
const double  a,
const double  b,
const double  c,
const double  d 
)

Definition at line 74 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ProfilesParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadGeometryArc()

void carla::road::MapBuilder::AddRoadGeometryArc ( carla::road::Road road,
const double  s,
const double  x,
const double  y,
const double  hdg,
const double  length,
const double  curvature 
)

Definition at line 451 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::GeometryParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadGeometryLine()

void carla::road::MapBuilder::AddRoadGeometryLine ( carla::road::Road road,
const double  s,
const double  x,
const double  y,
const double  hdg,
const double  length 
)

Definition at line 411 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::GeometryParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadGeometryParamPoly3()

void carla::road::MapBuilder::AddRoadGeometryParamPoly3 ( carla::road::Road road,
const double  s,
const double  x,
const double  y,
const double  hdg,
const double  length,
const double  aU,
const double  bU,
const double  cU,
const double  dU,
const double  aV,
const double  bV,
const double  cV,
const double  dV,
const std::string  p_range 
)

Definition at line 523 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::GeometryParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadGeometryPoly3()

void carla::road::MapBuilder::AddRoadGeometryPoly3 ( carla::road::Road road,
const double  s,
const double  x,
const double  y,
const double  hdg,
const double  length,
const double  a,
const double  b,
const double  c,
const double  d 
)

Definition at line 496 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::GeometryParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadGeometrySpiral()

void carla::road::MapBuilder::AddRoadGeometrySpiral ( carla::road::Road road,
const double  s,
const double  x,
const double  y,
const double  hdg,
const double  length,
const double  curvStart,
const double  curvEnd 
)

Definition at line 472 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::GeometryParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadObjectCrosswalk()

void carla::road::MapBuilder::AddRoadObjectCrosswalk ( Road road,
const std::string  name,
const double  s,
const double  t,
const double  zOffset,
const double  hdg,
const double  pitch,
const double  roll,
const std::string  orientation,
const double  width,
const double  length,
const std::vector< road::element::CrosswalkPoint points 
)

Definition at line 86 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ObjectParser::Parse().

+ Here is the caller graph for this function:

◆ AddRoadSection() [1/2]

carla::road::LaneSection * carla::road::MapBuilder::AddRoadSection ( carla::road::Road road,
const SectionId  id,
const double  s 
)

Definition at line 378 of file MapBuilder.cpp.

References carla::road::Road::_lane_sections, carla::road::LaneSection::_road, DEBUG_ASSERT, and carla::road::LaneSectionMap::Emplace().

Referenced by carla::opendrive::parser::RoadParser::Parse().

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

◆ AddRoadSection() [2/2]

void carla::road::MapBuilder::AddRoadSection ( const RoadId  road_id,
const SectionId  section_index,
const double  s,
const double  a,
const double  b,
const double  c,
const double  d 
)

◆ AddRoadSectionLane()

carla::road::Lane * carla::road::MapBuilder::AddRoadSectionLane ( carla::road::LaneSection section,
const LaneId  lane_id,
const uint32_t  lane_type,
const bool  lane_level,
const LaneId  predecessor,
const LaneId  successor 
)

Definition at line 388 of file MapBuilder.cpp.

References carla::road::LaneSection::_lanes, and DEBUG_ASSERT.

Referenced by carla::opendrive::parser::RoadParser::Parse().

+ Here is the caller graph for this function:

◆ AddSignal()

element::RoadInfoSignal * carla::road::MapBuilder::AddSignal ( Road road,
const SignId  signal_id,
const double  s,
const double  t,
const std::string  name,
const std::string  dynamic,
const std::string  orientation,
const double  zOffset,
const std::string  country,
const std::string  type,
const std::string  subtype,
const double  value,
const std::string  unit,
const double  height,
const double  width,
const std::string  text,
const double  hOffset,
const double  pitch,
const double  roll 
)

Definition at line 238 of file MapBuilder.cpp.

References carla::road::Road::GetId().

Referenced by carla::opendrive::parser::ObjectParser::Parse(), and carla::opendrive::parser::SignalParser::Parse().

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

◆ AddSignalPositionInertial()

void carla::road::MapBuilder::AddSignalPositionInertial ( const SignId  signal_id,
const double  x,
const double  y,
const double  z,
const double  hdg,
const double  pitch,
const double  roll 
)

Definition at line 282 of file MapBuilder.cpp.

References carla::geom::Math::ToDegrees().

Referenced by carla::opendrive::parser::SignalParser::Parse().

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

◆ AddSignalPositionRoad()

void carla::road::MapBuilder::AddSignalPositionRoad ( const SignId  signal_id,
const RoadId  road_id,
const double  s,
const double  t,
const double  zOffset,
const double  hOffset,
const double  pitch,
const double  roll 
)

Definition at line 299 of file MapBuilder.cpp.

◆ AddSignalReference()

element::RoadInfoSignal * carla::road::MapBuilder::AddSignalReference ( Road road,
const SignId  signal_id,
const double  s_position,
const double  t_position,
const std::string  signal_reference_orientation 
)

Definition at line 318 of file MapBuilder.cpp.

References carla::geom::Math::Clamp(), carla::road::Road::GetId(), carla::road::Road::GetLength(), and RELEASE_ASSERT.

Referenced by carla::opendrive::parser::SignalParser::Parse().

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

◆ AddValidityToSignalReference()

void carla::road::MapBuilder::AddValidityToSignalReference ( element::RoadInfoSignal signal_reference,
const LaneId  from_lane,
const LaneId  to_lane 
)

Definition at line 337 of file MapBuilder.cpp.

References carla::road::element::RoadInfoSignal::_validities.

Referenced by carla::opendrive::parser::AddValidity().

+ Here is the caller graph for this function:

◆ Build()

boost::optional< Map > carla::road::MapBuilder::Build ( )

Definition at line 38 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::OpenDriveParser::Load().

+ Here is the caller graph for this function:

◆ CheckSignalsOnRoads()

void carla::road::MapBuilder::CheckSignalsOnRoads ( Map map)
private

Checks signals overlapping driving lanes and emits a warning.

Definition at line 1044 of file MapBuilder.cpp.

References carla::road::Map::_data, carla::road::MapData::_signals, carla::road::Map::ComputeTransform(), carla::road::Lane::Driving, carla::road::Map::GetClosestWaypointOnRoad(), carla::road::Map::GetLaneType(), carla::road::Map::GetLaneWidth(), carla::road::Map::GetLeft(), carla::road::Map::GetRight(), carla::log_debug(), carla::road::Lane::None, and carla::road::Lane::Shoulder.

+ Here is the call graph for this function:

◆ ComputeJunctionRoadConflicts()

void carla::road::MapBuilder::ComputeJunctionRoadConflicts ( Map map)
private

Compute the conflicts of the roads (intersecting roads)

Definition at line 939 of file MapBuilder.cpp.

References carla::road::Map::_data, carla::road::Map::ComputeJunctionConflicts(), and carla::road::MapData::GetJunctions().

+ Here is the call graph for this function:

◆ ComputeSignalTransform()

geom::Transform carla::road::MapBuilder::ComputeSignalTransform ( std::unique_ptr< Signal > &  signal,
MapData data 
)
private

◆ CreateController()

void carla::road::MapBuilder::CreateController ( const ContId  controller_id,
const std::string  controller_name,
const uint32_t  controller_sequence,
const std::set< road::SignId > &&  signals 
)

Definition at line 911 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ControllerParser::Parse().

+ Here is the caller graph for this function:

◆ CreateJunctionBoundingBoxes()

void carla::road::MapBuilder::CreateJunctionBoundingBoxes ( Map map)
private

Create the bounding boxes of each junction.

Definition at line 843 of file MapBuilder.cpp.

References carla::road::Map::_data, carla::road::Lane::Any, carla::road::Map::ComputeTransform(), carla::road::Map::GetJunction(), carla::road::MapData::GetJunctions(), carla::road::Map::GetJunctionWaypoints(), carla::road::Map::GetNext(), and carla::geom::Transform::location.

+ Here is the call graph for this function:

◆ CreateLaneAccess()

void carla::road::MapBuilder::CreateLaneAccess ( Lane lane,
const double  s,
const std::string  restriction 
)

Definition at line 105 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneBorder()

void carla::road::MapBuilder::CreateLaneBorder ( Lane lane,
const double  s,
const double  a,
const double  b,
const double  c,
const double  d 
)

Definition at line 113 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneHeight()

void carla::road::MapBuilder::CreateLaneHeight ( Lane lane,
const double  s,
const double  inner,
const double  outer 
)

Definition at line 124 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneMaterial()

void carla::road::MapBuilder::CreateLaneMaterial ( Lane lane,
const double  s,
const std::string  surface,
const double  friction,
const double  roughness 
)

Definition at line 133 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneRule()

void carla::road::MapBuilder::CreateLaneRule ( Lane lane,
const double  s,
const std::string  value 
)

Definition at line 144 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneSpeed()

void carla::road::MapBuilder::CreateLaneSpeed ( Lane lane,
const double  s,
const double  max,
const std::string  unit 
)

Definition at line 228 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneVisibility()

void carla::road::MapBuilder::CreateLaneVisibility ( Lane lane,
const double  s,
const double  forward,
const double  back,
const double  left,
const double  right 
)

Definition at line 152 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateLaneWidth()

void carla::road::MapBuilder::CreateLaneWidth ( Lane lane,
const double  s,
const double  a,
const double  b,
const double  c,
const double  d 
)

Definition at line 164 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreatePointersBetweenRoadSegments()

void carla::road::MapBuilder::CreatePointersBetweenRoadSegments ( void  )
private

Create the pointers between RoadSegments based on the ids.

Definition at line 734 of file MapBuilder.cpp.

References DEBUG_ASSERT.

◆ CreateRoadMark()

void carla::road::MapBuilder::CreateRoadMark ( Lane lane,
const int  road_mark_id,
const double  s,
const std::string  type,
const std::string  weight,
const std::string  color,
const std::string  material,
const double  width,
const std::string  lane_change,
const double  height,
const std::string  type_name,
const double  type_width 
)

Definition at line 175 of file MapBuilder.cpp.

References carla::road::element::RoadInfoMarkRecord::Both, DEBUG_ASSERT, carla::road::element::RoadInfoMarkRecord::Decrease, carla::road::element::RoadInfoMarkRecord::Increase, carla::road::element::RoadInfoMarkRecord::None, and carla::StringUtil::ToLower().

Referenced by carla::opendrive::parser::ParseLanes().

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

◆ CreateRoadMarkTypeLine()

void carla::road::MapBuilder::CreateRoadMarkTypeLine ( Lane lane,
const int  road_mark_id,
const double  length,
const double  space,
const double  tOffset,
const double  s,
const std::string  rule,
const double  width 
)

Definition at line 207 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::ParseLanes().

+ Here is the caller graph for this function:

◆ CreateRoadSpeed()

void carla::road::MapBuilder::CreateRoadSpeed ( Road road,
const double  s,
const std::string  type,
const double  max,
const std::string  unit 
)

Definition at line 430 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::RoadParser::Parse().

+ Here is the caller graph for this function:

◆ CreateSectionOffset()

void carla::road::MapBuilder::CreateSectionOffset ( Road road,
const double  s,
const double  a,
const double  b,
const double  c,
const double  d 
)

Definition at line 440 of file MapBuilder.cpp.

References DEBUG_ASSERT.

Referenced by carla::opendrive::parser::RoadParser::Parse().

+ Here is the caller graph for this function:

◆ GenerateDefaultValiditiesForSignalReferences()

void carla::road::MapBuilder::GenerateDefaultValiditiesForSignalReferences ( )
private

Generates a default validity field for signal references with missing validity record in OpenDRIVE.

Definition at line 946 of file MapBuilder.cpp.

References carla::road::Both, carla::road::Road::GetLanesByDistance(), carla::road::Negative, and carla::road::Positive.

+ Here is the call graph for this function:

◆ GetEdgeLanePointer()

Lane * carla::road::MapBuilder::GetEdgeLanePointer ( RoadId  road_id,
bool  from_start,
LaneId  lane_id 
)
private

Return the pointer to a lane object.

Definition at line 609 of file MapBuilder.cpp.

References DEBUG_ASSERT, carla::road::Road::GetEndSection(), carla::road::LaneSection::GetLane(), and carla::road::Road::GetStartSection().

+ Here is the call graph for this function:

◆ GetJunctionLanes()

std::vector< std::pair< RoadId, LaneId > > carla::road::MapBuilder::GetJunctionLanes ( JuncId  junction_id,
RoadId  road_id,
LaneId  lane_id 
)
private

Definition at line 697 of file MapBuilder.cpp.

References carla::road::Junction::_connections.

◆ GetLane()

Lane * carla::road::MapBuilder::GetLane ( const RoadId  road_id,
const LaneId  lane_id,
const double  s 
)

Definition at line 596 of file MapBuilder.cpp.

References carla::road::Road::GetLaneByDistance(), and carla::road::Lane::GetRoad().

Referenced by carla::opendrive::parser::ParseLanes().

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

◆ GetLaneNext()

std::vector< Lane * > carla::road::MapBuilder::GetLaneNext ( RoadId  road_id,
SectionId  section_id,
LaneId  lane_id 
)
private

Return a list of pointers to all lanes from a lane (using road and junction info).

Todo:
Is it correct to use a road id as section id? (NS: I just added this cast to avoid compiler warnings).

Definition at line 631 of file MapBuilder.cpp.

References carla::road::Road::_lane_sections, DEBUG_ASSERT, carla::road::LaneSectionMap::GetById(), carla::road::LaneSection::GetDistance(), carla::road::LaneSection::GetLane(), carla::road::Road::GetNextLane(), carla::road::Road::GetPredecessor(), carla::road::Lane::GetPredecessor(), carla::road::Road::GetPrevLane(), carla::road::Road::GetSuccessor(), and carla::road::Lane::GetSuccessor().

+ Here is the call graph for this function:

◆ GetRoad()

Road * carla::road::MapBuilder::GetRoad ( const RoadId  road_id)

Definition at line 603 of file MapBuilder.cpp.

Referenced by carla::opendrive::parser::GeometryParser::Parse(), carla::opendrive::parser::SignalParser::Parse(), carla::opendrive::parser::ProfilesParser::Parse(), and carla::opendrive::parser::ObjectParser::Parse().

+ Here is the caller graph for this function:

◆ RemoveZeroLaneValiditySignalReferences()

void carla::road::MapBuilder::RemoveZeroLaneValiditySignalReferences ( )
private

Removes signal references with lane validity equal to [0,0] as they have no effect on any road.

Definition at line 1013 of file MapBuilder.cpp.

◆ SetGeoReference()

void carla::road::MapBuilder::SetGeoReference ( const geom::GeoLocation geo_reference)
inline

Definition at line 361 of file MapBuilder.h.

References carla::road::MapData::_geo_reference, and _map_data.

Referenced by carla::opendrive::parser::GeoReferenceParser::Parse().

+ Here is the caller graph for this function:

◆ SetRoadLaneLink()

void carla::road::MapBuilder::SetRoadLaneLink ( const RoadId  road_id,
const SectionId  section_index,
const LaneId  lane_id,
const Lane::LaneType  lane_type,
const bool  lane_level,
const LaneId  predecessor,
const LaneId  successor 
)

◆ SolveControllerAndJuntionReferences()

void carla::road::MapBuilder::SolveControllerAndJuntionReferences ( )
private

Solve the references between Controllers and Juntions.

Definition at line 824 of file MapBuilder.cpp.

◆ SolveSignalReferencesAndTransforms()

void carla::road::MapBuilder::SolveSignalReferencesAndTransforms ( )
private

Solves the signal references in the road.

Definition at line 800 of file MapBuilder.cpp.

References carla::road::SignalType::IsTrafficLight().

+ Here is the call graph for this function:

Member Data Documentation

◆ _map_data

MapData carla::road::MapBuilder::_map_data
private

Definition at line 367 of file MapBuilder.h.

Referenced by SetGeoReference().

◆ _temp_lane_info_container

std::unordered_map<Lane *, std::vector<std::unique_ptr<element::RoadInfo> > > carla::road::MapBuilder::_temp_lane_info_container
private

Definition at line 417 of file MapBuilder.h.

◆ _temp_road_info_container

std::unordered_map<Road *, std::vector<std::unique_ptr<element::RoadInfo> > > carla::road::MapBuilder::_temp_road_info_container
private

Map to temporary store all the road and lane infos until the map is built, so they can be added all together.

Definition at line 414 of file MapBuilder.h.

◆ _temp_signal_container

std::unordered_map<SignId, std::unique_ptr<Signal> > carla::road::MapBuilder::_temp_signal_container
private

Definition at line 420 of file MapBuilder.h.

◆ _temp_signal_reference_container

std::vector<element::RoadInfoSignal*> carla::road::MapBuilder::_temp_signal_reference_container
private

Definition at line 422 of file MapBuilder.h.


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