Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaneOffsets's functions' continuity is not being checked #147

Open
francocipollone opened this issue Aug 10, 2021 · 5 comments
Open

LaneOffsets's functions' continuity is not being checked #147

francocipollone opened this issue Aug 10, 2021 · 5 comments

Comments

@francocipollone
Copy link
Collaborator

francocipollone commented Aug 10, 2021

https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/941bb30292bd422e543245e7f39b3fc1a90711f1/maliput_malidrive/src/maliput_malidrive/builder/road_curve_factory.cc#L224-L229

Line 228 should have FillingGapPolicy::kEnsureContiguity otherwise it isn't being checked.

@francocipollone francocipollone changed the title LaneOffsets's functions continuity LaneOffsets's functions' continuity is not being checked Aug 10, 2021
@francocipollone
Copy link
Collaborator Author

francocipollone commented Aug 12, 2021

I tried enabling this contiguity check and some of our resources are failing to load afterwards.

  • Highway.xodr
    • In Road 101
Click to see Road 101
<?xml version="1.0" encoding="UTF-8"?>
<OpenDRIVE>
    <header revMajor="1" revMinor="4" name="" version="1" date="2019-03-04T15:51:41" north="3.2777467746551008e+2" south="-1.7783521053267194e+2" east="9.8127789512724220e+1" west="-3.2627992569182089e+2" vendor="VectorZero">
        <geoReference><![CDATA[+proj=tmerc +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs ]]></geoReference>
        <userData>
            <vectorScene program="RoadRunner" version="2019.0.0 (build dbd5300fb)"/>
        </userData>
    </header>
    <road name="Road 101" length="2.0245472808201150e+1" id="101" junction="88">
        <link>
            <!-- <predecessor elementType="road" elementId="6" contactPoint="end"/>
            <successor elementType="road" elementId="5" contactPoint="end"/> -->
        </link>
        <planView>
            <geometry s="0.0000000000000000e+0" x="2.6762348721947831e+0" y="-8.9662504860315522e+1" hdg="2.5145963706441568e+0" length="2.0499999999999972e+0">
                <line/>
            </geometry>
            <geometry s="2.0499999999999972e+0" x="1.0160303827222776e+0" y="-8.8459646446854123e+1" hdg="2.5146026055954711e+0" length="1.1853009708269298e+1">
                <arc curvature="3.9493127855199164e-2"/>
            </geometry>
            <geometry s="1.3903009708269296e+1" x="-9.8339561755489022e+0" y="-8.3962450506296904e+1" hdg="2.9827150334730677e+0" length="6.3424630999318534e+0">
                <line/>
            </geometry>
        </planView>
        <elevationProfile>
            <elevation s="0.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="2.0499999999999972e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="1.3903009708269296e+1" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="1.9921823288511764e+1" a="-2.1087732254843061e-17" b="6.0715321659188248e-18" c="2.7008879836948117e-3" d="0.0000000000000000e+0"/>
        </elevationProfile>
        <lanes>
            <laneOffset s="0.0000000000000000e+0" a="-4.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="2.0499999999999972e+0" a="1.0364999999999990e+1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="1.3903009708269296e+1" a="1.0364999999999990e+1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneSection s="0.0000000000000000e+0">
                <left>
                    <lane id="7" type="driving" level="false">
                        <link>
                            <predecessor id="7"/>
                            <successor id="2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="6" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="5" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="4" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="3" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="2" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                </center>
            </laneSection>
            <laneSection s="2.0499999999999972e+0">
                <left>
                    <lane id="2" type="driving" level="false">
                        <link>
                            <predecessor id="7"/>
                            <successor id="-2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="1.1853009708269299e+1" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="1.1853009708269299e+1" a="6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                </center>
            </laneSection>
        </lanes>
    </road>
</OpenDRIVE>
  • RRFigure8.xodr
    • In Road 57
