maliput_malidrive
malidrive::builder Namespace Reference

Namespaces

 params
 
 rules
 

Classes

struct  BuildPolicy
 Policy for use of concurrency while building a RoadGeometry. More...
 
class  DirectionUsageBuilder
 Functor to build a a vector of maliput::api::rules::DirectionUsageRules. More...
 
class  DiscreteValueRuleStateProviderBuilder
 Functor to build a DiscreteValueRuleStateProvider. More...
 
class  LaneTravelDirection
 Hold the travel direction of a lane obtained from parsing a userData XML node. More...
 
struct  MalidriveXodrLaneProperties
 Holds useful XODR Lane properties. More...
 
class  PhaseProviderBuilder
 Functor to build a ManualPhaseProvider. More...
 
class  RangeValueRuleStateProviderBuilder
 Functor to build a RangeValueRuleStateProvider. More...
 
class  RoadCurveFactory
 Concrete RoadCurveFactoryBase implementation. More...
 
class  RoadCurveFactoryBase
 Interface of a helper class to build road curve related objects by MalidriveRoadGeometryBuilder. More...
 
class  RoadGeometryBuilder
 Builder class on top of the xodr::DBManager which should already have loaded the map. More...
 
struct  RoadGeometryConfiguration
 RoadGeometry construction parameters. More...
 
class  RoadNetworkBuilder
 
struct  RoadNetworkConfiguration
 Structure to hold file paths for multiple RoadNetwork structures. More...
 
class  RoadRuleBookBuilder
 Functor to build a RoadRulebook. More...
 
class  RoadRuleBookBuilderOldRules
 Functor to build a RoadRulebook. More...
 
class  RuleRegistryBuilder
 Functor to build a RuleRegistry. More...
 
class  SpeedLimitBuilder
 Functor to build a vector of SpeedLimitRules. More...
 
class  UniqueIntegerProvider
 Class to handle the index arithmetic and get always an increasing integer as ID. More...
 

Enumerations

enum  XodrConnectionType { kSuccessor = 0, kPredecessor }
 Convenient enumeration to identify which type of connection is needed. More...
 

Functions

std::vector< maliput::api::LaneEndSolveLaneEndsForConnectingRoad (const maliput::api::RoadGeometry *rg, const MalidriveXodrLaneProperties &xodr_lane_properties, const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &road_headers, XodrConnectionType connection_type)
 Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface with other XODR Roads, not XODR Junctions. More...
 
std::vector< maliput::api::LaneEndSolveLaneEndsForJunction (const maliput::api::RoadGeometry *rg, const MalidriveXodrLaneProperties &xodr_lane_properties, const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &road_headers, const std::unordered_map< xodr::Junction::Id, xodr::Junction > &junctions, XodrConnectionType connection_type)
 Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface with a XODR Junction but the XODR Road does not live in a XODR Junction. More...
 
std::vector< maliput::api::LaneEndSolveLaneEndsWithinJunction (const maliput::api::RoadGeometry *rg, const MalidriveXodrLaneProperties &xodr_lane_properties, const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &road_headers, XodrConnectionType connection_type)
 Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface. More...
 
std::vector< maliput::api::LaneEndSolveLaneEndsForInnerLaneSection (const maliput::api::RoadGeometry *rg, const maliput::api::LaneEnd &lane_end, const MalidriveXodrLaneProperties &xodr_lane_properties)
 Searches which LaneEnds connect to lane_end considering it belongs to an inner interface. More...
 
bool is_driveable_lane (const xodr::Lane &xodr_lane)
 Determines whether or not an xodr_lane is driveable by any vehicle. More...
 
bool AreOnlyNonDrivableLanes (const xodr::RoadHeader &xodr_road)
 Determines whether or not an xodr_road contains only non-drivable lanes. More...
 
std::string VehicleUsageValueForXodrLane (const xodr::Lane &xodr_lane)
 Determines the vehicle usage rule state value for xodr_lane based on its XODR Lane type. More...
 
