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

#include <Map.h>

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

Public Types

using TopologyList = std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > >>
 

Public Member Functions

std::vector< road::element::LaneMarkingCalculateCrossedLanes (const geom::Location &origin, const geom::Location &destination) const
 
void CookInMemoryMap (const std::string &path) const
 Cooks InMemoryMap used by the traffic manager. More...
 
std::vector< SharedPtr< Waypoint > > GenerateWaypoints (double distance) const
 
std::vector< geom::LocationGetAllCrosswalkZones () const
 
std::vector< SharedPtr< Landmark > > GetAllLandmarks () const
 Returns all the larndmarks in the map. More...
 
std::vector< SharedPtr< Landmark > > GetAllLandmarksOfType (std::string type) const
 Returns all the landmarks in the map of a specific type. More...
 
const geom::GeoLocationGetGeoReference () const
 
SharedPtr< JunctionGetJunction (const Waypoint &waypoint) const
 
std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > GetJunctionWaypoints (road::JuncId id, road::Lane::LaneType type) const
 Returns a pair of waypoints (start and end) for each lane in the junction. More...
 
std::vector< SharedPtr< Landmark > > GetLandmarkGroup (const Landmark &landmark) const
 Returns all the landmarks in the same group including this one. More...
 
std::vector< SharedPtr< Landmark > > GetLandmarksFromId (std::string id) const
 Returns all the larndmarks in the map with a specific OpenDRIVE id. More...
 
const road::MapGetMap () const
 
const std::string & GetName () const
 
const std::string & GetOpenDrive () const
 
const std::vector< geom::Transform > & GetRecommendedSpawnPoints () const
 
TopologyList GetTopology () const
 
SharedPtr< WaypointGetWaypoint (const geom::Location &location, bool project_to_road=true, int32_t lane_type=static_cast< uint32_t >(road::Lane::LaneType::Driving)) const
 
SharedPtr< WaypointGetWaypointXODR (carla::road::RoadId road_id, carla::road::LaneId lane_id, float s) const
 
 Map (rpc::MapInfo description, std::string xodr_content)
 
 Map (std::string name, std::string xodr_content)
 
 ~Map ()
 

Private Attributes

const rpc::MapInfo _description
 
const road::Map _map
 
std::string open_drive_file
 

Additional Inherited Members

- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Detailed Description

Definition at line 27 of file client/Map.h.

Member Typedef Documentation

◆ TopologyList

Definition at line 64 of file client/Map.h.

Constructor & Destructor Documentation

◆ Map() [1/2]

carla::client::Map::Map ( rpc::MapInfo  description,
std::string  xodr_content 
)
explicit

Definition at line 30 of file client/Map.cpp.

References open_drive_file.

◆ Map() [2/2]

carla::client::Map::Map ( std::string  name,
std::string  xodr_content 
)
explicit

Definition at line 35 of file client/Map.cpp.

References open_drive_file, and ~Map().

+ Here is the call graph for this function:

◆ ~Map()

carla::client::Map::~Map ( )
default

Referenced by Map().

+ Here is the caller graph for this function:

Member Function Documentation

◆ CalculateCrossedLanes()

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

Definition at line 105 of file client/Map.cpp.

References _map, and carla::road::Map::CalculateCrossedLanes().

+ Here is the call graph for this function:

◆ CookInMemoryMap()

void carla::client::Map::CookInMemoryMap ( const std::string &  path) const

Cooks InMemoryMap used by the traffic manager.

Definition at line 187 of file client/Map.cpp.

References carla::traffic_manager::InMemoryMap::Cook().

+ Here is the call graph for this function:

◆ GenerateWaypoints()

std::vector< SharedPtr< Waypoint > > carla::client::Map::GenerateWaypoints ( double  distance) const

Definition at line 95 of file client/Map.cpp.

References _map, and carla::road::Map::GenerateWaypoints().

+ Here is the call graph for this function:

◆ GetAllCrosswalkZones()

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

Definition at line 115 of file client/Map.cpp.

References _map, and carla::road::Map::GetAllCrosswalkZones().

+ Here is the call graph for this function:

◆ GetAllLandmarks()

std::vector< SharedPtr< Landmark > > carla::client::Map::GetAllLandmarks ( ) const

Returns all the larndmarks in the map.

Definition at line 138 of file client/Map.cpp.

References _map, and carla::road::Map::GetAllSignalReferences().

+ Here is the call graph for this function:

◆ GetAllLandmarksOfType()

std::vector< SharedPtr< Landmark > > carla::client::Map::GetAllLandmarksOfType ( std::string  type) const

Returns all the landmarks in the map of a specific type.

Definition at line 160 of file client/Map.cpp.

References _map, and carla::road::Map::GetAllSignalReferences().

+ Here is the call graph for this function:

◆ GetGeoReference()

const geom::GeoLocation & carla::client::Map::GetGeoReference ( ) const

Definition at line 111 of file client/Map.cpp.

References _map, and carla::road::Map::GetGeoReference().

+ Here is the call graph for this function:

◆ GetJunction()

SharedPtr< Junction > carla::client::Map::GetJunction ( const Waypoint waypoint) const

Definition at line 119 of file client/Map.cpp.

References carla::road::Map::GetJunction(), carla::client::Waypoint::GetJunctionId(), and GetMap().

+ Here is the call graph for this function:

◆ GetJunctionWaypoints()

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

Returns a pair of waypoints (start and end) for each lane in the junction.

Definition at line 125 of file client/Map.cpp.

References carla::road::Map::GetJunctionWaypoints(), and GetMap().

+ Here is the call graph for this function:

◆ GetLandmarkGroup()

std::vector< SharedPtr< Landmark > > carla::client::Map::GetLandmarkGroup ( const Landmark landmark) const

Returns all the landmarks in the same group including this one.

Definition at line 173 of file client/Map.cpp.

References _map, carla::client::Landmark::_signal, carla::road::Signal::GetControllers(), carla::road::Map::GetControllers(), GetLandmarksFromId(), carla::road::element::RoadInfoSignal::GetSignal(), and carla::road::Map::GetSignals().

+ Here is the call graph for this function:

◆ GetLandmarksFromId()

std::vector< SharedPtr< Landmark > > carla::client::Map::GetLandmarksFromId ( std::string  id) const

Returns all the larndmarks in the map with a specific OpenDRIVE id.

Definition at line 148 of file client/Map.cpp.

References _map, and carla::road::Map::GetAllSignalReferences().

Referenced by GetLandmarkGroup().

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

◆ GetMap()

const road::Map& carla::client::Map::GetMap ( ) const
inline

Definition at line 42 of file client/Map.h.

Referenced by GetJunction(), and GetJunctionWaypoints().

+ Here is the caller graph for this function:

◆ GetName()

const std::string& carla::client::Map::GetName ( ) const
inline

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

◆ GetOpenDrive()

const std::string& carla::client::Map::GetOpenDrive ( ) const
inline

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

◆ GetRecommendedSpawnPoints()

const std::vector<geom::Transform>& carla::client::Map::GetRecommendedSpawnPoints ( ) const
inline

Definition at line 50 of file client/Map.h.

References carla::road::Lane::Driving.

◆ GetTopology()

Map::TopologyList carla::client::Map::GetTopology ( ) const

Definition at line 70 of file client/Map.cpp.

References _map, and carla::road::Map::GenerateTopology().

+ Here is the call graph for this function:

◆ GetWaypoint()

SharedPtr< Waypoint > carla::client::Map::GetWaypoint ( const geom::Location location,
bool  project_to_road = true,
int32_t  lane_type = static_cast<uint32_t>(road::Lane::LaneType::Driving) 
) const

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

References _map, carla::road::Map::GetClosestWaypointOnRoad(), and carla::road::Map::GetWaypoint().

+ Here is the call graph for this function:

◆ GetWaypointXODR()

SharedPtr< Waypoint > carla::client::Map::GetWaypointXODR ( carla::road::RoadId  road_id,
carla::road::LaneId  lane_id,
float  s 
) const

Definition at line 59 of file client/Map.cpp.

References _map, and carla::road::Map::GetWaypoint().

+ Here is the call graph for this function:

Member Data Documentation

◆ _description

const rpc::MapInfo carla::client::Map::_description
private

Definition at line 104 of file client/Map.h.

◆ _map

const road::Map carla::client::Map::_map
private

◆ open_drive_file

std::string carla::client::Map::open_drive_file
private

Definition at line 102 of file client/Map.h.

Referenced by Map().


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