Click to see Road 57
<?xml version="1.0" encoding="UTF-8"?>
<OpenDRIVE>
    <header revMajor="1" revMinor="4" name="" version="1" date="2019-03-04T15:51:41" north="3.2777467746551008e+2" south="-1.7783521053267194e+2" east="9.8127789512724220e+1" west="-3.2627992569182089e+2" vendor="VectorZero">
        <geoReference><![CDATA[+proj=tmerc +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs ]]></geoReference>
        <userData>
            <vectorScene program="RoadRunner" version="2019.0.0 (build dbd5300fb)"/>
        </userData>
    </header>
    <road name="Road 57" length="8.1223546793923411e+0" id="57" junction="10">
        <link>
            <!-- <predecessor elementType="road" elementId="1" contactPoint="end"/>
            <successor elementType="road" elementId="4" contactPoint="end"/> -->
        </link>
        <planView>
            <geometry s="0.0000000000000000e+0" x="-4.4207450713174019e+0" y="-9.5733023885430377e+0" hdg="1.5721320073998160e+0" length="1.7824623551977936e-1">
                <line/>
            </geometry>
            <geometry s="1.7824623551977936e-1" x="-4.4209834018053629e+0" y="-9.3948714140738296e+0" hdg="1.5721706926927608e+0" length="3.7069399101085203e+0">
                <arc curvature="2.1052630174454742e-1"/>
            </geometry>
            <geometry s="3.8851861456282997e+0" x="-5.8001003653010867e+0" y="-6.0548075521642328e+0" hdg="2.3525790427571711e+0" length="1.7589901139580016e-1">
                <line/>
            </geometry>
            <geometry s="4.0610851570240989e+0" x="-5.9240292500095393e+0" y="-5.9299792951671133e+0" hdg="2.3525790427571711e+0" length="1.7589901139580016e-1">
                <line/>
            </geometry>
            <geometry s="4.2369841684198999e+0" x="-6.0479581347179909e+0" y="-5.8051510381699938e+0" hdg="2.3525790427571724e+0" length="3.7071236494662592e+0">
                <arc curvature="2.1052631085451354e-1"/>
            </geometry>
            <geometry s="7.9441078178861586e+0" x="-9.3781471024438758e+0" y="-4.4019171630929597e+0" hdg="3.1330261085608249e+0" length="1.7824686150618163e-1">
                <line/>
            </geometry>
        </planView>
        <elevationProfile>
            <elevation s="0.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="1.7824623551977936e-1" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="1.9451725257864450e+0" a="1.2325951644078309e-32" b="0.0000000000000000e+0" c="2.5160391649343841e-17" d="0.0000000000000000e+0"/>
            <elevation s="3.6392728574236379e+0" a="7.2209718514906972e-17" b="8.5248455674550152e-17" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="4.4456614985871541e+0" a="1.4095310484759571e-16" b="8.5248455674550128e-17" c="-2.5160391649343841e-17" d="0.0000000000000000e+0"/>
            <elevation s="6.1397618302243471e+0" a="2.1316282336250268e-16" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="7.9441078178861586e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
        </elevationProfile>
        <lanes>
            <laneOffset s="0.0000000000000000e+0" a="-3.9999999999999836e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="1.7824623551977936e-1" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="7.9441078178861586e+0" a="-4.0000000000000053e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneSection s="0.0000000000000000e+0">
                <left>
                    <lane id="4" type="sidewalk" level="false">
                        <link>
                            <predecessor id="4"/>
                            <successor id="2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="2.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="3" type="shoulder" level="false">
                        <link>
                            <predecessor id="3"/>
                            <successor id="1"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="2" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="white" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="solid solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                    </lane>
                </center>
            </laneSection>
            <laneSection s="1.7824623551977936e-1">
                <left>
                    <lane id="2" type="sidewalk" level="false">
                        <link>
                            <predecessor id="4"/>
                            <successor id="4"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="2.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="shoulder" level="false">
                        <link>
                            <predecessor id="3"/>
                            <successor id="3"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                    </lane>
                </center>
            </laneSection>
            <laneSection s="7.9441078178861586e+0">
                <left>
                    <lane id="4" type="sidewalk" level="false">
                        <link>
                            <predecessor id="2"/>
                            <successor id="-4"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="2.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="3" type="shoulder" level="false">
                        <link>
                            <predecessor id="1"/>
                            <successor id="-3"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="2" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="white" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData>
                            <vectorLane travelDir="backward"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="solid solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                    </lane>
                </center>
            </laneSection>
        </lanes>
        <objects>
            <object id="118" name="Signal_Post_30ft" s="3.9929675611705351e+0" t="2.7928376962158286e+0" zOffset="1.5240478515624992e-1" hdg="-7.8178268671035767e-1" roll="-3.4145404234280183e-16" pitch="-3.4393203722999429e-16" orientation="-" type="" height="0.0000000000000000e+0" width="0.0000000000000000e+0" radius="0.0000000000000000e+0" length="0.0000000000000000e+0" validLength="0.0000000000000000e+0"/>
            <object id="115" name="SingleBulbArm" s="5.2170587936300983e+0" t="2.1343042880412266e+0" zOffset="9.2149999999999999e+0" hdg="2.1395156383514404e+0" roll="3.9122476526373356e-17" pitch="2.5005653373865776e-17" orientation="+" type="" height="0.0000000000000000e+0" width="0.0000000000000000e+0" radius="0.0000000000000000e+0" length="0.0000000000000000e+0" validLength="0.0000000000000000e+0"/>
        </objects>
    </road>
