|
CARLA
|
#include <Lane.h>
Inheritance diagram for carla::road::Lane:Public Types | |
| enum class | LaneType : int32_t { None = 0x1 , Driving = 0x1 << 1 , Stop = 0x1 << 2 , Shoulder = 0x1 << 3 , Biking = 0x1 << 4 , Sidewalk = 0x1 << 5 , Border = 0x1 << 6 , Restricted = 0x1 << 7 , Parking = 0x1 << 8 , Bidirectional = 0x1 << 9 , Median = 0x1 << 10 , Special1 = 0x1 << 11 , Special2 = 0x1 << 12 , Special3 = 0x1 << 13 , RoadWorks = 0x1 << 14 , Tram = 0x1 << 15 , Rail = 0x1 << 16 , Entry = 0x1 << 17 , Exit = 0x1 << 18 , OffRamp = 0x1 << 19 , OnRamp = 0x1 << 20 , Any = -2 } |
| Can be used as flags. More... | |
Public Member Functions | |
| geom::Transform | ComputeTransform (const double s) const |
| std::pair< geom::Vector3D, geom::Vector3D > | GetCornerPositions (const double s, const float extra_width=0.f) const |
| Computes the location of the edges given a s. | |
| double | GetDistance () const |
| LaneId | GetId () const |
| template<typename T > | |
| const T * | GetInfo (const double s) const |
| template<typename T > | |
| std::vector< const T * > | GetInfos () const |
| const LaneSection * | GetLaneSection () const |
| double | GetLength () const |
| bool | GetLevel () const |
| const std::vector< Lane * > & | GetNextLanes () const |
| LaneId | GetPredecessor () const |
| const std::vector< Lane * > & | GetPreviousLanes () const |
| Road * | GetRoad () const |
| LaneId | GetSuccessor () const |
| LaneType | GetType () const |
| double | GetWidth (const double s) const |
| Returns the total lane width given a s. | |
| bool | IsPositiveDirection () const |
| bool | IsStraight () const |
| Checks whether the geometry is straight or not. | |
| Lane ()=default | |
| Lane (LaneSection *lane_section, LaneId id, std::vector< std::unique_ptr< element::RoadInfo > > &&info) | |
Private Attributes | |
| LaneId | _id = 0 |
| InformationSet | _info |
| LaneSection * | _lane_section = nullptr |
| bool | _level = false |
| std::vector< Lane * > | _next_lanes |
| LaneId | _predecessor = 0 |
| std::vector< Lane * > | _prev_lanes |
| LaneId | _successor = 0 |
| LaneType | _type = LaneType::None |
| 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 25 of file road/Lane.h.
|
strong |
Can be used as flags.
| Enumerator | |
|---|---|
| None | |
| Driving | |
| Stop | |
| Shoulder | |
| Biking | |
| Sidewalk | |
| Border | |
| Restricted | |
| Parking | |
| Bidirectional | |
| Median | |
| Special1 | |
| Special2 | |
| Special3 | |
| RoadWorks | |
| Tram | |
| Rail | |
| Entry | |
| Exit | |
| OffRamp | |
| OnRamp | |
| Any | |
Definition at line 29 of file road/Lane.h.
|
default |
|
inline |
Definition at line 58 of file road/Lane.h.
References DEBUG_ASSERT.
| geom::Transform carla::road::Lane::ComputeTransform | ( | const double | s | ) | const |
Definition at line 131 of file road/Lane.cpp.
References carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::road::ComputeTotalLaneWidth(), DEBUG_ASSERT, carla::geom::CubicPolynomial::Evaluate(), GetId(), GetLaneSection(), GetLength(), carla::road::element::RoadInfoLaneOffset::GetPolynomial(), GetRoad(), IsPositiveDirection(), carla::road::element::DirectedPoint::location, carla::geom::Rotation::pitch, carla::road::element::DirectedPoint::pitch, RELEASE_ASSERT, road, carla::road::element::DirectedPoint::tangent, carla::geom::Math::ToDegrees(), carla::geom::Vector3D::y, carla::geom::Rotation::yaw, and carla::geom::Vector3D::z.
Referenced by carla::road::Map::ComputeTransform(), carla::road::Map::FilterRoadsByPosition(), and carla::client::Lane::GetTransform().
| std::pair< geom::Vector3D, geom::Vector3D > carla::road::Lane::GetCornerPositions | ( | const double | s, |
| const float | extra_width = 0.f |
||
| ) | const |
Computes the location of the edges given a s.
@TODO: use the OpenDRIVE 5.3.7.2.1.1.9 Lane Height Record
Definition at line 216 of file road/Lane.cpp.
References carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::geom::Math::Clamp(), carla::road::ComputeTotalLaneWidth(), DEBUG_ASSERT, Driving, carla::geom::CubicPolynomial::Evaluate(), GetId(), GetLaneSection(), carla::road::element::RoadInfoLaneOffset::GetPolynomial(), GetRoad(), GetType(), GetWidth(), carla::road::element::DirectedPoint::location, RELEASE_ASSERT, road, Sidewalk, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.
Referenced by carla::geom::MeshFactory::ComputeEdgesForLanemark(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), and carla::road::Map::GetTreesTransform().
| double carla::road::Lane::GetDistance | ( | ) | const |
Definition at line 46 of file road/Lane.cpp.
References _lane_section, DEBUG_ASSERT, and carla::road::LaneSection::GetDistance().
Referenced by carla::road::Map::FilterRoadsByPosition(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), carla::geom::MeshFactory::GenerateTesselated(), get_total_road_marks(), carla::client::Lane::GetDistance(), carla::road::GetDistanceAtEndOfLane(), carla::road::GetDistanceAtStartOfLane(), GetLength(), carla::road::GetRemainingLength(), carla::road::Map::GetTreesTransform(), carla::client::Lane::GetWaypoint(), carla::client::Lane::GetWaypoints(), and IsStraight().
| LaneId carla::road::Lane::GetId | ( | ) | const |
Definition at line 34 of file road/Lane.cpp.
References _id.
Referenced by ComputeTransform(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), GetCornerPositions(), carla::client::LaneSection::GetLanes(), carla::road::Map::GetTreesTransform(), IsPositiveDirection(), and carla::opendrive::parser::ParseLanes().
|
inline |
Definition at line 79 of file road/Lane.h.
References _info, _lane_section, DEBUG_ASSERT, and carla::road::InformationSet::GetInfo().
Referenced by carla::geom::MeshFactory::GenerateLaneMarksForCenterLine(), carla::geom::MeshFactory::GenerateLaneMarksForNotCenterLine(), get_total_road_marks(), carla::road::Map::GetTreesTransform(), and carla::road::Map::GetWaypoint().
|
inline |
Definition at line 85 of file road/Lane.h.
References _info, _lane_section, DEBUG_ASSERT, and carla::road::InformationSet::GetInfos().
| const LaneSection * carla::road::Lane::GetLaneSection | ( | ) | const |
Definition at line 25 of file road/Lane.cpp.
References _lane_section.
Referenced by ComputeTransform(), and GetCornerPositions().
| double carla::road::Lane::GetLength | ( | ) | const |
Definition at line 51 of file road/Lane.cpp.
References DEBUG_ASSERT, GetDistance(), GetRoad(), and road.
Referenced by ComputeTransform(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), carla::geom::MeshFactory::GenerateTesselated(), carla::road::GetDistanceAtEndOfLane(), carla::road::GetDistanceAtStartOfLane(), carla::client::Lane::GetLength(), carla::road::GetRemainingLength(), carla::client::Lane::GetWaypoint(), carla::client::Lane::GetWaypoints(), GetWidth(), and IsStraight().
| bool carla::road::Lane::GetLevel | ( | ) | const |
Definition at line 42 of file road/Lane.cpp.
References _level.
Referenced by carla::client::Lane::GetLevel().
|
inline |
Definition at line 90 of file road/Lane.h.
References _next_lanes.
Referenced by carla::client::Lane::GetNextLanes(), and carla::road::Map::GetSuccessors().
|
inline |
Definition at line 102 of file road/Lane.h.
References _predecessor.
Referenced by carla::road::MapBuilder::GetLaneNext().
|
inline |
Definition at line 94 of file road/Lane.h.
References _prev_lanes.
Referenced by carla::road::Map::GetPredecessors(), and carla::client::Lane::GetPreviousLanes().
| Road * carla::road::Lane::GetRoad | ( | ) | const |
Definition at line 29 of file road/Lane.cpp.
References _lane_section, DEBUG_ASSERT, and carla::road::LaneSection::GetRoad().
Referenced by ComputeTransform(), carla::client::LaneSection::ContainsLane(), GetCornerPositions(), carla::client::Lane::GetLane(), carla::road::Map::GetLeft(), carla::client::Lane::GetLeftLane(), GetLength(), carla::road::Map::GetRight(), carla::client::Lane::GetRightLane(), GetWidth(), IsPositiveDirection(), IsStraight(), and carla::opendrive::parser::ParseLanes().
|
inline |
Definition at line 98 of file road/Lane.h.
References _successor.
Referenced by carla::road::MapBuilder::GetLaneNext().
| Lane::LaneType carla::road::Lane::GetType | ( | ) | const |
Definition at line 38 of file road/Lane.cpp.
References _type.
Referenced by carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk(), carla::geom::MeshFactory::GenerateTesselated(), GetCornerPositions(), carla::client::LaneSection::GetLanes(), carla::road::Map::GetLaneType(), and carla::client::Lane::GetType().
| double carla::road::Lane::GetWidth | ( | const double | s | ) | const |
Returns the total lane width given a s.
Definition at line 58 of file road/Lane.cpp.
References GetLength(), GetRoad(), and RELEASE_ASSERT.
Referenced by GetCornerPositions(), carla::road::Map::GetTreesTransform(), and carla::client::Lane::GetWidth().
| bool carla::road::Lane::IsPositiveDirection | ( | ) | const |
Definition at line 291 of file road/Lane.cpp.
References DEBUG_ASSERT, GetId(), GetRoad(), and road.
Referenced by ComputeTransform(), carla::road::GetDistanceAtEndOfLane(), carla::road::GetDistanceAtStartOfLane(), carla::road::MapBuilder::GetLaneNext(), carla::road::GetRemainingLength(), and carla::client::Lane::IsPositiveDirection().
| bool carla::road::Lane::IsStraight | ( | ) | const |
Checks whether the geometry is straight or not.
Definition at line 67 of file road/Lane.cpp.
References DEBUG_ASSERT, elevation, GetDistance(), GetLength(), GetRoad(), carla::road::element::LINE, RELEASE_ASSERT, and road.
Referenced by carla::road::Map::CreateRtree(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), and carla::client::Lane::IsStraight().
|
private |
Definition at line 130 of file road/Lane.h.
Referenced by GetId().
|
private |
Definition at line 132 of file road/Lane.h.
Referenced by GetInfo(), and GetInfos().
|
private |
Definition at line 128 of file road/Lane.h.
Referenced by GetDistance(), GetInfo(), GetInfos(), GetLaneSection(), and GetRoad().
|
private |
Definition at line 136 of file road/Lane.h.
Referenced by GetLevel().
|
private |
Definition at line 142 of file road/Lane.h.
Referenced by GetNextLanes().
|
private |
Definition at line 140 of file road/Lane.h.
Referenced by GetPredecessor().
|
private |
Definition at line 144 of file road/Lane.h.
Referenced by GetPreviousLanes().
|
private |
Definition at line 138 of file road/Lane.h.
Referenced by GetSuccessor().
|
private |
Definition at line 134 of file road/Lane.h.
Referenced by GetType().
|
private |
Definition at line 126 of file road/Lane.h.