maliput_malidrive
Lane Struct Reference

Detailed Description

Holds the values of a XODR Lane.

For example, a XML node describing a XODR's lane:

<OpenDRIVE>
...
<road>
<lanes>
<laneSection>
<left>
<lane id="-1" type="driving" level="false">
<link>
<predecessor id="-1"/>
<successor id="-1"/>
</link>
<width sOffset="0.0" a="3.5" b="0.0" c="0.0" d="0.0"/>
<speed sOffset="0.0" max="40" unit="mph"/>
<speed sOffset="1.5" max="45" unit="mph"/>
<userData>
...
</userData>
...
</lane>
</left>
<center>
<lane id="0" type="driving" level="false">
</center>
<right>
<lane id="1" type="driving" level="false">
<link>
<predecessor id="1"/>
<successor id="1"/>
</link>
<width sOffset="0.0" a="3.5" b="0.0" c="0.0" d="0.0"/>
...
</lane>
</right>
</laneSection>
</lanes>
<road>
...
</OpenDRIVE>

#include <src/maliput_malidrive/xodr/lane.h>

Classes

struct  Speed
 Speed description. More...
 

Public Types

enum  Type {
  kNone, kDriving, kStop, kShoulder,
  kBiking, kSidewalk, kBorder, kRestricted,
  kParking, kCurb, kBidirectional, kMedian,
  kSpecial1, kSpecial2, kSpecial3, kRoadWorks,
  kTram, kRail, kEntry, kExit,
  kOffRamp, kOnRamp, kConnectingRamp, kBus,
  kTaxi, kHOV, kMwyEntry, kMwyExit
}
 Holds types of lanes. More...
 
using Id = maliput::api::TypeSpecificIdentifier< struct Lane >
 Id alias. More...
 

Public Member Functions

bool operator== (const Lane &other) const
 Equality operator. More...
 
bool operator!= (const Lane &other) const
 Inequality operator. More...
 

Static Public Member Functions

static std::string type_to_str (Type type)
 Matches string with a Type. More...
 
static Type str_to_type (const std::string &type)
 Matches Type with a string. More...
 

Public Attributes

Id id {"none"}
 ID of the lane. More...
 
Type type {}
 Type of the lane. More...
 
std::optional< bool > level {std::nullopt}
 Indicates whether apply or not superelevation and crossfall to this lane: More...
 
LaneLink lane_link {std::nullopt, std::nullopt}
 Contains the lane link. More...
 
std::vector< LaneWidthwidth_description {}
 Widths of the lane. More...
 
std::vector< Speedspeed {}
 Speed records of the lane. More...
 
std::optional< std::string > user_data {std::nullopt}
 Contains ancillary data in XML format. It holds the entire userData node. More...
 

Static Public Attributes

static constexpr const char * kLaneTag = "lane"
 Convenient constants that hold the tag names in XODR lane description. More...
 
static constexpr const char * kId = "id"
 
static constexpr const char * kType = "type"
 
static constexpr const char * kLevel = "level"
 
static constexpr const char * kUserData = "userData"
 

Member Typedef Documentation

◆ Id

Id alias.

Member Enumeration Documentation

◆ Type

enum Type
strong

Holds types of lanes.

Enumerator
kNone 
kDriving 
kStop 
kShoulder 
kBiking 
kSidewalk 
kBorder 
kRestricted 
kParking 
kCurb 
kBidirectional 

bidirectional could be used on a narrow road which may be used in both directios or in a continuous two-way left turn lane on multi-lane roads.

kMedian 
kSpecial1 
kSpecial2 
kSpecial3 
kRoadWorks 
kTram 
kRail 
kEntry 
kExit 
kOffRamp 
kOnRamp 
kConnectingRamp 
kBus 
kTaxi 
kHOV 

High-occupancy vehicle / carpool vehicle.

kMwyEntry 
kMwyExit 

Member Function Documentation

◆ operator!=()

bool operator!= ( const Lane other) const

Inequality operator.

◆ operator==()

bool operator== ( const Lane other) const

Equality operator.

◆ str_to_type()

Lane::Type str_to_type ( const std::string &  type)
static

Matches Type with a string.

Parameters
typeIs a string.
Returns
A Type that matches with type.
Exceptions
maliput::common::assertion_errorWhen type doesn't match with a Type.

◆ type_to_str()

std::string type_to_str ( Type  type)
static

Matches string with a Type.

Parameters
typeIs a Type.
Returns
A string that matches with type.

Member Data Documentation

◆ id

Id id {"none"}

ID of the lane.

◆ kId

constexpr const char* kId = "id"
staticconstexpr

◆ kLaneTag

constexpr const char* kLaneTag = "lane"
staticconstexpr

Convenient constants that hold the tag names in XODR lane description.

◆ kLevel

constexpr const char* kLevel = "level"
staticconstexpr

◆ kType

constexpr const char* kType = "type"
staticconstexpr

◆ kUserData

constexpr const char* kUserData = "userData"
staticconstexpr

◆ lane_link

LaneLink lane_link {std::nullopt, std::nullopt}

Contains the lane link.

◆ level

std::optional<bool> level {std::nullopt}

Indicates whether apply or not superelevation and crossfall to this lane:

  • true: keep lane on level, .i.e. do not apply superelevation or crossfall.
  • false: apply superelevation and crossfall to this lane.

◆ speed

std::vector<Speed> speed {}

Speed records of the lane.

◆ type

Type type {}

Type of the lane.

◆ user_data

std::optional<std::string> user_data {std::nullopt}

Contains ancillary data in XML format. It holds the entire userData node.

◆ width_description

std::vector<LaneWidth> width_description {}

Widths of the lane.


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