OpenDRIVE converter from file to object sets. More...
#include <xodr2borderbased.h>

Classes | |
| class | XODR_Signal |
| internal signal representation for conversion More... | |
Public Types | |
| typedef std::unordered_map< std::string, XODR_Signal > | SignalByID |
Public Member Functions | |
| XODR2BorderBasedConverter () | |
| Construct a new XODR2BorderBasedConverter object. More... | |
| void | convert (const char *filename, adore::env::BorderBased::BorderSet *target_set, adore::env::TCDSet *tcdSet, adore::env::BorderBased::LanePositionedObjectSet *stoplineSet, adore::env::BorderBased::ParkingSpotSet *parkingSpotSet, BorderIDTranslation *idTranslation, double *x0, double *y0, bool transform=false) |
| full conversion of OpenDRIVE map to object representations More... | |
| void | convert (const char *filename, adore::env::BorderBased::BorderSet *target_set, adore::env::TCDSet *tcdSet, adore::env::BorderBased::LanePositionedObjectSet *stoplineSet, adore::env::BorderBased::ParkingSpotSet *parkingSpotSet, bool transform) |
| slightly reduced conversion without reference point of map More... | |
| void | convert (const char *filename, adore::env::BorderBased::BorderSet *target_set) |
| reduced conversion with only border set as output More... | |
| void | convert (const char *filename, adore::env::BorderBased::BorderSet *target_set, bool transform) |
| reduced conversion with only border set as output More... | |
| void | convert (const char *filename, adore::env::BorderBased::BorderSet *target_set, bool transform, BorderIDTranslation *idTranslation) |
| reads borders from filename into target_set, transforms according to xodr south, west coordinate if so specified, and provides BorderIDTranslation table. More... | |
Public Attributes | |
| struct { | |
| double emax | |
| double edes | |
| double xmin | |
| double xmax | |
| double xstart | |
| double numberOfPointsPerBorder | |
| } | sampling |
| sampling configuration object More... | |
| double | m_x0 |
| double | m_y0 |
Private Types | |
| typedef adore::mad::LPiecewiseFunction< double, adoreMatrix< double, 2, 1 > > | TRoadCenterFun |
| typedef adore::mad::LPiecewiseFunction< double, double > | TRoadCenterHeadingFun |
| typedef adore::mad::LLinearPiecewiseFunctionM< double, 2 > | TBorderFun |
| typedef std::map< int, std::pair< TBorderFun *, adore::env::BorderBased::BorderType::TYPE > > | TSectionBorderSet |
| typedef adore::mad::LPiecewiseFunction< double, int > | TSectionMap |
| typedef std::vector< TSectionBorderSet * > | TSectionSet |
| typedef adore::mad::LPiecewiseFunction< double, double > | TOffsetFun |
| typedef adore::mad::LSpiralFunction< double, 1 > | TSpiral |
| typedef adore::mad::LLinearFunction< double, adoreMatrix< double, 2, 1 > > | TLine |
| typedef adore::mad::LPolynomialS< double, 3 > | TPoly3v |
| typedef adore::mad::LLinearFunction< double, double > | TPoly3u |
| typedef adore::mad::LPolynomialM< double, 2, 3 > | TParamPoly3 |
| typedef std::unordered_map< adore::env::BorderBased::Border *, std::string > | Border2RoadID |
Private Member Functions | |
| adore::env::BorderBased::BorderType::TYPE | convertLaneType (std::string xodrType) |
| convert xodr lane type to border type More... | |
| void | extractRoadCenterLine_Spiral (TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, double s0, double ds, double x0, double y0, double psi0, double kappa0, double kappa1) |
| extract spiral geometry of road center line More... | |
| void | extractRoadCenterLine_Line (TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, double s0, double ds, double x0, double y0, double psi0) |
| extract line geometry of road center line More... | |
| void | extractRoadCenterLine_Poly3 (TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, double s0, double ds, double x0, double y0, double psi0, double a, double b, double c, double d) |
| extract poly3 geometry of road center line More... | |
| void | extractRoadCenterLine_ParamPoly3 (TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, double s0, double ds, double x0, double y0, double psi0, pRange parameterRange, double au, double bu, double cu, double du, double av, double bv, double cv, double dv) |
| extract parampoly3 geometry of road center line More... | |
| void | extractRoadCenterLine (const OpenDRIVE::road_type &road, TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, TOffsetFun &offsetFun) |
| extract road center line geometry to center and center heading functions More... | |
| void | extractLanes_width (int &left_count, int &right_count, double s0, double s1, const lanes::laneSection_type §ion, std::map< int, std::pair< adore::mad::LPiecewiseFunction< double, double > *, adore::env::BorderBased::BorderType::TYPE >> &width_record) |
| extract lanes with width entries More... | |
| void | extractLanes_border (int &left_count, int &right_count, double s0, double s1, const lanes::laneSection_type §ion, std::map< int, std::pair< adore::mad::LPiecewiseFunction< double, double > *, adore::env::BorderBased::BorderType::TYPE >> &width_record) |
| extract lanes with border entries More... | |
| void | extractRoadSection (const lanes::laneSection_type §ion, TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢er_heading, TOffsetFun ¢er_offset, double s0, double s1, TSectionMap §ionMap, TSectionSet §ionSet) |
| combine lanes and center line to function representation of road section More... | |
| adore::env::TrafficControlDevice::TCDType | convertTCDType (std::string xodrtype) |
| convert OpenDRIVE signal type to traffic control device type More... | |
| void | convertBorders (const TSectionSet §ionSet, const TSectionMap §ionMap, adore::env::BorderBased::BorderSet *targetSet, const std::vector< XODR_Signal > &ordered_signal_set, adore::env::BorderBased::LanePositionedObjectSet *stoplineSet, Border2RoadID *border2roadID, const std::string &id) |
| convert function representation of road to border representation, determine absolute stop line positions and signal positions More... | |
| std::vector< XODR2BorderBasedConverter::XODR_Signal > | extractSignals (const OpenDRIVE::road_type &road) |
| save signals from OpenDRIVE to XODR_Signal for later processing More... | |
| void | convertNonStoplineSignals (TRoadCenterFun ¢er, TRoadCenterHeadingFun ¢erHeading, std::vector< XODR_Signal > &orderedSignalSet, adore::env::TCDSet *tcdSet) |
| determine absolute coordinate and heading of non stop line headings More... | |
| void | convertRoad (const OpenDRIVE::road_type &road, adore::env::BorderBased::BorderSet *targetSet, adore::env::TCDSet *tcdSet, adore::env::BorderBased::LanePositionedObjectSet *stoplineSet, adore::env::BorderBased::ParkingSpotSet *parkingSpotSet, Border2RoadID *idTranslation) |
| convert road geometry to borders and also extract traffic control devices and stop lines More... | |
| void | addMovementIdAndJunctionId (const std::unique_ptr< OpenDRIVE > op, adore::env::TCDSet *tcdSet) |
| determine controller and junction id of traffic lights More... | |
| void | do_convert (const char *filename, adore::env::BorderBased::BorderSet *targetSet, adore::env::TCDSet *tcdSet, adore::env::BorderBased::LanePositionedObjectSet *stoplineSet, adore::env::BorderBased::ParkingSpotSet *parkingSpotSet, BorderIDTranslation *idTranslation, double *x0, double *y0, bool relative_coordinates, double x_r, double y_r, double angle) |
| Fills data sets of BorderBased map data representation with data from openDrive xml file. More... | |
| void | translate_and_rotate_map (double dx, double dy, double dz, double x_r, double y_r, double angle, adore::env::BorderBased::BorderSet *sourceBorderSet, adore::env::TCDSet *sourceTcdSet, adore::env::BorderBased::LanePositionedObjectSet *sourceStoplineSet, adore::env::BorderBased::ParkingSpotSet *sourceParkingSpotSet, adore::env::BorderBased::BorderSet *targetBorderSet, adore::env::TCDSet *targetTcdSet, adore::env::BorderBased::LanePositionedObjectSet *targetStoplineSet, adore::env::BorderBased::ParkingSpotSet *targetParkingSpotSet, Border2RoadID *border2RoadID, BorderIDTranslation *idTranslation) |
| change position of all objects via translation More... | |
Static Private Attributes | |
| static const char * | XODR_SIGNALTYPE_STOPLINE = "294" |
OpenDRIVE converter from file to object sets.
|
private |
| typedef std::unordered_map<std::string,XODR_Signal> adore::if_xodr::XODR2BorderBasedConverter::SignalByID |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
Construct a new XODR2BorderBasedConverter object.
|
inlineprivate |
determine controller and junction id of traffic lights
| op | |
| tcdSet |


