Opened 2 years ago

Last modified 2 years ago

#1303 new defect/bug

Take zeroth exit announcement

Reported by: tryagain Owned by: KaZeR
Priority: major Milestone:
Component: core Version: git master
Severity: normal Keywords:
Cc:

Description

When I start the route anywhere at way 111805175, putting destination is at way 193955651, Navit suggests me to leave the roundabout at zeroth exit.

Change History (6)

comment:1 Changed 2 years ago by jandegr

This one http://www.openstreetmap.org/#map=18/50.55107/36.57314 a little to the south of the reported one, shows the same failure on some of it exits as well.

The reason for the failures seems to be nodes of the roundabout connecting to an exit as well as entry road. Tested and confirmed with modified data. The question now is if this kind of mapping is good practice and do we modify the code to deal with these, or are these samples exceptions ?

Last edited 2 years ago by jandegr (previous) (diff)

comment:2 Changed 2 years ago by tryagain

Both rings are drawn in such a way that it's possible to leave them by only touching ring in one point. These touches seem to be not counted as exits.

I have found a similar situation on a different place of Earth: http://www.openstreetmap.org/browse/way/122090331

Even if this looks like an osm bug, we would better attempt to workaround it.

comment:3 Changed 2 years ago by jandegr

The one below is a partial solution : https://github.com/navit-gps/navit/commit/4d961681324f9d5ee97ea1f9f66d917639674ba0 If a node has an exit road, it is now counted no matter how many roads connect to that node. The old code examined only one of the connected roads.

The node where you enter the roundabout is not counted, even if it has an exit road attached to it as well. In case the route does not actually go over the roundabout for a minimal distance, navigation.c does not even know a roundabout is involved so that enter, touch and leave rightaway driving evaluates to a classic turn instruction. https://dl.dropboxusercontent.com/u/93775123/Navit/KTR2.PNG

I don't believe you can enter, touch and leave a roundabout in just one single node, unless your car has some special pivot mechanism.

The sample roundabout to the south is even worse, the connecting roads are tagged as roundabout as well.

this sample : http://www.openstreetmap.org/#map=17/50.56764/36.58488 is mapped correctly, no matter how close an entry and exit road are, there is always a small piece of roundabout inbetween and it convinces me that the other samples are just mappers lazyness.

The sample in Kentucky shows it even better, 1 sloppy mapping sample and several better mapped connections in one single place (hint SE). https://dl.dropboxusercontent.com/u/93775123/Navit/KTR1.PNG

Even if the suggested solution is only partial, it will prevent the instruction to leave at the zeroth exit, no matter what is mapped correctly or not, it should never say zeroth.

Last edited 2 years ago by jandegr (previous) (diff)

comment:4 Changed 2 years ago by tryagain

I have not yet tried your change, but code looks very well.

It appears that it could fix some other cases (not yet found in the wild) if some of exits sharing the same exit point are not routable, while others are routable. With old code we could skip the entire exit group from counting.

What about counting exits in proper ordering (depending of their angle)?

Here's southern roundabout panorama. There are actually three lanes approaching the roundabout from the east. Rightmost one now has continuous marking line (not yet visible on panorama), allowing only turn right from there. So when you drive on the right lane, you indeed touch the roundabout. I think it's acceptable to have "right turn" announcement in such situation.

I agree that links tagged as junction=roundabout are bugs. Will fix this osm data after we play enough with this very interesting sample :)

BTW roundabout you said is properly mapped is actually imperfect too. It actually has three lanes approaching from North, rightmost one allows only right turn. See panorama with visible continuous marking separating that lane from others. One could map that lane as a separate way which shortcuts links. But in real osm we'll probably meet both mappings.

comment:5 Changed 2 years ago by jandegr

Another addition : https://github.com/navit-gps/navit/commit/9b26332a68e0cbabc95dd77a029262c87c9ed50b

or like this https://github.com/navit-gps/navit/commit/d406b39420dec9e1cc077823c9614adf292ba6a0

When you actually use the roundabout, the exit connected to the same node as your entry road is now counted as well. Enter, touch and leave in the same node still leads to a classic turn instruction as before, and hints the driver to stay on the right lane. This is only a draft to test in RHD zones.

Last edited 2 years ago by jandegr (previous) (diff)

comment:6 Changed 2 years ago by tryagain

it seems to work fine for me, thank you!

What about extending it to LHD?

Note: See TracTickets for help on using tickets.