</OpenDRIVE>
  • Cloverleaf
    • In Road 1227
Click to see Road 1227
<?xml version="1.0" encoding="UTF-8"?>
<OpenDRIVE>
    <header revMajor="1" revMinor="4" name="" version="1" date="2019-09-03T12:56:54" north="3.8442382454732882e+2" south="-4.1767158143754739e+2" east="2.9117380027029537e+2" west="-5.8858322457755753e+2" vendor="VectorZero">
        <geoReference><![CDATA[+proj=tmerc +lat_0=37.4025637 +lon_0=-122.118763 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs ]]></geoReference>
        <userData>
            <vectorScene program="RoadRunner" version="2019.1.2 (build a47a09c)"/>
        </userData>
    </header>
    <road name="Road 1227" length="1.7292038634212592e+1" id="1227" junction="1226">
        <link>
            <!-- <predecessor elementType="road" elementId="12" contactPoint="end"/>
            <successor elementType="road" elementId="11" contactPoint="end"/> -->
        </link>
        <planView>
            <geometry s="0.0000000000000000e+0" x="-3.7749303891922796e+0" y="-9.8572189360145899e+1" hdg="2.5145963706441568e+0" length="2.0500000000000043e+0">
                <line/>
            </geometry>
            <geometry s="2.0500000000000043e+0" x="-5.4350793116280638e+0" y="-9.7369371206085773e+1" hdg="2.5146026022897847e+0" length="6.7038088079351468e+0">
                <arc curvature="6.9817888666096867e-2"/>
            </geometry>
            <geometry s="8.7538088079351510e+0" x="-1.1571530912679629e+1" y="-9.4825642198440590e+1" hdg="2.9826483792809997e+0" length="8.5382298262774405e+0">
                <line/>
            </geometry>
        </planView>
        <elevationProfile>
            <elevation s="0.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="2.0500000000000043e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="1.4771899925222343e+1" a="-1.4840017235895342e-18" b="-9.2157184661267877e-19" c="-3.9160813566595546e-4" d="0.0000000000000000e+0"/>
            <elevation s="1.5097683170708603e+1" a="-4.1563221018946304e-5" b="-2.5515873879215800e-4" c="-3.9160813566595546e-4" d="0.0000000000000000e+0"/>
        </elevationProfile>
        <lanes>
            <laneOffset s="0.0000000000000000e+0" a="-1.5000000000000002e+1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="2.0500000000000043e+0" a="-6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="1.5097683170708603e+1" a="-6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneSection s="0.0000000000000000e+0">
                <left>
                    <lane id="8" type="shoulder" level="false">
                        <link>
                            <predecessor id="8"/>
                            <successor id="3"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{a3ac34d7-11ff-4924-8cbf-67f9eba8415f}" travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="7" type="driving" level="false">
                        <link>
                            <predecessor id="7"/>
                            <successor id="2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{d539762e-94e7-451b-bc85-58bf4030e2c2}" travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="6" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{2130dba3-9b83-4dd9-b53e-2faef0cf188b}" travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="5" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{a4de370f-143c-4ea1-a0be-67c1c13f8bd4}" travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="4" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="broken" material="standard" color="white" width="1.2500000000000000e-1" laneChange="both"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{7882c39a-d7b0-4496-9f4c-88b2da1af5ae}" travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="3" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{8d7e6ece-6c6f-4510-a14c-8425d1d020d4}" travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="2" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{615e26a1-0e87-49f2-a2bb-67f724894a5a}" travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="5.0000000000000000e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{b78d8bf8-7e0f-4cd2-b535-65c9045ef281}" travelDir="undirected"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="solid" material="standard" color="yellow" width="1.2500000000000000e-1" laneChange="none"/>
                        <userData/>
                    </lane>
                </center>
            </laneSection>
            <laneSection s="2.0500000000000043e+0">
                <left>
                    <lane id="3" type="shoulder" level="false">
                        <link>
                            <predecessor id="8"/>
                            <successor id="-3"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="1.3047683170708599e+1" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="1.4737683170708600e+1" a="6.3499999999999979e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <roadMark sOffset="1.3047683170708599e+1" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{b4ca18db-218b-4a29-989d-3d02f81c36eb}" travelDir="undirected"/>
                            <vectorLane sOffset="1.5097683170708603e+1" laneId="{bb591b61-51e7-4985-a7b9-844e0e8bcf4d}" travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="2" type="driving" level="false">
                        <link>
                            <predecessor id="7"/>
                            <successor id="-2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="3.5000000000000000e+0" b="-4.5102810375396984e-17" c="1.0359149158013479e-2" d="-4.6860143203523628e-4"/>
                        <width sOffset="1.3047683170708599e+1" a="4.2226750836993583e+0" b="3.0998806503978044e-2" c="-7.9833398975948707e-3" d="-4.6860143203521752e-4"/>
                        <width sOffset="1.4737683170708600e+1" a="4.2500000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="1.3047683170708599e+1" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{630b4002-0c71-43f0-94d7-50a9a3116262}" travelDir="backward"/>
                            <vectorLane sOffset="1.5097683170708603e+1" laneId="{30be63ce-9c50-4697-91b1-f9013a17c889}" travelDir="backward"/>
                        </userData>
                    </lane>
                    <lane id="1" type="none" level="false">
                        <width sOffset="0.0000000000000000e+0" a="6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="1.3047683170708599e+1" a="6.3500000000000001e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <roadMark sOffset="0.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="1.1047297771371820e+1" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="1.3047683170708599e+1" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{43473993-6030-439b-a624-2ae3ea10cda6}" travelDir="undirected"/>
                            <vectorLane sOffset="1.5097683170708603e+1" laneId="{0f887425-abd7-4b62-b146-037c17ea493d}" travelDir="undirected"/>
                        </userData>
                    </lane>
                </left>
                <center>
                    <lane id="0" type="none" level="false">
                        <roadMark sOffset="0.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <roadMark sOffset="1.3047683170708599e+1" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData/>
                    </lane>
                </center>
            </laneSection>
        </lanes>
    </road>