| void adore::if_xodr::XODR2BorderBasedConverter::convert | ( | const char * | filename, |
| adore::env::BorderBased::BorderSet * | target_set | ||
| ) |
reduced conversion with only border set as output
| filename | |
| target_set |

| void adore::if_xodr::XODR2BorderBasedConverter::convert | ( | const char * | filename, |
| adore::env::BorderBased::BorderSet * | target_set, | ||
| adore::env::TCDSet * | tcdSet, | ||
| adore::env::BorderBased::LanePositionedObjectSet * | stoplineSet, | ||
| adore::env::BorderBased::ParkingSpotSet * | parkingSpotSet, | ||
| bool | transform | ||
| ) |
slightly reduced conversion without reference point of map
| filename | |
| target_set | |
| tcdSet | |
| stoplineSet | |
| parkingSpotSet | |
| transform |

| void adore::if_xodr::XODR2BorderBasedConverter::convert | ( | const char * | filename, |
| adore::env::BorderBased::BorderSet * | target_set, | ||
| adore::env::TCDSet * | tcdSet, | ||
| adore::env::BorderBased::LanePositionedObjectSet * | stoplineSet, | ||
| adore::env::BorderBased::ParkingSpotSet * | parkingSpotSet, | ||
| BorderIDTranslation * | idTranslation, | ||
| double * | x0, | ||
| double * | y0, | ||
| bool | transform = false |
||
| ) |
full conversion of OpenDRIVE map to object representations
| filename | |
| target_set | |
| tcdSet | |
| stoplineSet | |
| parkingSpotSet | |
| x0 | |
| y0 | |
| transform |