std::optional< std::string > VehicleExclusiveValueForXodrLane (const xodr::Lane &xodr_lane)
 Determines the vehicle exclusive rule state value for xodr_lane based on its XODR Lane type. More...
 
std::vector< rules::XodrSpeedPropertiesGetRoadTypeSpeedPropertiesInRange (const xodr::RoadHeader &xodr_road, double s_track_start, double s_track_end)
 
std::vector< rules::XodrSpeedPropertiesGetLaneSpeedProperties (const xodr::Lane &xodr_lane, double s_track_start, double s_track_end)
 
const xodr::RoadHeaderGetXodrRoadFromMalidriveLane (const Lane *lane)
 
const xodr::LaneGetXodrLaneFromMalidriveLane (const Lane *lane)
 
std::string GetDirectionUsageRuleStateType (const Lane *lane)
 
std::vector< rules::XodrSpeedPropertiesGetMaxSpeedLimitFor (const Lane *lane)
 
std::pair< std::string, std::optional< std::string > > VehicleUsageAndExclusiveRuleStateValues (const Lane *lane)
 
std::optional< double > FindLocalMinFromCubicPol (double a, double b, double c, double d)
 Finds the local minimum of the cubic polynomial. More...
 
double DetermineRoadGeometryLinearTolerance (const xodr::DBManager *xodr_manager)
 Determines the runtime tolerance a RoadGeometry should be set from the characteristics in a XODR map. More...
 
double DetermineRoadGeometryAngularTolerance (const xodr::DBManager *xodr_manager)
 Determines the runtime angular a RoadGeometry should be set from the characteristics in a XODR map. More...
 
double DetermineRoadGeometryScaleLength (const xodr::DBManager *xodr_manager, double linear_tolerance, double angular_tolerance)
 Determines the runtime scale length a RoadGeometry should be set from the characteristics in a XODR map. More...
 
maliput::api::BranchPointId GetBranchPointId (int branch_point_index)
 Returns a BranchPointId whose base string is: {branch_point_index}. More...
 
maliput::api::JunctionId GetJunctionId (int xodr_track_id, int xodr_lane_section_index)
 Returns a JunctionId whose base string is: {xodr_track_id_xodr_lane_section_index}. More...
 
maliput::api::JunctionId GetJunctionId (int xodr_junction_id)
 Returns a JunctionId whose base string is: {xodr_junction_id}. More...
 
maliput::api::LaneId GetLaneId (int xodr_track_id, int xodr_lane_section_index, int xodr_lane_id)
 Returns a LaneId whose base string is: {xodr_track_id_xodr_lane_section_index_xodr_lane_id}. More...
 
maliput::api::SegmentId GetSegmentId (int xodr_track_id, int xodr_lane_section_index)
 Returns a SegmentId whose base string is: {xodr_track_id_xodr_lane_section_index}. More...
 
maliput::api::rules::SpeedLimitRule::Id GetSpeedLimitId (const maliput::api::LaneId &lane_id, int speed_limit_index)
 Returns a SpeedLimitRule::Id whose base string is: {lane_id_speed_limit_index}. More...
 
maliput::api::rules::DirectionUsageRule::Id GetDirectionUsageRuleId (const maliput::api::LaneId &lane_id, int direction_usage_index)
 Returns a DirectionUsageRule::Id whose base string is: {lane_id_direction_usage_index}. More...
 
maliput::api::rules::DirectionUsageRule::State::Id GetDirectionUsageRuleStateId (const maliput::api::rules::DirectionUsageRule::Id &rule_id)
 Returns a DirectionUsageRule::State::Id whose base string is: {rule_id}. More...
 
maliput::api::rules::Rule::Id GetRuleIdFrom (const maliput::api::rules::Rule::TypeId &rule_type_id, const maliput::api::LaneId &lane_id)
 Returns a Rule::Id whose base string is: {rule_type_id.string()'/'lane_id.string()}. More...
 
