osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.71k stars 1.03k forks source link

Routing instructions: keep right (fork) instead of take exit on the right #21296

Open alphasierra59 opened 1 week ago

alphasierra59 commented 1 week ago

Description

OSMAnd's routing instructions are stating to "stay right" or follow exits from trunk roads to other roads in a manner that would be used for a fork instead of a marked exit. It's a little confusing when navigating unfamiliar roads.

Link to discussion on OSM community

Other routing engines like Valhalla or OSRM say to "take the ramp" or "take the exit" as shown below Valhalla example OSRM example

The routing engine should treat these branches as exits instead of forks.

Steps to reproduce

Navigate on a route that takes an exit from a trunk road.

Actual result

Exits are described by OSMAnd engine as forks with instructions to "stay right".

Expected result

Exits should be described as exits with instructions to "take ramp" or "take exit".

Your Environment (required)

WARNING Crash-Logs MAY contain information you deem sensitive. Review this CAREFULLY before posting your issue!

OsmAnd Version: 8.4.6
Android/iOS version: Android 15
Device model: Pixel 7
Crash-Logs: N/A
vshcherb commented 1 week ago

https://osmand.net/map/navigate/?start=47.913171,-122.108751&end=47.914591,-122.106991&profile=car#18/47.91449/-122.10842

vshcherb commented 1 week ago

That's probably issue about more detailed voice instructions as text description are not connected to voice instruction as I know

alphasierra59 commented 1 week ago

https://osmand.net/map/navigate/?start=47.913171,-122.108751&end=47.914591,-122.106991&profile=car#18/47.91449/-122.10842

Thanks for making that example with the OSMAnd engine. It looks like the navigation instructions it's generating match what I hear when I run the nav sim on my device.

Another example from the thread on Ontario where it also says to "turn slightly right" on an exit. https://osmand.net/map/navigate/?start=43.990513,-78.612932&end=43.993817,-78.608169&profile=car#16/43.9919/-78.6155

yuriiurshuliak commented 1 week ago

I reviewed both routes specified by the user. In the first route (link to route), the instruction "Turn right (+TR,C) onto 2nd Street and go 0.2 km" was displayed correctly, without any "stay right" instruction.

In the second route (link to route), there was also no "turn slightly right" instruction. Instead, a clear instruction to "Turn right onto Concession Road 6 and go 0.2 km" was provided.

OsmAnd~ 5.0.0#3692m, released: 2024-11-12

alphasierra59 commented 1 week ago

I reviewed both routes specified by the user. In the first route (link to route), the instruction "Turn right (+TR,C) onto 2nd Street and go 0.2 km" was displayed correctly, without any "stay right" instruction.

In the second route (link to route), there was also no "turn slightly right" instruction. Instead, a clear instruction to "Turn right onto Concession Road 6 and go 0.2 km" was provided.

OsmAnd~ 5.0.0#3692m, released: 2024-11-12 video_2024-11-12_12-52-17.mp4

video_2024-11-12_12-52-18.mp4

The video starts one turn too late. It needs to be back one step further getting off the highway onto the ramp. I've been able to record video but for some reason I'm missing the audio even with the setting enabled.

DmitryAlexei commented 1 week ago

Routing instructions for this route seem to be correct. The first instruction says Keep right, second - Turn right (see screenshots). Very similar to OSRM or GraphHopper .

alphasierra59 commented 1 week ago

It's similar but still incorrect phrasing. That ramp is an exit and should be called an exit. OSRM and Valhalla both refer to it as a "ramp" or "exit". Graphhopper fails to solve. "Keep right" implies a fork in the road instead of an off ramp from a highway/freeway.

DmitryAlexei commented 1 week ago

Please see OSM route and screenshots below.

It is unclear whether this turn is correctly mapped, and if so, then which of the routing engines announces it correctly.

OsmAnd says Keep right and then - Turn right.

alphasierra59 commented 1 week ago

I reproduced the results from my last round of screenshots by following the link in your reply and selecting the different menu options from the engine selector.

I wonder why we're getting different results from the same inputs?

vshcherb commented 1 week ago

Anyway phrasing should depend on data, there is only motorway and motorway_link in the data, so we will need to check whether in all places route from motorway to motorway_link is correct to be phrased as "take a ramp" / "take an exit"

vshcherb commented 1 week ago

CC @sonora

jarek commented 1 week ago

Anyway phrasing should depend on data, there is only motorway and motorway_link in the data, so we will need to check whether in all places route from motorway to motorway_link is correct to be phrased as "take a ramp" / "take an exit"

This issue is about roads that aren't motorways that also have features that we would like to have announced as "exit" or "ramp".

E.g. https://www.openstreetmap.org/node/495598206 linked upthread in https://github.com/osmandapp/OsmAnd/issues/21296#issuecomment-2468832439 which the OsmAnd instructions https://osmand.net/map/navigate/?start=43.990513,-78.612932&end=43.993817,-78.608169&profile=car#17/43.99217/-78.61295 say "Turn slightly right (C|C|+TSLR) onto Concession Road 6 and go 0.4 km" but would be better to say "take exit towards Concession Road 6"

Or https://www.openstreetmap.org/node/50649004 for the route used in the first comment

sonora commented 1 week ago

Several issues from my recollection, but need checking/verifying by QA:

  1. From my recollection OsmAnd identifies motorway exits as tagged using the node+way best practice per https://wiki.openstreetmap.org/wiki/Exit_Info. I am not sure we include trunk ramps (https://wiki.openstreetmap.org/wiki/Tag:highway%3Dtrunk_link) as exit identifier.
  2. It seems that the app under Route>Details>Turn-by-turn summary states no explicit 'exit' but coins them as slight turns. Not a big functional issue, but it makes researching if OsmAnd identifies something as an exit a little hard.
  3. At least some, perhaps all, voices we have do not seem to mention 'exit' in their first, far-out preannouncement (perhaps for brevity). Only on closer approach do I hear prompts like "Turn slightly right onto exit 33 towards...". (Something easy to fix where desired.)
  4. We have no dedicated arrow symbol for an exit in our navigation widget (something like a straight-up line with a forking arrow). Instead, all exit turns use the regular 'slight turn' symbol.
vshcherb commented 1 week ago

We could try to find "exit" node and propagate to voice engine + route description, so that will be taken as identifier for an exit. As you mentionned we already speak out exit number, so it might be just voice refactoring Indeed motorway_link could be a fork of motorways so it'sn ot guaranteed.

alphasierra59 commented 1 week ago

We could try to find "exit" node and propagate to voice engine + route description, so that will be taken as identifier for an exit. As you mentionned we already speak out exit number, so it might be just voice refactoring Indeed motorway_link could be a fork of motorways so it'sn ot guaranteed.

Also worth noting not all exits have numbers. The exits on State Route 9 aren't numbered. In the map the destination is specified but the ref is left blank.

vshcherb commented 4 days ago

Indeed it's not easy to understand whether it's an exit or fork only by tags from https://www.openstreetmap.org/way/6121779#map=18/47.914109/-122.108496

sonora commented 3 days ago

Indeed it's not easy to understand whether it's an exit or fork only by tags from https://www.openstreetmap.org/way/6121779#map=18/47.914109/-122.108496

After some research, it looks to me like a node tagged highway=motorway_junction may be the only reliable tag to look out for (also on trunk roads). And very likely we already do that?

vshcherb commented 2 days ago

Yes we already do this if we know exit number. Though it looks like if it's empty name then we don't go to the voice command take_exit however we could with empty name. Though in this situation we anyway don't have the tag

if (exitInfo != null && !Algorithms.isEmpty(exitInfo.getRef()) && settings.SPEAK_EXIT_NUMBER_NAMES.get()) {
if (((BinaryMapRouteReaderAdapter.RouteTypeRule)this.region.routeEncodingRules.get(point[j])).getValue().equals("motorway_junction")) {
sonora commented 1 day ago

!Algorithms.isEmpty(exitInfo.getRef() may be a false restriction here ... at first sight it seems possible we simple speak "...take the exit" when we see the exit node but have no reference?