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

#include <Map.h>

+ Inheritance diagram for carla::road::Map:
+ Collaboration diagram for carla::road::Map:

Classes

struct  SignalSearchData
 Data structure for the signal search. More...
 

Public Types

using Waypoint = element::Waypoint
 

Public Member Functions

std::vector< element::LaneMarkingCalculateCrossedLanes (const geom::Location &origin, const geom::Location &destination) const
 
std::unordered_map< road::RoadId, std::unordered_set< road::RoadId > > ComputeJunctionConflicts (JuncId id) const
 
geom::Transform ComputeTransform (Waypoint waypoint) const
 
std::vector< JuncIdFilterJunctionsByPosition (const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
 
std::vector< RoadIdFilterRoadsByPosition (const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
 
std::vector< std::unique_ptr< geom::Mesh > > GenerateChunkedMesh (const rpc::OpendriveGenerationParameters &params) const
 
void GenerateJunctions (const carla::geom::MeshFactory &mesh_factory, const rpc::OpendriveGenerationParameters &params, const geom::Vector3D &minpos, const geom::Vector3D &maxpos, std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh >>> *juntion_out_mesh_list) const
 
std::vector< std::unique_ptr< geom::Mesh > > GenerateLineMarkings (const rpc::OpendriveGenerationParameters &params, const geom::Vector3D &minpos, const geom::Vector3D &maxpos, std::vector< std::string > &outinfo) const
 Buids a list of meshes related with LineMarkings. More...
 
geom::Mesh GenerateMesh (const double distance, const float extra_width=0.6f, const bool smooth_junctions=true) const
 Buids a mesh based on the OpenDRIVE. More...
 
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > GenerateOrderedChunkedMeshInLocations (const rpc::OpendriveGenerationParameters &params, const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
 
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > GenerateRoadsMultithreaded (const carla::geom::MeshFactory &mesh_factory, const std::vector< RoadId > &RoadsID, const size_t index, const size_t number_of_roads_per_thread) const
 
void GenerateSingleJunction (const carla::geom::MeshFactory &mesh_factory, const JuncId Id, std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh >>> *junction_out_mesh_list) const
 
std::vector< std::pair< Waypoint, Waypoint > > GenerateTopology () const
 Generate the minimum set of waypoints that define the topology of map. More...
 
geom::Mesh GenerateWalls (const double distance, const float wall_height) const
 
std::vector< WaypointGenerateWaypoints (double approx_distance) const
 Generate all the waypoints in map separated by approx_distance. More...
 
std::vector< WaypointGenerateWaypointsInRoad (RoadId road_id, Lane::LaneType lane_type=Lane::LaneType::Driving) const
 Generate waypoints at the entry of each lane of the specified road. More...
 
std::vector< WaypointGenerateWaypointsOnRoadEntries (Lane::LaneType lane_type=Lane::LaneType::Driving) const
 Generate waypoints on each lane at the start of each road. More...
 
geom::Mesh GetAllCrosswalkMesh () const
 Buids a mesh of all crosswalks based on the OpenDRIVE. More...
 
std::vector< geom::LocationGetAllCrosswalkZones () const
 Returns a list of locations defining 2d areas, when a location is repeated an area is finished. More...
 
std::vector< const element::RoadInfoSignal * > GetAllSignalReferences () const
 Return all RoadInfoSignal in the map. More...
 
boost::optional< element::WaypointGetClosestWaypointOnRoad (const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const
 ========================================================================

– Geometry ---------------------------------------------------------—

More...
 
const std::unordered_map< ContId, std::unique_ptr< Controller > > & GetControllers () const
 
const geom::GeoLocationGetGeoReference () const
 ========================================================================

– Georeference -----------------------------------------------------—

More...
 
JunctionGetJunction (JuncId id)
 
const JunctionGetJunction (JuncId id) const
 
JuncId GetJunctionId (RoadId road_id) const
 
std::vector< carla::geom::BoundingBoxGetJunctionsBoundingBoxes () const
 
std::vector< std::pair< Waypoint, Waypoint > > GetJunctionWaypoints (JuncId id, Lane::LaneType lane_type) const
 Generate waypoints of the junction. More...
 
const LaneGetLane (Waypoint waypoint) const
 ========================================================================

Road information -------------------------------------------------—

More...
 
Lane::LaneType GetLaneType (Waypoint waypoint) const
 
double GetLaneWidth (Waypoint waypoint) const
 
boost::optional< WaypointGetLeft (Waypoint waypoint) const
 Return a waypoint at the lane of waypoint's left lane. More...
 
std::pair< const element::RoadInfoMarkRecord *, const element::RoadInfoMarkRecord * > GetMarkRecord (Waypoint waypoint) const
 
std::vector< WaypointGetNext (Waypoint waypoint, double distance) const
 Return the list of waypoints at distance such that a vehicle at waypoint could drive to. More...
 
std::vector< WaypointGetPredecessors (Waypoint waypoint) const
 
std::vector< WaypointGetPrevious (Waypoint waypoint, double distance) const
 Return the list of waypoints at distance in the reversed direction that a vehicle at waypoint could drive to. More...
 
boost::optional< WaypointGetRight (Waypoint waypoint) const
 Return a waypoint at the lane of waypoint's right lane. More...
 
const std::unordered_map< SignId, std::unique_ptr< Signal > > & GetSignals () const
 
std::vector< SignalSearchDataGetSignalsInDistance (Waypoint waypoint, double distance, bool stop_at_junction=false) const
 Searches signals from an initial waypoint until the defined distance. More...
 
std::vector< WaypointGetSuccessors (Waypoint waypoint) const
 ========================================================================

– Waypoint generation -------------------------------------------——

More...
 
std::vector< std::pair< geom::Transform, std::string > > GetTreesTransform (const geom::Vector3D &minpos, const geom::Vector3D &maxpos, float distancebetweentrees, float distancefromdrivinglineborder, float s_offset=0) const
 
boost::optional< element::WaypointGetWaypoint (const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const
 
boost::optional< element::WaypointGetWaypoint (RoadId road_id, LaneId lane_id, float s) const
 
float GetZPosInDeformation (float posx, float posy) const
 
bool IsJunction (RoadId road_id) const
 
 Map (MapData m)
 ========================================================================

– Constructor ------------------------------------------------------—

More...
 
std::unique_ptr< geom::MeshSDFToMesh (const road::Junction &jinput, const std::vector< geom::Vector3D > &sdfinput, int grid_cells_per_dim) const
 

Private Types

using Rtree = geom::SegmentCloudRtree< Waypoint >
 

Private Member Functions

void AddElementToRtree (std::vector< Rtree::TreeElement > &rtree_elements, geom::Transform &current_transform, geom::Transform &next_transform, Waypoint &current_waypoint, Waypoint &next_waypoint)
 Helper Functions for constructing the rtree element list. More...
 
void AddElementToRtreeAndUpdateTransforms (std::vector< Rtree::TreeElement > &rtree_elements, geom::Transform &current_transform, Waypoint &current_waypoint, Waypoint &next_waypoint)
 
void CreateRtree ()
 
- Private Member Functions inherited from carla::MovableNonCopyable
 MovableNonCopyable ()=default
 
 MovableNonCopyable (const MovableNonCopyable &)=delete
 
 MovableNonCopyable (MovableNonCopyable &&)=default
 
MovableNonCopyableoperator= (const MovableNonCopyable &)=delete
 
MovableNonCopyableoperator= (MovableNonCopyable &&)=default
 

Private Attributes

MapData _data
 
Rtree _rtree
 
friend MapBuilder
 

Detailed Description

Definition at line 29 of file road/Map.h.

Member Typedef Documentation

◆ Rtree

Definition at line 209 of file road/Map.h.

◆ Waypoint

Definition at line 32 of file road/Map.h.

Constructor & Destructor Documentation

◆ Map()

carla::road::Map::Map ( MapData  m)
inline

========================================================================

– Constructor ------------------------------------------------------—

Definition at line 38 of file road/Map.h.

References CreateRtree().

+ Here is the call graph for this function:

Member Function Documentation

◆ AddElementToRtree()

void carla::road::Map::AddElementToRtree ( std::vector< Rtree::TreeElement > &  rtree_elements,
geom::Transform current_transform,
geom::Transform next_transform,
Waypoint current_waypoint,
Waypoint next_waypoint 
)
private

Helper Functions for constructing the rtree element list.

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

References carla::geom::Transform::location, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.

◆ AddElementToRtreeAndUpdateTransforms()

void carla::road::Map::AddElementToRtreeAndUpdateTransforms ( std::vector< Rtree::TreeElement > &  rtree_elements,
geom::Transform current_transform,
Waypoint current_waypoint,
Waypoint next_waypoint 
)
private

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

◆ CalculateCrossedLanes()

std::vector< LaneMarking > carla::road::Map::CalculateCrossedLanes ( const geom::Location origin,
const geom::Location destination 
) const

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

References carla::road::element::LaneCrossingCalculator::Calculate().

Referenced by carla::client::Map::CalculateCrossedLanes(), and GetGeoReference().

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

◆ ComputeJunctionConflicts()

std::unordered_map< road::RoadId, std::unordered_set< road::RoadId > > carla::road::Map::ComputeJunctionConflicts ( JuncId  id) const

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

References carla::geom::BoundingBox::extent, carla::road::Junction::GetBoundingBox(), and carla::geom::BoundingBox::location.

Referenced by carla::road::MapBuilder::ComputeJunctionRoadConflicts().

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

◆ ComputeTransform()

geom::Transform carla::road::Map::ComputeTransform ( Waypoint  waypoint) const

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

References carla::road::element::Waypoint::s.

Referenced by carla::road::element::LaneCrossingCalculator::Calculate(), carla::road::MapBuilder::CheckSignalsOnRoads(), carla::road::MapBuilder::CreateJunctionBoundingBoxes(), and GetGeoReference().

+ Here is the caller graph for this function:

◆ CreateRtree()

void carla::road::Map::CreateRtree ( )
private

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

References carla::road::Lane::Any, carla::road::ForEachLane(), carla::geom::Transform::GetForwardVector(), carla::road::GetRemainingLength(), carla::geom::Math::GetVectorAngle(), carla::road::Lane::IsStraight(), min(), and RELEASE_ASSERT.

Referenced by Map().

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

◆ FilterJunctionsByPosition()

std::vector< JuncId > carla::road::Map::FilterJunctionsByPosition ( const geom::Vector3D minpos,
const geom::Vector3D maxpos 
) const

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

References carla::geom::Vector3D::x, and carla::geom::Vector3D::y.

◆ FilterRoadsByPosition()

std::vector< RoadId > carla::road::Map::FilterRoadsByPosition ( const geom::Vector3D minpos,
const geom::Vector3D maxpos 
) const

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

References carla::road::Lane::ComputeTransform(), carla::road::Lane::GetDistance(), carla::geom::Transform::location, carla::geom::Vector3D::x, and carla::geom::Vector3D::y.

+ Here is the call graph for this function:

◆ GenerateChunkedMesh()

std::vector< std::unique_ptr< geom::Mesh > > carla::road::Map::GenerateChunkedMesh ( const rpc::OpendriveGenerationParameters params) const

◆ GenerateJunctions()

void carla::road::Map::GenerateJunctions ( const carla::geom::MeshFactory mesh_factory,
const rpc::OpendriveGenerationParameters params,
const geom::Vector3D minpos,
const geom::Vector3D maxpos,
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh >>> *  juntion_out_mesh_list 
) const

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

Referenced by GenerateOrderedChunkedMeshInLocations().

+ Here is the caller graph for this function:

◆ GenerateLineMarkings()

std::vector< std::unique_ptr< geom::Mesh > > carla::road::Map::GenerateLineMarkings ( const rpc::OpendriveGenerationParameters params,
const geom::Vector3D minpos,
const geom::Vector3D maxpos,
std::vector< std::string > &  outinfo 
) const

Buids a list of meshes related with LineMarkings.

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

References carla::geom::MeshFactory::GenerateLaneMarkForRoad().

+ Here is the call graph for this function:

◆ GenerateMesh()

geom::Mesh carla::road::Map::GenerateMesh ( const double  distance,
const float  extra_width = 0.6f,
const bool  smooth_junctions = true 
) const

Buids a mesh based on the OpenDRIVE.

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

References carla::geom::MeshFactory::RoadParameters::extra_lane_width, carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::MergeAndSmooth(), RELEASE_ASSERT, carla::geom::MeshFactory::RoadParameters::resolution, and carla::geom::MeshFactory::road_param.

+ Here is the call graph for this function:

◆ GenerateOrderedChunkedMeshInLocations()

std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > carla::road::Map::GenerateOrderedChunkedMeshInLocations ( const rpc::OpendriveGenerationParameters params,
const geom::Vector3D minpos,
const geom::Vector3D maxpos 
) const

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

References GenerateJunctions().

+ Here is the call graph for this function:

◆ GenerateRoadsMultithreaded()

std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > carla::road::Map::GenerateRoadsMultithreaded ( const carla::geom::MeshFactory mesh_factory,
const std::vector< RoadId > &  RoadsID,
const size_t  index,
const size_t  number_of_roads_per_thread 
) const

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

References carla::geom::MeshFactory::GenerateAllOrderedWithMaxLen().

+ Here is the call graph for this function:

◆ GenerateSingleJunction()

void carla::road::Map::GenerateSingleJunction ( const carla::geom::MeshFactory mesh_factory,
const JuncId  Id,
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh >>> *  junction_out_mesh_list 
) const

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

References carla::road::Lane::Driving, carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), and carla::road::Lane::Sidewalk.

+ Here is the call graph for this function:

◆ GenerateTopology()

std::vector< std::pair< Waypoint, Waypoint > > carla::road::Map::GenerateTopology ( ) const

Generate the minimum set of waypoints that define the topology of map.

The waypoints are placed at the entrance of each lane.

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

References carla::road::ForEachDrivableLane(), and carla::road::GetDistanceAtEndOfLane().

Referenced by carla::client::Map::GetTopology().

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

◆ GenerateWalls()

geom::Mesh carla::road::Map::GenerateWalls ( const double  distance,
const float  wall_height 
) const

◆ GenerateWaypoints()

std::vector< Waypoint > carla::road::Map::GenerateWaypoints ( double  approx_distance) const

Generate all the waypoints in map separated by approx_distance.

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

References carla::road::EPSILON, carla::road::ForEachDrivableLaneAt(), and RELEASE_ASSERT.

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

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

◆ GenerateWaypointsInRoad()

std::vector< Waypoint > carla::road::Map::GenerateWaypointsInRoad ( RoadId  road_id,
Lane::LaneType  lane_type = Lane::LaneType::Driving 
) const

Generate waypoints at the entry of each lane of the specified road.

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

◆ GenerateWaypointsOnRoadEntries()

std::vector< Waypoint > carla::road::Map::GenerateWaypointsOnRoadEntries ( Lane::LaneType  lane_type = Lane::LaneType::Driving) const

Generate waypoints on each lane at the start of each road.

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

◆ GetAllCrosswalkMesh()

geom::Mesh carla::road::Map::GetAllCrosswalkMesh ( ) const

Buids a mesh of all crosswalks based on the OpenDRIVE.

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

References carla::geom::Mesh::AddMaterial(), carla::geom::Mesh::AddTriangleFan(), and carla::geom::Mesh::EndMaterial().

+ Here is the call graph for this function:

◆ GetAllCrosswalkZones()

std::vector< geom::Location > carla::road::Map::GetAllCrosswalkZones ( ) const

Returns a list of locations defining 2d areas, when a location is repeated an area is finished.

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

References carla::road::element::Waypoint::lane_id, carla::geom::Transform::location, carla::road::element::Waypoint::road_id, carla::geom::Transform::rotation, carla::road::element::Waypoint::s, carla::road::element::Waypoint::section_id, carla::geom::Transform::TransformPoint(), carla::geom::Vector3D::x, and carla::geom::Rotation::yaw.

Referenced by carla::client::Map::GetAllCrosswalkZones(), and GetGeoReference().

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

◆ GetAllSignalReferences()

std::vector< const element::RoadInfoSignal * > carla::road::Map::GetAllSignalReferences ( ) const

Return all RoadInfoSignal in the map.

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

Referenced by carla::client::Map::GetAllLandmarks(), carla::client::Map::GetAllLandmarksOfType(), and carla::client::Map::GetLandmarksFromId().

+ Here is the caller graph for this function:

◆ GetClosestWaypointOnRoad()

boost::optional< Waypoint > carla::road::Map::GetClosestWaypointOnRoad ( const geom::Location location,
int32_t  lane_type = static_cast<int32_t>(Lane::LaneType::Driving) 
) const

========================================================================

– Geometry ---------------------------------------------------------—

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

References carla::geom::Math::DistanceSegmentToPoint(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::s, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.

Referenced by carla::road::element::LaneCrossingCalculator::Calculate(), carla::road::MapBuilder::CheckSignalsOnRoads(), GetGeoReference(), and carla::client::Map::GetWaypoint().

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

◆ GetControllers()

const std::unordered_map<ContId, std::unique_ptr<Controller> >& carla::road::Map::GetControllers ( ) const
inline

Definition at line 192 of file road/Map.h.

References _data, carla::road::MapData::GetControllers(), and GetJunctionsBoundingBoxes().

Referenced by carla::client::Map::GetLandmarkGroup().

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

◆ GetGeoReference()

const geom::GeoLocation& carla::road::Map::GetGeoReference ( ) const
inline

========================================================================

– Georeference -----------------------------------------------------—

Definition at line 46 of file road/Map.h.

References _data, CalculateCrossedLanes(), ComputeTransform(), carla::road::Lane::Driving, GetAllCrosswalkZones(), GetClosestWaypointOnRoad(), carla::road::MapData::GetGeoReference(), GetJunctionId(), GetLane(), GetLaneType(), GetLaneWidth(), GetMarkRecord(), GetWaypoint(), and IsJunction().

Referenced by carla::client::Map::GetGeoReference().

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

◆ GetJunction() [1/2]

Junction * carla::road::Map::GetJunction ( JuncId  id)

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

Referenced by carla::road::MapBuilder::CreateJunctionBoundingBoxes(), and carla::client::Map::GetJunction().

+ Here is the caller graph for this function:

◆ GetJunction() [2/2]

const Junction * carla::road::Map::GetJunction ( JuncId  id) const

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

◆ GetJunctionId()

JuncId carla::road::Map::GetJunctionId ( RoadId  road_id) const

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

Referenced by GetGeoReference().

+ Here is the caller graph for this function:

◆ GetJunctionsBoundingBoxes()

std::vector< carla::geom::BoundingBox > carla::road::Map::GetJunctionsBoundingBoxes ( ) const

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

References carla::geom::BoundingBox::extent.

Referenced by GetControllers().

+ Here is the caller graph for this function:

◆ GetJunctionWaypoints()

std::vector< std::pair< Waypoint, Waypoint > > carla::road::Map::GetJunctionWaypoints ( JuncId  id,
Lane::LaneType  lane_type 
) const

Generate waypoints of the junction.

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

References carla::road::ForEachLane(), carla::road::Junction::GetConnections(), carla::road::GetDistanceAtEndOfLane(), and carla::road::element::Waypoint::s.

Referenced by carla::road::MapBuilder::CreateJunctionBoundingBoxes(), and carla::client::Map::GetJunctionWaypoints().

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

◆ GetLane()

const Lane & carla::road::Map::GetLane ( Waypoint  waypoint) const

========================================================================

Road information -------------------------------------------------—

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

References carla::road::Road::GetLaneById(), carla::road::Lane::GetRoad(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::road_id, and carla::road::element::Waypoint::section_id.

Referenced by GetGeoReference().

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

◆ GetLaneType()

Lane::LaneType carla::road::Map::GetLaneType ( Waypoint  waypoint) const

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

Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), and GetGeoReference().

+ Here is the caller graph for this function:

◆ GetLaneWidth()

double carla::road::Map::GetLaneWidth ( Waypoint  waypoint) const

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

References RELEASE_ASSERT, and carla::road::element::Waypoint::s.

Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), and GetGeoReference().

+ Here is the caller graph for this function:

◆ GetLeft()

boost::optional< Waypoint > carla::road::Map::GetLeft ( Waypoint  waypoint) const

Return a waypoint at the lane of waypoint's left lane.

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

References carla::road::IsLanePresent(), carla::road::element::Waypoint::lane_id, and RELEASE_ASSERT.

Referenced by carla::road::MapBuilder::CheckSignalsOnRoads().

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

◆ GetMarkRecord()

std::pair< const RoadInfoMarkRecord *, const RoadInfoMarkRecord * > carla::road::Map::GetMarkRecord ( Waypoint  waypoint) const

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

References carla::road::element::Waypoint::lane_id, RELEASE_ASSERT, carla::road::element::Waypoint::s, and carla::road::element::Waypoint::section_id.

Referenced by carla::road::element::CrossingAtSameSection(), and GetGeoReference().

+ Here is the caller graph for this function:

◆ GetNext()

std::vector< Waypoint > carla::road::Map::GetNext ( Waypoint  waypoint,
double  distance 
) const

Return the list of waypoints at distance such that a vehicle at waypoint could drive to.

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

References carla::road::ConcatVectors(), DEBUG_ASSERT, carla::road::EPSILON, carla::road::element::Waypoint::lane_id, RELEASE_ASSERT, carla::road::element::Waypoint::road_id, carla::road::element::Waypoint::s, and carla::road::element::Waypoint::section_id.

Referenced by carla::road::MapBuilder::CreateJunctionBoundingBoxes().

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

◆ GetPredecessors()

std::vector< Waypoint > carla::road::Map::GetPredecessors ( Waypoint  waypoint) const

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

References carla::road::GetDistanceAtEndOfLane(), and RELEASE_ASSERT.

+ Here is the call graph for this function:

◆ GetPrevious()

std::vector< Waypoint > carla::road::Map::GetPrevious ( Waypoint  waypoint,
double  distance 
) const

Return the list of waypoints at distance in the reversed direction that a vehicle at waypoint could drive to.

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

References carla::road::ConcatVectors(), DEBUG_ASSERT, carla::road::EPSILON, carla::road::element::Waypoint::lane_id, RELEASE_ASSERT, carla::road::element::Waypoint::road_id, carla::road::element::Waypoint::s, and carla::road::element::Waypoint::section_id.

+ Here is the call graph for this function:

◆ GetRight()

boost::optional< Waypoint > carla::road::Map::GetRight ( Waypoint  waypoint) const

Return a waypoint at the lane of waypoint's right lane.

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

References carla::road::IsLanePresent(), carla::road::element::Waypoint::lane_id, and RELEASE_ASSERT.

Referenced by carla::road::MapBuilder::CheckSignalsOnRoads().

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

◆ GetSignals()

const std::unordered_map<SignId, std::unique_ptr<Signal> >& carla::road::Map::GetSignals ( ) const
inline

Definition at line 188 of file road/Map.h.

References _data, and carla::road::MapData::GetSignals().

Referenced by carla::client::Map::GetLandmarkGroup().

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

◆ GetSignalsInDistance()

std::vector< Map::SignalSearchData > carla::road::Map::GetSignalsInDistance ( Waypoint  waypoint,
double  distance,
bool  stop_at_junction = false 
) const

Searches signals from an initial waypoint until the defined distance.

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

References carla::road::ConcatVectors(), DEBUG_ASSERT, carla::road::element::RoadInfo::GetDistance(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::road_id, and carla::road::element::Waypoint::s.

+ Here is the call graph for this function:

◆ GetSuccessors()

std::vector< Waypoint > carla::road::Map::GetSuccessors ( Waypoint  waypoint) const

========================================================================

– Waypoint generation -------------------------------------------——

Return the list of waypoints placed at the entrance of each drivable successor lane; i.e., the list of each waypoint in the next road segment that a vehicle could drive from waypoint.

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

References carla::road::GetDistanceAtStartOfLane(), and RELEASE_ASSERT.

+ Here is the call graph for this function:

◆ GetTreesTransform()

std::vector< std::pair< geom::Transform, std::string > > carla::road::Map::GetTreesTransform ( const geom::Vector3D minpos,
const geom::Vector3D maxpos,
float  distancebetweentrees,
float  distancefromdrivinglineborder,
float  s_offset = 0 
) const

◆ GetWaypoint() [1/2]

boost::optional< Waypoint > carla::road::Map::GetWaypoint ( const geom::Location location,
int32_t  lane_type = static_cast<int32_t>(Lane::LaneType::Driving) 
) const

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

References carla::geom::Math::Distance2D(), carla::geom::CubicPolynomial::Evaluate(), and carla::road::element::RoadInfoLaneWidth::GetPolynomial().

Referenced by GetGeoReference(), carla::client::Map::GetWaypoint(), carla::client::Map::GetWaypointXODR(), and carla::road::element::IsOffRoad().

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

◆ GetWaypoint() [2/2]

boost::optional< Waypoint > carla::road::Map::GetWaypoint ( RoadId  road_id,
LaneId  lane_id,
float  s 
) const

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

References carla::road::Road::GetLaneSectionsAt(), carla::road::Road::GetLength(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::road_id, carla::road::element::Waypoint::s, and carla::road::element::Waypoint::section_id.

+ Here is the call graph for this function:

◆ GetZPosInDeformation()

float carla::road::Map::GetZPosInDeformation ( float  posx,
float  posy 
) const
inline

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

References carla::geom::deformation::GetBumpDeformation(), and carla::geom::deformation::GetZPosInDeformation().

+ Here is the call graph for this function:

◆ IsJunction()

bool carla::road::Map::IsJunction ( RoadId  road_id) const

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

Referenced by carla::road::element::LaneCrossingCalculator::Calculate(), and GetGeoReference().

+ Here is the caller graph for this function:

◆ SDFToMesh()

std::unique_ptr< geom::Mesh > carla::road::Map::SDFToMesh ( const road::Junction jinput,
const std::vector< geom::Vector3D > &  sdfinput,
int  grid_cells_per_dim 
) const

Member Data Documentation

◆ _data

MapData carla::road::Map::_data
private

◆ _rtree

Rtree carla::road::Map::_rtree
private

Definition at line 210 of file road/Map.h.

◆ MapBuilder

friend carla::road::Map::MapBuilder
private

Definition at line 206 of file road/Map.h.


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