OpenDRIVE to CR conversion issues with sidewalks involving intersections

Hello,

I am encountering issues when converting a OpenDRIVE map to a lanelet2 map with CR as the intermediary. The Lanelet2 has bad sidewalk layouts where some of them are rendered as roads rather then sidewalks. This seems to mainly be when attached to an intersection and how this xodr treats the sidewalks in intersections.

While this shows in the end for me as lanelet2 due to my use and testing. The issue seems to be in the conversion from OpenDRIVE to CR. The sidewalks in the xodr for the intersections are split off for intersections and an offset applied that seems to be the issue. This can be seen in Road 28 of the below xml from Carla Simulator Town01 map. I will gladly send the map to a email if desired.

<road name="Road 28" length="1.1871843534552140e+1" id="28" junction="26">
        <link>
            <predecessor elementType="road" elementId="1" contactPoint="start"/>
            <successor elementType="road" elementId="16" contactPoint="start"/>
        </link>
        <planView>
            <geometry s="0.0000000000000000e+0" x="3.2562787971087317e+2" y="-3.9886777216659395e+0" hdg="6.2826540704947931e+0" length="6.4999999999999147e-1">
                <line/>
            </geometry>
            <geometry s="6.4999999999999147e-1" x="3.2627787961915413e+2" y="-3.9890230254948142e+0" hdg="6.2826540704947931e+0" length="1.3500000000000085e+0">
                <line/>
            </geometry>
            <geometry s="2.0000000000000000e+0" x="3.2762787942866078e+2" y="-3.9897401949855427e+0" hdg="-5.3123668478982644e-4" length="3.7676815999147690e+0">
                <arc curvature="-1.8749975596147403e-1"/>
            </geometry>
            <geometry s="5.7676815999147690e+0" x="3.3108922888558277e+2" y="-5.2679648544673912e+0" hdg="-7.0697061720934240e-1" length="4.0973081237608877e-1">
                <line/>
            </geometry>
            <geometry s="6.1774124122908578e+0" x="3.3140076076267900e+2" y="-5.5340987083140405e+0" hdg="-7.0697061720936616e-1" length="3.6844311222612829e+0">
                <arc curvature="-2.3460487104754424e-1"/>
            </geometry>
            <geometry s="9.8618435345521398e+0" x="3.3289461892892433e+2" y="-8.7775823354984350e+0" hdg="-1.5714003377550503e+0" length="2.0099999999999998e+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="6.4999999999999147e-1" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="2.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="3.5104889054805302e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="5.2095110945194696e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="6.0204889054805300e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="7.7195110945194685e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="9.8618435345521398e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <elevation s="9.8718435345521396e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
        </elevationProfile>
        <lateralProfile>
            <superelevation s="0.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <superelevation s="6.4999999999999147e-1" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <superelevation s="2.0000000000000000e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <superelevation s="9.8618435345521398e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <superelevation s="9.8718435345521396e+0" a="0.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
        </lateralProfile>
        <lanes>
            <laneOffset s="0.0000000000000000e+0" a="-4.3000000000000007e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="6.4999999999999147e-1" a="-4.3000000000000007e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="2.0000000000000000e+0" a="-4.2999999999999998e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="9.8618435345521398e+0" a="-4.2999999999999812e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneOffset s="9.8718435345521396e+0" a="-4.2999999999999812e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
            <laneSection s="0.0000000000000000e+0">
                <left>
                    <lane id="2" type="shoulder" level="false">
                        <link>
                            <predecessor id="2"/>
                            <successor id="-2"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="2.9999999999999982e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="6.4999999999999147e-1" a="2.9999999999999982e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="2.0000000000000000e+0" a="2.9999999999999982e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="9.8618435345521398e+0" a="2.9999999999999982e-1" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="9.8718435345521396e+0" a="2.9999999999999982e-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="6.4999999999999147e-1" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="2.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="9.8618435345521398e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="9.8718435345521396e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{11c29d98-8f34-4c99-a96e-51411d179be1}" travelDir="undirected"/>
                            <vectorLane sOffset="6.4999999999999147e-1" laneId="{e0680424-d54c-4434-ad8f-7b3e9e157bae}" travelDir="undirected"/>
                            <vectorLane sOffset="2.0000000000000000e+0" laneId="{66b12d77-c09f-4271-b804-b7424a845d7f}" travelDir="undirected"/>
                            <vectorLane sOffset="9.8618435345521398e+0" laneId="{653e66f6-b3fb-497a-b261-093efc947c7d}" travelDir="undirected"/>
                            <vectorLane sOffset="9.8718435345521396e+0" laneId="{7e1d2d41-7b9b-4cfd-9403-a83fa37859dc}" travelDir="undirected"/>
                        </userData>
                    </lane>
                    <lane id="1" type="sidewalk" level="false">
                        <link>
                            <predecessor id="3"/>
                            <successor id="-3"/>
                        </link>
                        <width sOffset="0.0000000000000000e+0" a="4.0000000000000009e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="6.4999999999999147e-1" a="4.0000000000000009e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="2.0000000000000000e+0" a="4.0000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="9.8618435345521398e+0" a="4.0000000000000009e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>
                        <width sOffset="9.8718435345521396e+0" a="4.0000000000000009e+0" 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="6.4999999999999147e-1" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <roadMark sOffset="2.0000000000000000e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <roadMark sOffset="9.8618435345521398e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <roadMark sOffset="9.8718435345521396e+0" type="curb" material="standard" width="1.5239999999999998e-1" laneChange="none"/>
                        <userData>
                            <vectorLane sOffset="0.0000000000000000e+0" laneId="{817a4cb9-02c2-4556-9b9c-8bd4dcf6cb0e}" travelDir="undirected"/>
                            <vectorLane sOffset="6.4999999999999147e-1" laneId="{7b3dea46-33f7-43d2-9ce9-3a58b6d9353d}" travelDir="undirected"/>
                            <vectorLane sOffset="2.0000000000000000e+0" laneId="{811c8749-34f1-43fa-a88e-3ede1bc3b518}" travelDir="undirected"/>
                            <vectorLane sOffset="9.8618435345521398e+0" laneId="{bd17124c-7972-4147-8f69-26e2271a02d1}" travelDir="undirected"/>
                            <vectorLane sOffset="9.8718435345521396e+0" laneId="{0779b2dd-e43e-4358-b4bf-964c94b1aef3}" 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"/>
                        <roadMark sOffset="6.4999999999999147e-1" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="2.0000000000000000e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="9.8618435345521398e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <roadMark sOffset="9.8718435345521396e+0" type="none" material="standard" color="white" laneChange="none"/>
                        <userData/>
                    </lane>
                </center>
            </laneSection>
        </lanes>
        <userData>
            <vectorRoad corner="yes"/>
        </userData>
    </road>

As far as I can see this meets the OpenDRIVE spec.

The converted map gets rendered to this in CR. As can be seen the traffic lights for example are not right and the sidewalks switch between 2 way and single right of way markers. This is the left hand portion of the below image

The right hand side of the time show the final map in lanelet2 shows that the sidewalks are very wrong for the links they have. The shaded areas are sidewalks or are supposed to be. Some of the sidewalks are showing up as roads. I suspect this as mentioned is mainly due to the OpenDRIVE to CR conversion though.

The versions are:
commonroad-io-2023.1
commonroad-scenario-designer-0.7.0

Edit: Clarification that this issue seems to be partly or whole involving sidewalks in intersections

Hi,

thank you for notifying.
We will investigate the problem and try to fix it in the next release of the scenario-designer.

Best,
Sebastian