|
CARLA
|
#include <Road.h>
Inheritance diagram for carla::road::Road:Public Member Functions | |
| element::DirectedPoint | GetDirectedPointIn (const double s) const |
| Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and elevation records applied, on distance "s". | |
| element::DirectedPoint | GetDirectedPointInNoLaneOffset (const double s) const |
| Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and elevation records applied, on distance "s". | |
| const geom::CubicPolynomial & | GetElevationOn (const double s) const |
| LaneSection * | GetEndSection (LaneId id) |
| Get the end section (from road coordinates s) given a lane id. | |
| RoadId | GetId () const |
| template<typename T > | |
| const T * | GetInfo (const double s) const |
| template<typename T > | |
| std::vector< const T * > | GetInfos () const |
| template<typename T > | |
| std::vector< const T * > | GetInfosInRange (const double min_s, const double max_s) const |
| JuncId | GetJunctionId () const |
| Lane & | GetLaneByDistance (double s, LaneId lane_id) |
| const Lane & | GetLaneByDistance (double s, LaneId lane_id) const |
| Lane & | GetLaneById (SectionId section_id, LaneId lane_id) |
| const Lane & | GetLaneById (SectionId section_id, LaneId lane_id) const |
| std::map< LaneId, const Lane * > | GetLanesAt (const double s) const |
| Get all lanes at a given s. | |
| std::vector< Lane * > | GetLanesByDistance (double s) |
| Get all lanes from all lane sections in a specific s. | |
| std::vector< const Lane * > | GetLanesByDistance (double s) const |
| LaneSection & | GetLaneSectionById (SectionId id) |
| const LaneSection & | GetLaneSectionById (SectionId id) const |
| auto | GetLaneSections () const |
| auto | GetLaneSectionsAt (const double s) |
| auto | GetLaneSectionsAt (const double s) const |
| double | GetLateralShapeZ (const double s, const double t) const |
| Surface height offset from the <lateralProfile><shape> records at (s, t). | |
| double | GetLength () const |
| const MapData * | GetMap () const |
| std::string | GetName () const |
| const std::pair< const Lane *, double > | GetNearestLane (const double s, const geom::Location &loc, uint32_t type=static_cast< uint32_t >(Lane::LaneType::Any)) const |
| Returns a pointer to the nearest lane, given s relative to Road and a location. | |
| const std::pair< double, double > | GetNearestPoint (const geom::Location &loc) const |
| Returns a pair containing: | |
| Lane * | GetNextLane (const double s, const LaneId lane_id) |
| std::vector< Road * > | GetNexts () const |
| RoadId | GetPredecessor () const |
| Lane * | GetPrevLane (const double s, const LaneId lane_id) |
| std::vector< Road * > | GetPrevs () const |
| LaneSection * | GetStartSection (LaneId id) |
| Get the start section (from road coordinates s) given a lane id. | |
| RoadId | GetSuccessor () const |
| bool | IsJunction () const |
| bool | IsRHT () const |
| Road ()=default | |
| double | UpperBound (double s) const |
| Return the upper bound "s", i.e., the end distance of the lane section at s (clamped at road's length). | |
Static Private Member Functions | |
| template<typename MultiMapT > | |
| static auto | GetLessEqualRange (MultiMapT &map, double s) |
Private Attributes | |
| RoadId | _id { 0 } |
| InformationSet | _info |
| bool | _is_junction { false } |
| bool | _is_rht { true } |
| JuncId | _junction_id { -1 } |
| LaneSectionMap | _lane_sections |
| double | _length { 0.0 } |
| MapData * | _map_data { nullptr } |
| std::string | _name |
| std::vector< Road * > | _nexts |
| RoadId | _predecessor { 0 } |
| std::vector< Road * > | _prevs |
| RoadId | _successor { 0 } |
| friend | MapBuilder |
Additional Inherited Members | |
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 |
Definition at line 32 of file road/Road.h.
|
default |
| element::DirectedPoint carla::road::Road::GetDirectedPointIn | ( | const double | s | ) | const |
Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and elevation records applied, on distance "s".
Definition at line 246 of file road/Road.cpp.
References _info, _length, carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::geom::Math::Clamp(), GetElevationOn(), carla::road::InformationSet::GetInfo(), carla::road::element::DirectedPoint::location, carla::road::element::DirectedPoint::pitch, and carla::geom::Vector3D::z.
Referenced by GetNearestLane(), and carla::client::Road::GetTransformAt().
| element::DirectedPoint carla::road::Road::GetDirectedPointInNoLaneOffset | ( | const double | s | ) | const |
Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and elevation records applied, on distance "s".
Definition at line 268 of file road/Road.cpp.
References _info, _length, carla::geom::Math::Clamp(), GetElevationOn(), and carla::road::InformationSet::GetInfo().
Referenced by carla::road::MapBuilder::ComputeSignalTransform(), and carla::road::MapBuilder::ComputeStencilTransform().
| const geom::CubicPolynomial & carla::road::Road::GetElevationOn | ( | const double | s | ) | const |
Definition at line 72 of file road/Road.cpp.
References carla::throw_exception().
Referenced by GetDirectedPointIn(), and GetDirectedPointInNoLaneOffset().
| LaneSection * carla::road::Road::GetEndSection | ( | LaneId | id | ) |
Get the end section (from road coordinates s) given a lane id.
Definition at line 173 of file road/Road.cpp.
References _lane_sections.
| RoadId carla::road::Road::GetId | ( | ) | const |
Definition at line 32 of file road/Road.cpp.
References _id.
|
inline |
Definition at line 122 of file road/Road.h.
References _info, and carla::road::InformationSet::GetInfo().
|
inline |
Definition at line 127 of file road/Road.h.
References _info, and carla::road::InformationSet::GetInfos().
|
inline |
Definition at line 132 of file road/Road.h.
References _info, and carla::road::InformationSet::GetInfos().
| JuncId carla::road::Road::GetJunctionId | ( | ) | const |
Definition at line 48 of file road/Road.cpp.
References _junction_id.
Referenced by carla::road::Map::ComputeJunctionConflicts(), carla::client::Road::GetJunctionId(), and carla::road::Map::GetJunctionId().
Definition at line 80 of file road/Road.cpp.
References GetLaneSectionsAt(), and carla::throw_exception().
Referenced by carla::road::MapBuilder::GetLane(), and GetLaneByDistance().
Definition at line 90 of file road/Road.cpp.
References GetLaneByDistance().
Definition at line 116 of file road/Road.cpp.
References carla::road::LaneSection::GetLanes(), and GetLaneSectionById().
Referenced by carla::client::Lane::GetLane(), carla::road::Map::GetLane(), GetLaneById(), and carla::road::MapData::GetLaneInfo().
Definition at line 120 of file road/Road.cpp.
References GetLaneById().
Get all lanes at a given s.
Definition at line 373 of file road/Road.cpp.
References GetLaneSectionsAt().
Referenced by GetNearestLane().
| std::vector< Lane * > carla::road::Road::GetLanesByDistance | ( | double | s | ) |
Get all lanes from all lane sections in a specific s.
Definition at line 94 of file road/Road.cpp.
References GetLaneSectionsAt().
| std::vector< const Lane * > carla::road::Road::GetLanesByDistance | ( | double | s | ) | const |
Definition at line 105 of file road/Road.cpp.
References GetLaneSectionsAt().
|
inline |
Definition at line 172 of file road/Road.h.
References _lane_sections, and carla::road::LaneSectionMap::GetById().
Referenced by carla::client::LaneSection::ContainsLane(), GetLaneById(), carla::client::LaneSection::GetLanes(), and carla::road::IsLanePresent().
|
inline |
Definition at line 176 of file road/Road.h.
References _lane_sections, and carla::road::LaneSectionMap::GetById().
|
inline |
Definition at line 136 of file road/Road.h.
References _lane_sections, and carla::iterator::make_map_values_const_iterator().
Referenced by carla::client::Road::GetSections().
|
inline |
Definition at line 158 of file road/Road.h.
References _lane_sections, GetLessEqualRange(), and carla::iterator::make_map_values_iterator().
Referenced by GetLaneByDistance(), GetLanesAt(), GetLanesByDistance(), and GetLanesByDistance().
|
inline |
Definition at line 165 of file road/Road.h.
References _lane_sections, GetLessEqualRange(), and carla::iterator::make_map_values_const_iterator().
| double carla::road::Road::GetLateralShapeZ | ( | const double | s, |
| const double | t | ||
| ) | const |
Surface height offset from the <lateralProfile><shape> records at (s, t).
Returns 0 when the road has no shape records. Interpolates linearly between the two bracketing s-stations; within a station the record with the greatest t <= query t applies (clamped to the first record below its t range).
Definition at line 187 of file road/Road.cpp.
References _info, _length, carla::geom::Math::Clamp(), carla::road::element::RoadInfoLateralShape::Evaluate(), and carla::road::InformationSet::GetInfos().
| double carla::road::Road::GetLength | ( | ) | const |
Definition at line 40 of file road/Road.cpp.
References _length.
Referenced by carla::client::Road::GetLength().
|
inlinestaticprivate |
Definition at line 145 of file road/Road.h.
References first.
Referenced by GetLaneSectionsAt(), and GetLaneSectionsAt().
| const MapData * carla::road::Road::GetMap | ( | ) | const |
Definition at line 28 of file road/Road.cpp.
References _map_data.
Referenced by carla::client::GetRoadData().
| std::string carla::road::Road::GetName | ( | ) | const |
Definition at line 36 of file road/Road.cpp.
References _name.
Referenced by carla::client::Road::GetName().
| const std::pair< const Lane *, double > carla::road::Road::GetNearestLane | ( | const double | s, |
| const geom::Location & | loc, | ||
| uint32_t | type = static_cast<uint32_t>(Lane::LaneType::Any) |
||
| ) | const |
Returns a pointer to the nearest lane, given s relative to Road and a location.
| s | distance from the begining of the road to the point you want to calculate the distance |
| loc | point to calculate the distance |
Definition at line 307 of file road/Road.cpp.
References carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::geom::Math::Distance(), GetDirectedPointIn(), GetLanesAt(), and carla::road::element::DirectedPoint::location.
| const std::pair< double, double > carla::road::Road::GetNearestPoint | ( | const geom::Location & | loc | ) | const |
Returns a pair containing:
| loc | point to calculate the distance |
Definition at line 282 of file road/Road.cpp.
References _info, DEBUG_ASSERT, carla::road::InformationSet::GetInfos(), and last.
Definition at line 125 of file road/Road.cpp.
References _lane_sections.
| std::vector< Road * > carla::road::Road::GetNexts | ( | ) | const |
Definition at line 64 of file road/Road.cpp.
References _nexts.
Referenced by carla::client::Road::GetNextRoads().
| RoadId carla::road::Road::GetPredecessor | ( | ) | const |
Definition at line 60 of file road/Road.cpp.
References _predecessor.
Referenced by carla::client::Road::GetPredecessorId().
Definition at line 142 of file road/Road.cpp.
References _lane_sections.
| std::vector< Road * > carla::road::Road::GetPrevs | ( | ) | const |
Definition at line 68 of file road/Road.cpp.
References _prevs.
Referenced by carla::client::Road::GetPreviousRoads().
| LaneSection * carla::road::Road::GetStartSection | ( | LaneId | id | ) |
Get the start section (from road coordinates s) given a lane id.
Definition at line 160 of file road/Road.cpp.
References _lane_sections.
| RoadId carla::road::Road::GetSuccessor | ( | ) | const |
Definition at line 56 of file road/Road.cpp.
References _successor.
Referenced by carla::client::Road::GetSuccessorId().
| bool carla::road::Road::IsJunction | ( | ) | const |
Definition at line 44 of file road/Road.cpp.
References _is_junction.
Referenced by carla::road::Map::GetSignalsInDistance(), carla::client::Road::IsJunction(), and carla::road::Map::IsJunction().
| bool carla::road::Road::IsRHT | ( | ) | const |
Definition at line 52 of file road/Road.cpp.
References _is_rht.
Referenced by carla::road::MapBuilder::CheckSignalsOnRoads(), carla::road::Map::GetLeft(), carla::client::Lane::GetLeftLane(), carla::road::Map::GetRight(), carla::client::Lane::GetRightLane(), and carla::client::Road::IsRHT().
|
inline |
Return the upper bound "s", i.e., the end distance of the lane section at s (clamped at road's length).
Definition at line 182 of file road/Road.h.
References _lane_sections, and _length.
|
private |
Definition at line 196 of file road/Road.h.
Referenced by GetId().
|
private |
Definition at line 214 of file road/Road.h.
Referenced by GetDirectedPointIn(), GetDirectedPointInNoLaneOffset(), GetInfo(), GetInfos(), GetInfosInRange(), GetLateralShapeZ(), and GetNearestPoint().
|
private |
Definition at line 202 of file road/Road.h.
Referenced by IsJunction().
|
private |
Definition at line 206 of file road/Road.h.
Referenced by IsRHT().
|
private |
Definition at line 204 of file road/Road.h.
Referenced by GetJunctionId().
|
private |
Definition at line 208 of file road/Road.h.
Referenced by GetEndSection(), GetLaneSectionById(), GetLaneSectionById(), GetLaneSections(), GetLaneSectionsAt(), GetLaneSectionsAt(), GetNextLane(), GetPrevLane(), GetStartSection(), and UpperBound().
|
private |
Definition at line 200 of file road/Road.h.
Referenced by GetDirectedPointIn(), GetDirectedPointInNoLaneOffset(), GetLateralShapeZ(), GetLength(), and UpperBound().
|
private |
Definition at line 194 of file road/Road.h.
Referenced by GetMap().
|
private |
Definition at line 198 of file road/Road.h.
Referenced by GetName().
|
private |
Definition at line 216 of file road/Road.h.
Referenced by GetNexts().
|
private |
Definition at line 212 of file road/Road.h.
Referenced by GetPredecessor().
|
private |
Definition at line 218 of file road/Road.h.
Referenced by GetPrevs().
|
private |
Definition at line 210 of file road/Road.h.
Referenced by GetSuccessor().
|
private |
Definition at line 192 of file road/Road.h.