|
CARLA
|
#include <Map.h>
Inheritance diagram for carla::road::Map:Classes | |
| struct | SignalSearchData |
| Data structure for the signal search. More... | |
| struct | StencilSearchData |
| Data structure for the stencil search. More... | |
Public Types | |
| using | Waypoint = element::Waypoint |
Public Member Functions | |
| std::vector< element::LaneMarking > | CalculateCrossedLanes (const geom::Location &origin, const geom::Location &destination) const |
| std::unordered_map< road::RoadId, std::unordered_set< road::RoadId > > | ComputeJunctionConflicts (JuncId id) const |
| std::unordered_set< road::RoadId > | ComputeSkippedGenerationRoads () const |
| Roads excluded from mesh/marking generation: link-less sub-2m slivers and link-less duplicate traces overlapping a connected road (DeepMap/NuRec export artifacts that render as floating slabs of road stacked on the real carriageway). | |
| geom::Transform | ComputeTransform (Waypoint waypoint) const |
| std::vector< JuncId > | FilterJunctionsByPosition (const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const |
| std::vector< RoadId > | FilterRoadsByPosition (const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const |
| std::vector< std::unique_ptr< geom::Mesh > > | GenerateChunkedMesh (const rpc::OpendriveGenerationParameters ¶ms) const |
| std::unique_ptr< geom::Mesh > | GenerateJunctionFill (const road::Junction &junction, const geom::Mesh &corridor_mesh) const |
| Paves the regions a junction's lane corridors enclose but don't cover (see GenerateChunkedMesh). | |
| void | GenerateJunctions (const carla::geom::MeshFactory &mesh_factory, const rpc::OpendriveGenerationParameters ¶ms, 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 ¶ms, const geom::Vector3D &minpos, const geom::Vector3D &maxpos, std::vector< std::string > &outinfo) const |
| Buids a list of meshes related with LineMarkings. | |
| 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. | |
| std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > | GenerateOrderedChunkedMeshInLocations (const rpc::OpendriveGenerationParameters ¶ms, 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. | |
| geom::Mesh | GenerateWalls (const double distance, const float wall_height) const |
| std::vector< Waypoint > | GenerateWaypoints (double approx_distance) const |
| Generate all the waypoints in map separated by approx_distance. | |
| std::vector< Waypoint > | GenerateWaypointsInRoad (RoadId road_id, Lane::LaneType lane_type=Lane::LaneType::Driving) const |
| Generate waypoints at the entry of each lane of the specified road. | |
| std::vector< Waypoint > | GenerateWaypointsOnRoadEntries (Lane::LaneType lane_type=Lane::LaneType::Driving) const |
| Generate waypoints on each lane at the start of each road. | |
| geom::Mesh | GetAllCrosswalkMesh () const |
| Buids a mesh of all crosswalks based on the OpenDRIVE. | |
| std::vector< geom::Location > | GetAllCrosswalkZones () const |
| Returns a list of locations defining 2d areas, when a location is repeated an area is finished. | |
| std::vector< const element::RoadInfoSignal * > | GetAllSignalReferences () const |
| Return all RoadInfoSignal in the map. | |
| std::vector< const element::RoadInfoStencil * > | GetAllStencilReferences () const |
| Return all RoadInfoStencil in the map. | |
| std::optional< element::Waypoint > | GetClosestWaypointOnRoad (const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const |
| ======================================================================== | |
| const std::unordered_map< ContId, std::unique_ptr< Controller > > & | GetControllers () const |
| const MapData & | GetData () const |
| Read-only access to the parsed OpenDRIVE data: roads, junctions, signals and controllers. | |
| const geom::GeoProjection & | GetGeoProjection () const |
| const geom::GeoLocation & | GetGeoReference () const |
| ======================================================================== | |
| Junction * | GetJunction (JuncId id) |
| const Junction * | GetJunction (JuncId id) const |
| JuncId | GetJunctionId (RoadId road_id) const |
| std::vector< carla::geom::BoundingBox > | GetJunctionsBoundingBoxes () const |
| std::vector< std::pair< Waypoint, Waypoint > > | GetJunctionWaypoints (JuncId id, Lane::LaneType lane_type) const |
| Generate waypoints of the junction. | |
| const Lane & | GetLane (Waypoint waypoint) const |
| ======================================================================== | |
| Lane::LaneType | GetLaneType (Waypoint waypoint) const |
| double | GetLaneWidth (Waypoint waypoint) const |
| std::optional< Waypoint > | GetLeft (Waypoint waypoint) const |
| Return a waypoint at the lane of waypoint's left lane. | |
| std::pair< const element::RoadInfoMarkRecord *, const element::RoadInfoMarkRecord * > | GetMarkRecord (Waypoint waypoint) const |
| std::vector< Waypoint > | GetNext (Waypoint waypoint, double distance) const |
| Return the list of waypoints at distance such that a vehicle at waypoint could drive to. | |
| std::vector< Waypoint > | GetPredecessors (Waypoint waypoint) const |
| std::vector< Waypoint > | 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. | |
| std::optional< Waypoint > | GetRight (Waypoint waypoint) const |
| Return a waypoint at the lane of waypoint's right lane. | |
| const std::unordered_map< SignId, std::unique_ptr< Signal > > & | GetSignals () const |
| std::vector< SignalSearchData > | GetSignalsInDistance (Waypoint waypoint, double distance, bool stop_at_junction=false) const |
| Searches signals from an initial waypoint until the defined distance. | |
| const std::unordered_map< StencilId, std::unique_ptr< Stencil > > & | GetStencils () const |
| std::vector< StencilSearchData > | GetStencilsInDistance (Waypoint waypoint, double distance, bool stop_at_junction=false) const |
| Searches stencils from an initial waypoint until the defined distance. | |
| std::vector< Waypoint > | GetSuccessors (Waypoint waypoint) const |
| ======================================================================== | |
| 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, bool measure_from_curb=false, bool keep_on_sidewalk=false) const |
| std::optional< element::Waypoint > | GetWaypoint (const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const |
| std::optional< element::Waypoint > | GetWaypoint (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) | |
| ======================================================================== | |
| std::unique_ptr< geom::Mesh > | SDFToMesh (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 ¤t_transform, geom::Transform &next_transform, Waypoint ¤t_waypoint, Waypoint &next_waypoint) |
| Helper Functions for constructing the rtree element list. | |
| void | AddElementToRtreeAndUpdateTransforms (std::vector< Rtree::TreeElement > &rtree_elements, geom::Transform ¤t_transform, Waypoint ¤t_waypoint, Waypoint &next_waypoint) |
| void | CreateRtree () |
Private Member Functions inherited from carla::MovableNonCopyable | |
| MovableNonCopyable ()=default | |
| MovableNonCopyable (const MovableNonCopyable &)=delete | |
| MovableNonCopyable (MovableNonCopyable &&)=default | |
| MovableNonCopyable & | operator= (const MovableNonCopyable &)=delete |
| MovableNonCopyable & | operator= (MovableNonCopyable &&)=default |
Private Attributes | |
| MapData | _data |
| Rtree | _rtree |
| friend | MapBuilder |
Definition at line 29 of file road/Map.h.
|
private |
Definition at line 246 of file road/Map.h.
Definition at line 32 of file road/Map.h.
|
inline |
========================================================================
Definition at line 38 of file road/Map.h.
References CreateRtree().
|
private |
Helper Functions for constructing the rtree element list.
Definition at line 1004 of file road/Map.cpp.
References carla::geom::Transform::location, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.
Referenced by AddElementToRtreeAndUpdateTransforms(), and CreateRtree().
|
private |
Definition at line 1025 of file road/Map.cpp.
References AddElementToRtree(), and ComputeTransform().
Referenced by CreateRtree().
| std::vector< LaneMarking > carla::road::Map::CalculateCrossedLanes | ( | const geom::Location & | origin, |
| const geom::Location & | destination | ||
| ) | const |
Definition at line 522 of file road/Map.cpp.
References carla::road::element::LaneCrossingCalculator::Calculate().
| std::unordered_map< road::RoadId, std::unordered_set< road::RoadId > > carla::road::Map::ComputeJunctionConflicts | ( | JuncId | id | ) | const |
Definition at line 924 of file road/Map.cpp.
References _data, _rtree, distance, carla::geom::SegmentCloudRtree< T, Dimension >::GetIntersections(), GetJunction(), carla::road::Road::GetJunctionId(), carla::road::MapData::GetRoad(), and junction.
Referenced by carla::road::MapBuilder::ComputeJunctionRoadConflicts().
| std::unordered_set< RoadId > carla::road::Map::ComputeSkippedGenerationRoads | ( | ) | const |
Roads excluded from mesh/marking generation: link-less sub-2m slivers and link-less duplicate traces overlapping a connected road (DeepMap/NuRec export artifacts that render as floating slabs of road stacked on the real carriageway).
Definition at line 1299 of file road/Map.cpp.
References _data, carla::road::ComputeDuplicateTraceRoads(), carla::road::MapData::GetRoads(), carla::road::IsOrphanSliverRoad(), and road.
Referenced by GenerateChunkedMesh(), GenerateLineMarkings(), and GenerateOrderedChunkedMeshInLocations().
| geom::Transform carla::road::Map::ComputeTransform | ( | Waypoint | waypoint | ) | const |
Definition at line 278 of file road/Map.cpp.
References carla::road::Lane::ComputeTransform(), GetLane(), and carla::road::element::Waypoint::s.
Referenced by AddElementToRtreeAndUpdateTransforms(), carla::road::element::LaneCrossingCalculator::Calculate(), carla::road::MapBuilder::CheckSignalsOnRoads(), carla::road::ComputeDuplicateTraceRoads(), carla::road::MapBuilder::CreateJunctionBoundingBoxes(), CreateRtree(), GenerateSingleJunction(), GetAllCrosswalkZones(), GetWaypoint(), and SDFToMesh().
|
private |
Definition at line 1047 of file road/Map.cpp.
References _data, _rtree, AddElementToRtree(), AddElementToRtreeAndUpdateTransforms(), carla::road::Lane::Any, ComputeTransform(), carla::road::ForEachLane(), carla::geom::Transform::GetForwardVector(), GetLane(), GetNext(), carla::road::GetRemainingLength(), carla::road::MapData::GetRoads(), carla::geom::Math::GetVectorAngle(), carla::geom::SegmentCloudRtree< T, Dimension >::InsertElements(), carla::road::Lane::IsStraight(), RELEASE_ASSERT, and road.
Referenced by Map().
| std::vector< JuncId > carla::road::Map::FilterJunctionsByPosition | ( | const geom::Vector3D & | minpos, |
| const geom::Vector3D & | maxpos | ||
| ) | const |
Definition at line 1919 of file road/Map.cpp.
References _data, carla::road::MapData::GetJunctions(), junction, carla::geom::Vector3D::x, and carla::geom::Vector3D::y.
Referenced by GenerateJunctions().
| std::vector< RoadId > carla::road::Map::FilterRoadsByPosition | ( | const geom::Vector3D & | minpos, |
| const geom::Vector3D & | maxpos | ||
| ) | const |
Definition at line 1936 of file road/Map.cpp.
References _data, carla::road::Lane::ComputeTransform(), carla::road::Lane::Driving, carla::road::Lane::GetDistance(), carla::road::MapData::GetRoads(), carla::geom::Transform::location, road, carla::geom::Vector3D::x, and carla::geom::Vector3D::y.
Referenced by GenerateLineMarkings(), GenerateOrderedChunkedMeshInLocations(), and GetTreesTransform().
| std::vector< std::unique_ptr< geom::Mesh > > carla::road::Map::GenerateChunkedMesh | ( | const rpc::OpendriveGenerationParameters & | params | ) | const |
Definition at line 1319 of file road/Map.cpp.
References _data, ComputeSkippedGenerationRoads(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateAllWithMaxLen(), GenerateJunctionFill(), carla::road::MapData::GetJunctions(), carla::road::MapData::GetRoads(), junction, carla::rpc::OpendriveGenerationParameters::max_road_length, carla::geom::MeshFactory::MergeAndSmooth(), road, carla::road::Lane::Sidewalk, carla::rpc::OpendriveGenerationParameters::smooth_junctions, carla::geom::Vector2D::x, and carla::geom::Vector2D::y.
| std::unique_ptr< geom::Mesh > carla::road::Map::GenerateJunctionFill | ( | const road::Junction & | junction, |
| const geom::Mesh & | corridor_mesh | ||
| ) | const |
Paves the regions a junction's lane corridors enclose but don't cover (see GenerateChunkedMesh).
Returns nullptr when there is nothing to fill.
Definition at line 1973 of file road/Map.cpp.
References _data, carla::geom::Mesh::AddIndex(), carla::geom::Mesh::AddMaterial(), carla::geom::Mesh::AddVertex(), carla::geom::Mesh::EndMaterial(), carla::geom::Mesh::GetIndexes(), carla::road::MapData::GetRoads(), carla::geom::Mesh::GetVertices(), carla::geom::Mesh::GetVerticesNum(), junction, carla::road::Lane::None, carla::road::Lane::Sidewalk, x, y, and z.
Referenced by GenerateChunkedMesh().
| 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 1857 of file road/Map.cpp.
References FilterJunctionsByPosition(), and GenerateSingleJunction().
Referenced by GenerateOrderedChunkedMeshInLocations().
| 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 1773 of file road/Map.cpp.
References _data, ComputeSkippedGenerationRoads(), FilterRoadsByPosition(), carla::geom::MeshFactory::GenerateLaneMarkForRoad(), carla::road::MapData::GetJunction(), carla::road::MapData::GetRoads(), junction, and road.
| 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 1165 of file road/Map.cpp.
References _data, distance, carla::geom::MeshFactory::RoadParameters::extra_lane_width, carla::geom::MeshFactory::Generate(), carla::road::MapData::GetJunctions(), carla::road::MapData::GetRoads(), junction, carla::geom::MeshFactory::MergeAndSmooth(), RELEASE_ASSERT, carla::geom::MeshFactory::RoadParameters::resolution, road, and carla::geom::MeshFactory::road_param.
| 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 1442 of file road/Map.cpp.
References ComputeSkippedGenerationRoads(), FilterRoadsByPosition(), GenerateJunctions(), and 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 1837 of file road/Map.cpp.
References _data, carla::geom::MeshFactory::GenerateAllOrderedWithMaxLen(), carla::road::MapData::GetRoads(), and road.
Referenced by GenerateOrderedChunkedMeshInLocations().
| 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 2458 of file road/Map.cpp.
References _data, ComputeTransform(), carla::road::Lane::Driving, carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), carla::road::MapData::GetJunctions(), carla::road::MapData::GetRoads(), GetWaypoint(), junction, carla::geom::Transform::location, road, SDFToMesh(), and carla::road::Lane::Sidewalk.
Referenced by GenerateJunctions().
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 884 of file road/Map.cpp.
References _data, distance, carla::road::ForEachDrivableLane(), carla::road::GetDistanceAtEndOfLane(), GetLane(), carla::road::MapData::GetRoads(), GetSuccessors(), GetWaypoint(), and road.
| geom::Mesh carla::road::Map::GenerateWalls | ( | const double | distance, |
| const float | wall_height | ||
| ) | const |
| std::vector< Waypoint > carla::road::Map::GenerateWaypoints | ( | double | approx_distance | ) | const |
Generate all the waypoints in map separated by approx_distance.
Definition at line 811 of file road/Map.cpp.
References _data, distance, carla::road::EPSILON, carla::road::ForEachDrivableLaneAt(), carla::road::MapData::GetRoads(), RELEASE_ASSERT, and road.
Referenced by carla::road::ComputeDuplicateTraceRoads().
| 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 854 of file road/Map.cpp.
References _data, carla::road::MapData::GetRoads(), road, and road_id.
| 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 825 of file road/Map.cpp.
References _data, carla::road::MapData::GetRoads(), and road.
| geom::Mesh carla::road::Map::GetAllCrosswalkMesh | ( | ) | const |
Buids a mesh of all crosswalks based on the OpenDRIVE.
Definition at line 1679 of file road/Map.cpp.
References carla::geom::Mesh::AddIndex(), carla::geom::Mesh::AddMaterial(), carla::geom::Mesh::AddUV(), carla::geom::Mesh::AddVertex(), carla::geom::Mesh::EndMaterial(), first, GetAllCrosswalkZones(), carla::geom::Mesh::GetVerticesNum(), carla::geom::Vector2D::x, and carla::geom::Vector2D::y.
| 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 528 of file road/Map.cpp.
References _data, carla::geom::Math::Clamp(), ComputeTransform(), carla::geom::Rotation::GetForwardVector(), carla::road::MapData::GetRoads(), carla::road::element::Waypoint::lane_id, carla::geom::Transform::location, carla::geom::Rotation::pitch, road, carla::road::element::Waypoint::road_id, carla::geom::Rotation::roll, carla::geom::Transform::rotation, carla::road::element::Waypoint::s, carla::road::element::Waypoint::section_id, carla::geom::Transform::TransformPoint(), carla::geom::Vector3D::x, carla::geom::Vector3D::y, carla::geom::Rotation::yaw, and carla::geom::Vector3D::z.
Referenced by GetAllCrosswalkMesh().
| std::vector< const element::RoadInfoSignal * > carla::road::Map::GetAllSignalReferences | ( | ) | const |
Return all RoadInfoSignal in the map.
Definition at line 443 of file road/Map.cpp.
References _data, carla::road::MapData::GetRoads(), and road.
| std::vector< const element::RoadInfoStencil * > carla::road::Map::GetAllStencilReferences | ( | ) | const |
Return all RoadInfoStencil in the map.
Definition at line 456 of file road/Map.cpp.
References _data, carla::road::MapData::GetRoads(), and road.
| std::optional< Waypoint > carla::road::Map::GetClosestWaypointOnRoad | ( | const geom::Location & | location, |
| int32_t | lane_type = static_cast<int32_t>(Lane::LaneType::Driving) |
||
| ) | const |
========================================================================
Definition at line 170 of file road/Map.cpp.
References _rtree, carla::geom::Math::DistanceSegmentToPoint(), GetLane(), carla::geom::SegmentCloudRtree< T, Dimension >::GetNearestNeighboursWithFilter(), GetNext(), 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(), GetWaypoint(), and SDFToMesh().
|
inline |
Definition at line 204 of file road/Map.h.
References _data, and carla::road::MapData::GetControllers().
|
inline |
Read-only access to the parsed OpenDRIVE data: roads, junctions, signals and controllers.
The client-side carla::client::Road, LaneSection and Lane wrappers resolve their ids through this.
Definition at line 231 of file road/Map.h.
References _data.
|
inline |
Definition at line 50 of file road/Map.h.
References _data, and carla::road::MapData::GetGeoProjection().
|
inline |
========================================================================
Definition at line 46 of file road/Map.h.
References _data, and carla::road::MapData::GetGeoReference().
Definition at line 1157 of file road/Map.cpp.
References _data, and carla::road::MapData::GetJunction().
Referenced by ComputeJunctionConflicts(), carla::road::MapBuilder::CreateJunctionBoundingBoxes(), and GetJunctionWaypoints().
Definition at line 1161 of file road/Map.cpp.
References _data, and carla::road::MapData::GetJunction().
Definition at line 303 of file road/Map.cpp.
References _data, carla::road::Road::GetJunctionId(), carla::road::MapData::GetRoad(), and road_id.
| std::vector< carla::geom::BoundingBox > carla::road::Map::GetJunctionsBoundingBoxes | ( | ) | const |
Definition at line 1819 of file road/Map.cpp.
References _data, carla::geom::BoundingBox::extent, carla::road::MapData::GetJunctions(), and junction.
| 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 907 of file road/Map.cpp.
References _data, carla::road::ForEachLane(), carla::road::GetDistanceAtEndOfLane(), GetJunction(), GetLane(), carla::road::MapData::GetRoad(), junction, road, and carla::road::element::Waypoint::s.
Referenced by carla::road::MapBuilder::CreateJunctionBoundingBoxes().
========================================================================
Definition at line 994 of file road/Map.cpp.
References _data, carla::road::Road::GetLaneById(), carla::road::MapData::GetRoad(), carla::road::element::Waypoint::lane_id, carla::road::element::Waypoint::road_id, and carla::road::element::Waypoint::section_id.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), ComputeTransform(), CreateRtree(), GenerateTopology(), GetClosestWaypointOnRoad(), GetJunctionWaypoints(), GetLaneType(), GetLaneWidth(), GetLeft(), GetMarkRecord(), GetNext(), GetPredecessors(), GetPrevious(), GetRight(), GetSignalsInDistance(), GetStencilsInDistance(), GetSuccessors(), and GetWaypoint().
| Lane::LaneType carla::road::Map::GetLaneType | ( | Waypoint | waypoint | ) | const |
Definition at line 286 of file road/Map.cpp.
References GetLane(), and carla::road::Lane::GetType().
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads().
| double carla::road::Map::GetLaneWidth | ( | Waypoint | waypoint | ) | const |
Definition at line 290 of file road/Map.cpp.
References GetLane(), RELEASE_ASSERT, and carla::road::element::Waypoint::s.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), and SDFToMesh().
Return a waypoint at the lane of waypoint's left lane.
Definition at line 789 of file road/Map.cpp.
References _data, GetLane(), carla::road::Lane::GetRoad(), carla::road::IsLanePresent(), carla::road::Road::IsRHT(), carla::road::element::Waypoint::lane_id, and RELEASE_ASSERT.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads().
| std::pair< const RoadInfoMarkRecord *, const RoadInfoMarkRecord * > carla::road::Map::GetMarkRecord | ( | Waypoint | waypoint | ) | const |
Definition at line 312 of file road/Map.cpp.
References GetLane(), 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().
Return the list of waypoints at distance such that a vehicle at waypoint could drive to.
Definition at line 669 of file road/Map.cpp.
References carla::road::ConcatVectors(), DEBUG_ASSERT, distance, carla::road::EPSILON, GetLane(), GetNext(), GetSuccessors(), 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(), CreateRtree(), GetClosestWaypointOnRoad(), GetNext(), and GetSignalsInDistance().
Definition at line 643 of file road/Map.cpp.
References distance, carla::road::GetDistanceAtEndOfLane(), GetLane(), carla::road::Lane::GetPreviousLanes(), and road.
Referenced by GetPrevious().
Return the list of waypoints at distance in the reversed direction that a vehicle at waypoint could drive to.
Definition at line 718 of file road/Map.cpp.
References carla::road::ConcatVectors(), DEBUG_ASSERT, distance, carla::road::EPSILON, GetLane(), GetPredecessors(), GetPrevious(), 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 GetPrevious().
Return a waypoint at the lane of waypoint's right lane.
Definition at line 767 of file road/Map.cpp.
References _data, GetLane(), carla::road::Lane::GetRoad(), carla::road::IsLanePresent(), carla::road::Road::IsRHT(), carla::road::element::Waypoint::lane_id, and RELEASE_ASSERT.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads().
|
inline |
Definition at line 200 of file road/Map.h.
References _data, and carla::road::MapData::GetSignals().
| 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 335 of file road/Map.cpp.
References _data, carla::road::ConcatVectors(), DEBUG_ASSERT, distance, carla::road::element::RoadInfo::GetDistance(), GetLane(), GetNext(), carla::road::MapData::GetRoad(), GetSignalsInDistance(), GetSuccessors(), carla::road::Road::IsJunction(), carla::road::element::Waypoint::lane_id, road, carla::road::element::Waypoint::road_id, and carla::road::element::Waypoint::s.
Referenced by GetSignalsInDistance().
|
inline |
Definition at line 208 of file road/Map.h.
References _data, and carla::road::MapData::GetStencils().
| std::vector< Map::StencilSearchData > carla::road::Map::GetStencilsInDistance | ( | Waypoint | waypoint, |
| double | distance, | ||
| bool | stop_at_junction = false |
||
| ) | const |
Searches stencils from an initial waypoint until the defined distance.
Definition at line 468 of file road/Map.cpp.
References _data, carla::road::Map::StencilSearchData::accumulated_s, carla::road::ConcatVectors(), DEBUG_ASSERT, distance, GetLane(), carla::road::MapData::GetRoad(), carla::road::element::RoadInfoStencil::GetS(), GetStencilsInDistance(), GetSuccessors(), IsJunction(), road, carla::road::element::Waypoint::road_id, carla::road::element::Waypoint::s, carla::road::Map::StencilSearchData::stencil, and carla::road::Map::StencilSearchData::waypoint.
Referenced by GetStencilsInDistance().
========================================================================
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 617 of file road/Map.cpp.
References distance, carla::road::GetDistanceAtStartOfLane(), GetLane(), carla::road::Lane::GetNextLanes(), and road.
Referenced by GenerateTopology(), GetNext(), GetSignalsInDistance(), and GetStencilsInDistance().
| 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, |
||
| bool | measure_from_curb = false, |
||
| bool | keep_on_sidewalk = false |
||
| ) | const |
Definition at line 1518 of file road/Map.cpp.
References _data, carla::road::Lane::Driving, FilterRoadsByPosition(), carla::road::Lane::GetCornerPositions(), carla::road::Lane::GetDistance(), carla::road::Lane::GetId(), carla::road::Lane::GetInfo(), carla::road::LaneSection::GetLanes(), carla::road::MapData::GetRoads(), carla::road::element::RoadInfoSpeed::GetType(), carla::road::Lane::GetWidth(), carla::road::Lane::None, road, carla::road::Lane::Sidewalk, carla::geom::Math::ToDegrees(), carla::road::TREE_PLACEMENT_EPSILON, carla::geom::Vector3D::x, x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.
| std::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 217 of file road/Map.cpp.
References ComputeTransform(), carla::geom::Math::Distance2D(), carla::geom::CubicPolynomial::Evaluate(), GetClosestWaypointOnRoad(), carla::road::Lane::GetInfo(), GetLane(), carla::road::element::RoadInfoLaneWidth::GetPolynomial(), and carla::geom::Transform::location.
Referenced by GenerateSingleJunction(), GenerateTopology(), carla::road::element::IsOffRoad(), and SDFToMesh().
| std::optional< Waypoint > carla::road::Map::GetWaypoint | ( | RoadId | road_id, |
| LaneId | lane_id, | ||
| float | s | ||
| ) | const |
Definition at line 238 of file road/Map.cpp.
References _data, carla::road::MapData::ContainsRoad(), carla::road::MapData::GetRoad(), carla::road::element::Waypoint::lane_id, road, carla::road::element::Waypoint::road_id, road_id, carla::road::element::Waypoint::s, and carla::road::element::Waypoint::section_id.
|
inline |
Definition at line 1831 of file road/Map.cpp.
References carla::geom::deformation::GetBumpDeformation(), and carla::geom::deformation::GetZPosInDeformation().
| bool carla::road::Map::IsJunction | ( | RoadId | road_id | ) | const |
Definition at line 307 of file road/Map.cpp.
References _data, carla::road::MapData::GetRoad(), carla::road::Road::IsJunction(), and road_id.
Referenced by carla::road::element::LaneCrossingCalculator::Calculate(), and GetStencilsInDistance().
| 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 |
Definition at line 2388 of file road/Map.cpp.
References carla::geom::Mesh::AddIndex(), carla::geom::Mesh::AddVertex(), ComputeTransform(), carla::geom::BoundingBox::extent, carla::road::Junction::GetBoundingBox(), GetClosestWaypointOnRoad(), GetLaneWidth(), carla::geom::Mesh::GetVertices(), GetWaypoint(), carla::geom::Vector3D::Length(), carla::geom::Vector3D::Length2D(), carla::geom::BoundingBox::location, carla::geom::Transform::location, carla::geom::Vector3D::MakeUnitVector(), MeshReconstruction::MarchCube(), MeshReconstruction::Rect3::min, MeshReconstruction::Rect3::size, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.
Referenced by GenerateSingleJunction().
|
private |
Definition at line 244 of file road/Map.h.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), ComputeJunctionConflicts(), carla::road::MapBuilder::ComputeJunctionRoadConflicts(), ComputeSkippedGenerationRoads(), carla::road::MapBuilder::CreateJunctionBoundingBoxes(), CreateRtree(), FilterJunctionsByPosition(), FilterRoadsByPosition(), GenerateChunkedMesh(), GenerateJunctionFill(), GenerateLineMarkings(), GenerateMesh(), GenerateRoadsMultithreaded(), GenerateSingleJunction(), GenerateTopology(), GenerateWaypoints(), GenerateWaypointsInRoad(), GenerateWaypointsOnRoadEntries(), GetAllCrosswalkZones(), GetAllSignalReferences(), GetAllStencilReferences(), GetControllers(), GetData(), GetGeoProjection(), GetGeoReference(), GetJunction(), GetJunction(), GetJunctionId(), GetJunctionsBoundingBoxes(), GetJunctionWaypoints(), GetLane(), GetLeft(), GetRight(), GetSignals(), GetSignalsInDistance(), GetStencils(), GetStencilsInDistance(), GetTreesTransform(), GetWaypoint(), and IsJunction().
|
private |
Definition at line 247 of file road/Map.h.
Referenced by ComputeJunctionConflicts(), CreateRtree(), and GetClosestWaypointOnRoad().
|
private |
Definition at line 243 of file road/Map.h.