| void adore::if_xodr::XODR2BorderBasedConverter::convert | ( | const char * | filename, |
| adore::env::BorderBased::BorderSet * | target_set, | ||
| bool | transform | ||
| ) |
reduced conversion with only border set as output
| filename | |
| target_set | |
| transform |

| void adore::if_xodr::XODR2BorderBasedConverter::convert | ( | const char * | filename, |
| adore::env::BorderBased::BorderSet * | target_set, | ||
| bool | transform, | ||
| BorderIDTranslation * | idTranslation | ||
| ) |
reads borders from filename into target_set, transforms according to xodr south, west coordinate if so specified, and provides BorderIDTranslation table.
| filename | xodr file to be read |
| target_set | BorderSet, where imported borders are placed |
| transform | specify whether a transformation shall be applied according to xodr header south-west coordinates |
| idTranslation | a table providing translation between BorderID and xodr-roadID, and xodr-junctionID |

|
inlineprivate |
convert function representation of road to border representation, determine absolute stop line positions and signal positions
| sectionSet | |
| sectionMap | |
| targetSet | |
| ordered_signal_set | |
| stoplineSet |
for right side: p0 to p1
for left side: p1 to p0


|
inlineprivate |
convert xodr lane type to border type
| xodrType |

|
inlineprivate |
determine absolute coordinate and heading of non stop line headings
| center | |
| centerHeading | |
| orderedSignalSet | |
| tcdSet |


