maliput_malidrive
RoadGeometryConfiguration Struct Reference

Detailed Description

RoadGeometry construction parameters.

#include <src/maliput_malidrive/builder/road_geometry_configuration.h>

Classes

struct  BuildTolerance
 Holds linear and angular tolerance to be used by the builder. More...
 

Public Types

enum  StandardStrictnessPolicy : unsigned int { kStrict = 0, kAllowSchemaErrors = 1 << 0, kAllowSemanticErrors = 1 << 1, kPermissive = kAllowSemanticErrors | kAllowSchemaErrors }
 Level of flexibility in terms of adhering to the OpenDrive standard when constructing a RoadGeometry. More...
 
enum  SimplificationPolicy { kNone, kSimplifyWithinToleranceAndKeepGeometryModel }
 Degree to which the RoadGeometry should be simplified. More...
 

Public Member Functions

std::map< std::string, std::string > ToStringMap () const
 

Static Public Member Functions

static SimplificationPolicy FromStrToSimplificationPolicy (const std::string &policy)
 Converts a string to a SimplificationPolicy. More...
 
static std::string FromSimplificationPolicyToStr (const SimplificationPolicy &policy)
 Converts a SimplificationPolicy to a string. More...
 
static StandardStrictnessPolicy FromStrToStandardStrictnessPolicy (const std::string &policy)
 Converts a string to a StandardStrictnessPolicy. More...
 
static std::string FromStandardStrictnessPolicyToStr (const StandardStrictnessPolicy &policy)
 Converts a StandardStrictnessPolicy to a string. More...
 
static RoadGeometryConfiguration FromMap (const std::map< std::string, std::string > &road_geometry_configuration)
 Creates a RoadGeometryConfiguration out of a string dictionary. More...
 

Public Attributes

Road Geometry Configuration's parameters.
maliput::api::RoadGeometryId id {"maliput"}
 
std::string opendrive_file {""}
 
BuildTolerance tolerances {constants::kAngularTolerance}
 
double scale_length {constants::kScaleLength}
 
maliput::math::Vector3 inertial_to_backend_frame_translation {0., 0., 0.}
 
BuildPolicy build_policy {BuildPolicy::Type::kSequential}
 
SimplificationPolicy simplification_policy {SimplificationPolicy::kNone}
 
StandardStrictnessPolicy standard_strictness_policy {StandardStrictnessPolicy::kPermissive}
 
bool omit_nondrivable_lanes {true}
 

Member Enumeration Documentation

◆ SimplificationPolicy

enum SimplificationPolicy
strong

Degree to which the RoadGeometry should be simplified.

Enumerator
kNone 

No simplification must be done.

kSimplifyWithinToleranceAndKeepGeometryModel 

Merge geometry pieces and keep the original geometry model.

◆ StandardStrictnessPolicy

enum StandardStrictnessPolicy : unsigned int
strong

Level of flexibility in terms of adhering to the OpenDrive standard when constructing a RoadGeometry.

This is useful when working with .xodr files that violate the OpenDrive standard. The policy is specified by taking the union of one or more of the following bit flags.

Enumerator
kStrict 

Do not permit any errors.

kAllowSchemaErrors 

Allow schema syntax errors.

kAllowSemanticErrors 

Allow semantic errors.

kPermissive 

Allow all previous violations.

Member Function Documentation

◆ FromMap()

RoadGeometryConfiguration FromMap ( const std::map< std::string, std::string > &  road_geometry_configuration)
static

Creates a RoadGeometryConfiguration out of a string dictionary.

The keys of the map are listed at RoadGeometry configuration builder keys.

Parameters
road_geometry_configurationA string-string map containing the configuration for the builder.

◆ FromSimplificationPolicyToStr()

std::string FromSimplificationPolicyToStr ( const SimplificationPolicy policy)
static

Converts a SimplificationPolicy to a string.

Parameters
policySimplificationPolicy to be translated to a string. Enumerator's name matches the string except without the leading 'k' and is all lower case.
Returns
A string.

◆ FromStandardStrictnessPolicyToStr()

std::string FromStandardStrictnessPolicyToStr ( const StandardStrictnessPolicy policy)
static

Converts a StandardStrictnessPolicy to a string.

Parameters
policyStandardStrictnessPolicy to be translated to a String. Valid strings match the enumerator's name except without the leading 'k' and is all lower case.
Returns
A string value.

◆ FromStrToSimplificationPolicy()

RoadGeometryConfiguration::SimplificationPolicy FromStrToSimplificationPolicy ( const std::string &  policy)
static

Converts a string to a SimplificationPolicy.

Parameters
policyString to be translated to a SimplificationPolicy. Valid strings match the enumerator's name except without the leading 'k' and is all lower case.
Returns
A SimplificationPolicy value.
Exceptions
maliput::common::assertion_errorWhen policy isn't a valid SimplificationPolicy.

◆ FromStrToStandardStrictnessPolicy()

RoadGeometryConfiguration::StandardStrictnessPolicy FromStrToStandardStrictnessPolicy ( const std::string &  policy)
static

Converts a string to a StandardStrictnessPolicy.

Parameters
policyString to be translated to a StandardStrictnessPolicy. Valid strings match the enumerator's name except without the leading 'k' and is all lower case.
Returns
A StandardStrictnessPolicy value.
Exceptions
maliput::common::assertion_errorWhen policy isn't a valid StandardStrictnessPolicy.

◆ ToStringMap()

std::map< std::string, std::string > ToStringMap ( ) const

The keys of the map are listed at RoadGeometry configuration builder keys.

Returns
A string-string map containing the RoadGeometry configuration.

Member Data Documentation

◆ build_policy

BuildPolicy build_policy {BuildPolicy::Type::kSequential}

◆ id

◆ inertial_to_backend_frame_translation

maliput::math::Vector3 inertial_to_backend_frame_translation {0., 0., 0.}

◆ omit_nondrivable_lanes

bool omit_nondrivable_lanes {true}

◆ opendrive_file

std::string opendrive_file {""}

◆ scale_length

double scale_length {constants::kScaleLength}

◆ simplification_policy

◆ standard_strictness_policy

◆ tolerances


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