maliput::api::rules::Rule::Id GetRuleIdFrom (const maliput::api::rules::Rule::TypeId &rule_type_id, const maliput::api::LaneId &lane_id, int index)
 Returns a Rule::Id whose base string is: {rule_type_id.string()'/'lane_id.string()'_'index}. More...
 
RoadGeometryConfiguration::StandardStrictnessPolicy operator| (const RoadGeometryConfiguration::StandardStrictnessPolicy &first, const RoadGeometryConfiguration::StandardStrictnessPolicy &second)
 
RoadGeometryConfiguration::StandardStrictnessPolicy operator& (const RoadGeometryConfiguration::StandardStrictnessPolicy &first, const RoadGeometryConfiguration::StandardStrictnessPolicy &second)
 
std::vector< xodr::GeometrySimplifyGeometries (const std::vector< xodr::Geometry > &geometries, const std::vector< xodr::DBManager::XodrGeometriesToSimplify > &geometries_to_simplify)
 Creates a new vector of xodr::Geometry out of geometries by simplifying it following geometries_to_simplify's actions. More...
 
xodr::ParserConfiguration XodrParserConfigurationFromRoadGeometryConfiguration (const RoadGeometryConfiguration &rg_config)
 Builds a xodr::ParserConfiguration from a RoadGeometryConfiguration struct. More...
 

Variables

static constexpr double kMinLinearTolerance {1e-3}
 

Enumeration Type Documentation

◆ XodrConnectionType

enum XodrConnectionType
strong

Convenient enumeration to identify which type of connection is needed.

Enumerator
kSuccessor 
kPredecessor 

Function Documentation

◆ AreOnlyNonDrivableLanes()

bool AreOnlyNonDrivableLanes ( const xodr::RoadHeader xodr_road)

Determines whether or not an xodr_road contains only non-drivable lanes.

is_driveable_lane method is used to determine the driveability of the lanes in the road.

Parameters
xodr_roadAn Xodr RoadHeader whose lanes will be evaluated as drivable or non-drivable.
Returns
True when xodr_road only contains non-drivable lanes.

◆ DetermineRoadGeometryAngularTolerance()

double DetermineRoadGeometryAngularTolerance ( const xodr::DBManager xodr_manager)

Determines the runtime angular a RoadGeometry should be set from the characteristics in a XODR map.

Parameters
xodr_managerA pointer to a xodr::DBManager with a XODR map loaded.
Returns
The proposed angular tolerance.
Exceptions
maliput::common::assertion_errorWhen xodr_manager is nullptr.

◆ DetermineRoadGeometryLinearTolerance()

double DetermineRoadGeometryLinearTolerance ( const xodr::DBManager xodr_manager)

Determines the runtime tolerance a RoadGeometry should be set from the characteristics in a XODR map.

The selection is based on two constraints:

  • tolerance must be bigger than the largest gap --> hard constraint
  • tolerance is desired to be smaller than the smallest geometry piece --> soft constraint.

The hard constraint is required because that would make the builder or the RoadGeometry itself to throw because of not meeting the G1 constraint. The soft constraint is desired when the previous cannot be used. However, because synthesized maps might have relatively small road descriptions which are several order of magnitude less than the road dimension the tolerance is saturated between kMinLinearTolerance and constants::kLinearTolerance.

The tolerance assignment is done as follows:

  • The maximum between the largest geometry gap and elevation gap is selected and inflated a 50% to avoid any tolerance issue. The value is lower bound saturated with kMinLinearTolerance. If any of the magnitudes is not valid the other is used. When none are used, the soft constraint is used.
  • The minimum between the geometries and the lane section extension is used. The value is reduced to a half to avoid any numerical discrepancy and saturated between kMinLinearTolerance and constants::kLinearTolerance.