</OpenDRIVE>

For both cases, they present a road with a laneOffset description with a jump in its value. However, this jump in value is compensated using several lanes of none type. The outcome of this is a driving lane without any jump.

See the next picture where Road 101 from Highway is used as an example.

highway101
Note: Typo Lane 101_1_1 should be Lane 101_1_2.

  • The laneOffset jumps at road_s = 2 (~2 meters after the road starts) (The jump is about of 14 meters)
  • Road is split into two laneSections, the second laneSection starts at road_s = 2.
  • The jump is compensated by adding none type lanes for the first laneSection. That's why the id of the lane changes from 7 in the first laneSection to 2 for the second one.

@francocipollone
Copy link
Collaborator Author

francocipollone commented Aug 12, 2021

Given that this is used quite a lot by RR we probably should allow having discontinuities in the laneOffset description but afterwards we should check that lanes are connected smoothly

@liangfok
Copy link
Collaborator

Thanks for the analysis. Yes, any increased RR compatibility would be helpful in our transition downstream.

@agalbachicar
Copy link
Collaborator

Interesting finding. I've noticed the large amount of none lanes before but could not make any sense of it. You have a great eye for pattern matching @francocipollone !

One question:

we should check that lanes are connected smoothly.

In which sense? Do you mean the end of one lane with the start of another lane? Or do you refer to the lateral boundary of a lane and its adjacent lanes?

@francocipollone
Copy link
Collaborator Author

Do you mean the end of one lane with the start of another lane?

Exactly. Given that a discontinuous laneOffset could end up in a contiguous Road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants