aerostitch / testnavit

0 stars 0 forks source link

Take zeroth exit announcement #276

Open aerostitch opened 9 years ago

aerostitch commented 9 years ago

Issue migrated from trac ticket # 1303

component: core | priority: major

2015-05-19 11:23:23: tryagain created the issue


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.

aerostitch commented 9 years ago

2015-05-21 07:48:48: @jandegr commented


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 ?

aerostitch commented 9 years ago

2015-05-21 07:48:48: @jandegr

aerostitch commented 9 years ago

2015-05-21 10:17:31: tryagain commented


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.

aerostitch commented 9 years ago

2015-05-22 06:11:43: @jandegr commented


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. [[Image(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). [[Image(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.

aerostitch commented 9 years ago

2015-05-22 06:11:43: @jandegr

aerostitch commented 9 years ago

2015-05-22 06:11:43: @jandegr

aerostitch commented 9 years ago

2015-05-22 14:20:07: tryagain commented


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.

aerostitch commented 9 years ago

2015-05-23 04:04:46: @jandegr commented


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.

aerostitch commented 9 years ago

2015-05-23 04:04:46: @jandegr

aerostitch commented 9 years ago

2015-05-23 04:04:46: @jandegr

aerostitch commented 9 years ago

2015-08-13 13:29:40: tryagain commented


it seems to work fine for me, thank you!

What about extending it to LHD?