|
inlineprivate |
convert road geometry to borders and also extract traffic control devices and stop lines
| road | |
| targetSet | |
| tcdSet | |
| stoplineSet | |
| parkingSpotSet |


|
inlineprivate |
convert OpenDRIVE signal type to traffic control device type
| xodrtype |

|
inlineprivate |
Fills data sets of BorderBased map data representation with data from openDrive xml file.
| filename | |
| targetSet | |
| tcdSet | |
| stoplineSet | |
| parkingSpotSet | |
| x0 | |
| y0 | |
| relative_coordinates |
translates the map by a specified offset. idTranslation is computed inside, because BorderIDs change with translation.


|
inlineprivate |
extract lanes with border entries
| left_count | |
| right_count | |
| s0 | |
| s1 | |
| section | |
| width_record |


|
inlineprivate |
extract lanes with width entries
| left_count | |
| right_count | |
| s0 | |
| s1 | |
| section | |
| width_record |


|
inlineprivate |
extract road center line geometry to center and center heading functions
| road | |
| center | |
| center_heading | |
| offsetFun |
@TODO: extract the <laneOffset> entry, which is 0+ child entry of <lanes>


|
inlineprivate |
extract line geometry of road center line
| center | |
| center_heading | |
| s0 | |
| ds | |
| x0 | |
| y0 | |
| psi0 |


|
inlineprivate |
extract parampoly3 geometry of road center line
| center | |
| center_heading | |
| s0 | |
| ds | |
| x0 | |
| y0 | |
| psi0 | |
| parameterRange | |
| au | |
| bu | |
| cu | |
| du | |
| av | |
| bv | |
| cv | |
| dv |


|
inlineprivate |
extract poly3 geometry of road center line
| center | |
| center_heading | |
| s0 | |
| ds | |
| x0 | |
| y0 | |
| psi0 | |
| a | |
| b | |
| c | |
| d |

|
inlineprivate |
extract spiral geometry of road center line
| center | |
| center_heading | |
| s0 | |
| ds | |
| x0 | |
| y0 | |
| psi0 | |
| kappa0 | |
| kappa1 |


|
inlineprivate |
combine lanes and center line to function representation of road section
| section | |
| center | |
| center_heading | |
| center_offset | |
| s0 | |
| s1 | |
| sectionMap | |
| sectionSet |


|
inlineprivate |
save signals from OpenDRIVE to XODR_Signal for later processing
| road |
@TODO multiple lane validities are possible
positive orientation -> only lanes on right side of the road
negative orientation -> only for lanes on the left side of the road
no orientation -> valid for all lanes
@TODO add signal dependency


|
inlineprivate |
change position of all objects via translation
| dx | |
| dy | |
| dz | |
| sourceBorderSet | |
| sourceTcdSet | |
| sourceStoplineSet | |
| sourceParkingSpotSet | |
| targetBorderSet | |
| targetTcdSet | |
| targetStoplineSet | |
| targetParkingSpotSet |


| double adore::if_xodr::XODR2BorderBasedConverter::edes |
| double adore::if_xodr::XODR2BorderBasedConverter::emax |
| double adore::if_xodr::XODR2BorderBasedConverter::m_x0 |
| double adore::if_xodr::XODR2BorderBasedConverter::m_y0 |
| double adore::if_xodr::XODR2BorderBasedConverter::numberOfPointsPerBorder |
| struct { ... } adore::if_xodr::XODR2BorderBasedConverter::sampling |
sampling configuration object
| double adore::if_xodr::XODR2BorderBasedConverter::xmax |
| double adore::if_xodr::XODR2BorderBasedConverter::xmin |
|
staticprivate |
| double adore::if_xodr::XODR2BorderBasedConverter::xstart |