Parameters
xodr_managerA pointer to a xodr::DBManager with a XODR map loaded.
Returns
A proposed linear tolerance.
Exceptions
maliput::common::assertion_errorWhen xodr_manager is nullptr.

◆ DetermineRoadGeometryScaleLength()

double DetermineRoadGeometryScaleLength ( const xodr::DBManager xodr_manager,
double  linear_tolerance,
double  angular_tolerance 
)

Determines the runtime scale length a RoadGeometry should be set from the characteristics in a XODR map.

Parameters
xodr_managerA pointer to a xodr::DBManager with a XODR map loaded.
linear_toleranceThe proposed linear tolerance. It must be positive.
angular_toleranceThe proposed angular tolerance. It must be positive.
Returns
The proposed scale length.
Exceptions
maliput::common::assertion_errorWhen xodr_manager is nullptr.

◆ FindLocalMinFromCubicPol()

std::optional< double > FindLocalMinFromCubicPol ( double  a,
double  b,
double  c,
double  d 
)

Finds the local minimum of the cubic polynomial.

\( f(p) = a p^3 + b p^2 + c p + d / p,a,b,c ∈ ℝ \).

Note: 1 - Local minimum is only related to cubic polynomial. So when a = 0 and the parabola is ascending (b > 0) it will return the absolute minimum. 2 - There is no need to know d coefficient to get the minimum local, but it is asked just for consistency.

Parameters
aCubic coefficient.
bQuadratic coefficient.
cLinear coefficient.
dConstant coefficient.
Returns
The p value that matches a local min in the cubic, if exists.

◆ GetBranchPointId()

maliput::api::BranchPointId GetBranchPointId ( int  branch_point_index)

Returns a BranchPointId whose base string is: {branch_point_index}.

◆ GetDirectionUsageRuleId()

maliput::api::rules::DirectionUsageRule::Id GetDirectionUsageRuleId ( const maliput::api::LaneId lane_id,
int  direction_usage_index 
)

Returns a DirectionUsageRule::Id whose base string is: {lane_id_direction_usage_index}.

◆ GetDirectionUsageRuleStateId()

maliput::api::rules::DirectionUsageRule::State::Id GetDirectionUsageRuleStateId ( const maliput::api::rules::DirectionUsageRule::Id &  rule_id)

Returns a DirectionUsageRule::State::Id whose base string is: {rule_id}.

◆ GetDirectionUsageRuleStateType()

std::string GetDirectionUsageRuleStateType ( const Lane lane)
Returns
The direction usage value of lane. It is one in the string set {"AgainstS", "WithS", "Bidirectional", "Undefined"}.
Parameters
laneThe Lane to retrieve its direction usage. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen lane is nullptr.

◆ GetJunctionId() [1/2]

maliput::api::JunctionId GetJunctionId ( int  xodr_junction_id)

Returns a JunctionId whose base string is: {xodr_junction_id}.

◆ GetJunctionId() [2/2]

maliput::api::JunctionId GetJunctionId ( int  xodr_track_id,
int  xodr_lane_section_index 
)

Returns a JunctionId whose base string is: {xodr_track_id_xodr_lane_section_index}.

◆ GetLaneId()

maliput::api::LaneId GetLaneId ( int  xodr_track_id,
int  xodr_lane_section_index,
int  xodr_lane_id 
)

Returns a LaneId whose base string is: {xodr_track_id_xodr_lane_section_index_xodr_lane_id}.

◆ GetLaneSpeedProperties()

std::vector< rules::XodrSpeedProperties > GetLaneSpeedProperties ( const xodr::Lane xodr_lane,
double  s_track_start,
double  s_track_end 
)
Returns
A vector of XodrSpeedProperties which contains the speed limits obtained from the Speed records of xodr_lane.
Parameters
xodr_laneIs a xodr::Lane.
s_track_startTrack s-coordinate that specifies the start of the lane.
s_track_endTrack s-coordinate that specifies the end of the lane.
Exceptions
maliput::common::assertion_errorWhen s_track_start is greater than s_track_end.
maliput::common::assertion_errorWhen s_track_start is negative.

