pageldev / libOpenDRIVE

Small, lightweight C++ library for handling OpenDRIVE files
Apache License 2.0
388 stars 136 forks source link

refline is not between lane -1 and lane 1 #42

Closed saoraozhe3hao closed 2 years ago

saoraozhe3hao commented 2 years ago

Load this xodr https://guard-strike.oss-cn-shanghai.aliyuncs.com/oasis/xodr/Town03.xodr

refline of road 1 is not between lane -1 and lane 1

pageldev commented 2 years ago

I think that is because there is a constant laneOffset of -3.5m in your file on L:141:

<laneOffset s="0.0000000000000000e+0" a="-3.5000000000000000e+0" b="0.0000000000000000e+0" c="0.0000000000000000e+0" d="0.0000000000000000e+0"/>

I implemented it in a way that the reference line gets shifted through lane offsets. In the OpenDrive v1.4 standard this is written:

The lane offset record defines a lateral shift of the lane reference line (which is usually identical to the road reference line).