pyoscx / scenariogeneration

Python library to generate linked OpenDRIVE and OpenSCENARIO files
Mozilla Public License 2.0
256 stars 81 forks source link

Bug with CommonJunctionCreator? #232

Open zacksova opened 2 months ago

zacksova commented 2 months ago

I have been trying to use the CommonJunctionCreator to create 4 way intersections with and without medians. I first noticed this problem on an intersection with 2 left and 2 right lanes and a median lane assigned as an extra left lane. It appears that the fourth road is offset by 1 lane width and it is throwing off the location of some of the connecting roads. image

I have also noticed that this problem is fixed if the number of left and right lanes is reduced by 1. image

However the problem get's worse if you add to the number of left and right lanes. You can see here that with 3 left and right lanes the road appears to be offset by 2 lanes. image

I thought the way I was adding the median lane may have been causing this but when I tested this I determined that the issue persists just at a different number of lanes. 2 left and right lanes works fine, 3 left and right lanes has a 1 lane offset and the offset grows as more lanes are added. image image image

Does anybody have any advice for fixing this or working around this problem?

MandolinMicke commented 1 month ago

In the top pic, it looks like you have 5 lanes, not 4? The centerlane is supposed to have 0 width (according to the standard)