◆ GetMaxSpeedLimitFor()

std::vector< rules::XodrSpeedProperties > GetMaxSpeedLimitFor ( const Lane lane)
Returns
A vector of XodrSpeedProperties which contains the speed limits information of a lane. This method attempts to obtain the speed records for the entire lane's range. The speed records are obtained according the following priorities. 1 - Speed records from the XODR::Lane. 2 - Speed records from the RoadTypes of the Road. 3 - When no speed limit record is provided in a certain range of the lane, a constants::kDefaultMaxSpeedLimit value is provided to fullfil the gap.
Parameters
laneA Lane to obtain the maximum speed limit for. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen lane is nullptr.

◆ GetRoadTypeSpeedPropertiesInRange()

std::vector< rules::XodrSpeedProperties > GetRoadTypeSpeedPropertiesInRange ( const xodr::RoadHeader xodr_road,
double  s_track_start,
double  s_track_end 
)
Returns
A vector of XodrSpeedProperties which contains the speed limits obtained from the RoadTypes of xodr_road for the [s_track_start , s_track_end] range.
Parameters
xodr_roadIs a XODR::RoadHeader.
s_track_startTrack s-coordinate that specifies the start of the range.
s_track_endTrack s-coordinate that specifies the end of the range.
Exceptions
maliput::common::assertion_errorWhen s_track_start is greater than s_track_end.
maliput::common::assertion_errorWhen s_track_start is negative.

◆ GetRuleIdFrom() [1/2]

maliput::api::rules::Rule::Id GetRuleIdFrom ( const maliput::api::rules::Rule::TypeId rule_type_id,
const maliput::api::LaneId lane_id 
)

Returns a Rule::Id whose base string is: {rule_type_id.string()'/'lane_id.string()}.

◆ GetRuleIdFrom() [2/2]

maliput::api::rules::Rule::Id GetRuleIdFrom ( const maliput::api::rules::Rule::TypeId rule_type_id,
const maliput::api::LaneId lane_id,
int  index 
)

Returns a Rule::Id whose base string is: {rule_type_id.string()'/'lane_id.string()'_'index}.

◆ GetSegmentId()

maliput::api::SegmentId GetSegmentId ( int  xodr_track_id,
int  xodr_lane_section_index 
)

Returns a SegmentId whose base string is: {xodr_track_id_xodr_lane_section_index}.

◆ GetSpeedLimitId()

maliput::api::rules::SpeedLimitRule::Id GetSpeedLimitId ( const maliput::api::LaneId lane_id,
int  speed_limit_index 
)

Returns a SpeedLimitRule::Id whose base string is: {lane_id_speed_limit_index}.

◆ GetXodrLaneFromMalidriveLane()

const xodr::Lane & GetXodrLaneFromMalidriveLane ( const Lane lane)
Returns
The xodr::Lane that matches with lane.
Parameters
laneThe Lane to retrieve its correspondant xodr::Lane. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen lane is nullptr.
maliput::common::assertion_errorWhen the correspondant xodr::Lane cannot be found.

◆ GetXodrRoadFromMalidriveLane()

const xodr::RoadHeader & GetXodrRoadFromMalidriveLane ( const Lane lane)
Returns
The xodr::RoadHeader that matches with the Road that contains lane.
Parameters
laneThe Lane to retrieve its correspondant xodr::RoadHeader. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen lane is nullptr.
maliput::common::assertion_errorWhen the correspondant xodr::RoadHeader cannot be found.

◆ is_driveable_lane()

bool is_driveable_lane ( const xodr::Lane xodr_lane)

Determines whether or not an xodr_lane is driveable by any vehicle.

This includes lanes that OpenDRIVE's Standard marks as driveable for motorized vehicles when the xml attribute in the node is any of the following xodr::Lane::Type:

  • kDriving
  • kMwyEntry
  • kMwyExit
  • kEntry
  • kExit
  • kOnRamp
  • kOffRamp
  • kConnectingRamp
  • kRoadWorks

Note that xodr::Lane::Type::kBiking and xodr::Lane::Type::kSpecial1 are not included but this function also returns true when xodr_lanes type matches any of them too. xodr::Lane::Type::kBiking is driveable because non motorized vehicles are allowed to drive through. For a full description why xodr::Lane::Type::kSpecial1 is considered, see malidrive#272 and malidrive#273.

This function considers as non-driveable the following list of xodr::Lane::Type:

  • kNone
  • kStop
  • kShoulder
  • kSidewalk
  • kBorder
  • kRestricted
  • kParking
  • kSpecial2
  • kSpecial3
  • kTram
  • kRail
  • kMedian
Returns
True when xodr_lane is not the TRACK-lane and it is drivable.
Parameters
xodr_laneAn Xodr Lane that will be evaluated as drivable or non-drivable
Exceptions
maliput::common::assertion_errorWhen xodr_lane's type is not a valid type.

◆ operator&()

◆ operator|()

◆ SimplifyGeometries()

std::vector< xodr::Geometry > SimplifyGeometries ( const std::vector< xodr::Geometry > &  geometries,
const std::vector< xodr::DBManager::XodrGeometriesToSimplify > &  geometries_to_simplify 
)

Creates a new vector of xodr::Geometry out of geometries by simplifying it following geometries_to_simplify's actions.

Parameters
geometriesThe vector of xodr::Geometry to simplify of the same RoadHeader::Id.
geometries_to_simplifyContains disjunct groups of geometry indices with the same xodr::RoadHeader::Id. When it is empty, no action is performed.
Returns
A vector of xodr:Geometry.

◆ SolveLaneEndsForConnectingRoad()

std::vector< maliput::api::LaneEnd > SolveLaneEndsForConnectingRoad ( const maliput::api::RoadGeometry rg,
const MalidriveXodrLaneProperties xodr_lane_properties,
const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &  road_headers,
XodrConnectionType  connection_type 
)

Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface with other XODR Roads, not XODR Junctions.

Parameters
rgIs the pointer to the RoadGeometry is being built. It must not be nullptr.
xodr_lane_propertiesContains useful XODR Lane Properties.
road_headersRoadHeaders of the XODR Map.
connection_typeIs the type (successor or predecessor) of link that is solved.
Exceptions
maliput::common::assertion_errorWhen rg is nullptr.
maliput::common::assertion_errorWhen there isn't a valid RoadLink.
maliput::common::assertion_errorWhen there isn't a valid LaneLink.

◆ SolveLaneEndsForInnerLaneSection()

std::vector< maliput::api::LaneEnd > SolveLaneEndsForInnerLaneSection ( const maliput::api::RoadGeometry rg,
const maliput::api::LaneEnd lane_end,
const MalidriveXodrLaneProperties xodr_lane_properties 
)

Searches which LaneEnds connect to lane_end considering it belongs to an inner interface.

Parameters
rgis the pointer to the RoadGeometry is being built. It must not be nullptr.
lane_endis the LaneEnd to which this method looks for connections.
xodr_lane_propertiesContains useful XODR Lane Properties.
Exceptions
maliput::common::assertion_errorWhen either rg is nullptr.

◆ SolveLaneEndsForJunction()

std::vector< maliput::api::LaneEnd > SolveLaneEndsForJunction ( const maliput::api::RoadGeometry rg,
const MalidriveXodrLaneProperties xodr_lane_properties,
const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &  road_headers,
const std::unordered_map< xodr::Junction::Id, xodr::Junction > &  junctions,
XodrConnectionType  connection_type 
)

Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface with a XODR Junction but the XODR Road does not live in a XODR Junction.

Parameters
rgIs the pointer to the RoadGeometry is being built. It must not be nullptr.
xodr_lane_propertiesContains useful XODR Lane Properties.
road_headersRoadHeaders of the XODR Map.
junctionsJunctions of the XODR Map.
connection_typeIs the type (successor or predecessor) of link that is solved.
Exceptions
maliput::common::assertion_errorWhen either rg is nullptr.
maliput::common::assertion_errorWhen there isn't a valid RoadLink.
maliput::common::assertion_errorWhen the junction where the road is connected to doesn't exist.

◆ SolveLaneEndsWithinJunction()

std::vector< maliput::api::LaneEnd > SolveLaneEndsWithinJunction ( const maliput::api::RoadGeometry rg,
const MalidriveXodrLaneProperties xodr_lane_properties,
const std::map< xodr::RoadHeader::Id, xodr::RoadHeader > &  road_headers,
XodrConnectionType  connection_type 
)

Searches which LaneEnds connect to xodr_lane_properties.lane in connection_type direction considering the LaneEnd belongs to an external interface.

The XODR Road that contains the LaneEnd is assumed to live within an XODR Junction and it could connect to another XODR Road.

Parameters
rgIs the pointer to the RoadGeometry is being built. It must not be nullptr.
xodr_lane_propertiesContains useful XODR Lane Properties.
road_headersRoadHeaders of the XODR Map.
connection_typeIs the type (successor or predecessor) of link that is solved.
Exceptions
maliput::common::assertion_errorWhen either rg is nullptr.
maliput::common::assertion_errorWhen the RoadLink links to a junction.

◆ VehicleExclusiveValueForXodrLane()

std::optional< std::string > VehicleExclusiveValueForXodrLane ( const xodr::Lane xodr_lane)

Determines the vehicle exclusive rule state value for xodr_lane based on its XODR Lane type.

Parameters
xodr_laneAn XODR Lane. It must not be nullptr.
Returns
"NonMotorizedVehicleOnly" when xodr_lane's type is xodr::Lane::Type::kBiking. "MotorizedVehicleOnly" when xodr_lane's type is xodr::Lane::Type::kMwyEntry or xodr::Lane::Type::kMwyExit. Otherwise, it returns nullopt.
Exceptions
maliput::common::assertion_errorWhen xodr_lane's type is not a valid type.

◆ VehicleUsageAndExclusiveRuleStateValues()

std::pair< std::string, std::optional< std::string > > VehicleUsageAndExclusiveRuleStateValues ( const Lane lane)
Returns
A pair whose first element is vehicle usage rule value and second element is the vehicle exclusive rule value for lane.
Exceptions
maliput::common::assertion_errorWhen lane is nullptr.

◆ VehicleUsageValueForXodrLane()

std::string VehicleUsageValueForXodrLane ( const xodr::Lane xodr_lane)

Determines the vehicle usage rule state value for xodr_lane based on its XODR Lane type.

Parameters
xodr_laneAn XODR Lane. It must not be nullptr.
Returns
"NonPedestrians" when is_driveable_lane(xodr_lane) returns true and XODR Lane type is not xodr::Lane::Type::kParking. "Unrestricted" when XODR Lane type is xodr::Lane::Type::kParking or xodr::Lane::Type::kNone. Otherwise, it returns "NonVehicles".
Exceptions
maliput::common::assertion_errorWhen xodr_lane's type is not a valid type.

◆ XodrParserConfigurationFromRoadGeometryConfiguration()

xodr::ParserConfiguration XodrParserConfigurationFromRoadGeometryConfiguration ( const RoadGeometryConfiguration rg_config)

Builds a xodr::ParserConfiguration from a RoadGeometryConfiguration struct.

Parameters
rg_configThe RoadGeometryConfiguration struct.
Returns
A xodr::ParserConfiguration struct.

Variable Documentation

◆ kMinLinearTolerance

constexpr double kMinLinearTolerance {1e-3}
staticconstexpr