Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Exit left" / "Exit right" instructions #734

Open
devemux86 opened this issue Sep 17, 2024 · 18 comments
Open

"Exit left" / "Exit right" instructions #734

devemux86 opened this issue Sep 17, 2024 · 18 comments
Milestone

Comments

@devemux86
Copy link
Contributor

devemux86 commented Sep 17, 2024

Looking at the available turn instructions in VoiceHint, we do not have "Exit left" and "Exit right" instructions.

They are very useful when we exit motorways. Now they are replaced by turn (slight) left / right instructions.

@afischerdev
Copy link
Collaborator

These would be very specific instructions, but they are indeed clearer
I made a first test. Just replace keep left/right with exit left/right on leaving motorways.
Something like this:
exit_right

testtrack0.2.gpx.txt

The problem will be the clients and their handling of the instructions.
In the test I changed all 'exit left/right' back to 'keep left/right' to be conform with the clients.
But I guess that is not what you want.

@devemux86
Copy link
Contributor Author

@afischerdev thanks for the example.

I do not understand what you mean with the change back?

GPX nav trk format has the advantage that is declares the instructions as strings.
Clients that already support exit instructions (like Cruiser) can use it immediately.

Nevertheless, "Exit left / right" are 2 new instructions.
So we will need new ids in VoiceHint and they must be included in all BRouter response types (like geojson).
Then clients must update their BRouter response parsing to handle the new instructions.

@afischerdev
Copy link
Collaborator

@devemux86

Nevertheless, "Exit left / right" are 2 new instructions.

Yes, that is what I did. And as you see it is working for the Locus export (timode=2). But for all other clients the new tag ER / EL have to go back to KR / KL.

@devemux86
Copy link
Contributor Author

@afischerdev

But for all other clients

Do you mean other turnInstructionMode?

Also are exit instructions available in BRouter test website?

@afischerdev
Copy link
Collaborator

@devemux86

Do you mean other turnInstructionMode?

Yes, and other exports.

Also are exit instructions available in BRouter test website?

Sorry, no. Not at the moment, it was just a quick local test.

@devemux86
Copy link
Contributor Author

devemux86 commented Sep 21, 2024

@afischerdev

and other exports.

Will it be available in all output formats: gpx, geojson, etc.?

@afischerdev
Copy link
Collaborator

@devemux86

Will it be available in all output formats: gpx, geojson, etc.?

If we don't protect them for unexpected result, yes. Please give me some time, I'll make a more usable example.

@afischerdev
Copy link
Collaborator

Now a first version is ready. But before coming out, here a short discussion:

During testing an the simple rule (change from motorway to motorway_link) this example comes up with exit left:

exit

streetview first exit point
streetview second exit point

In my eyes the first point is not an exit, more a connection to next motorway.

And the BRouter database does not contain more info
point 1: highway=motorway_link surface=asphalt maxspeed=80 oneway=yes
point 2: highway=motorway_link maxspeed=100 oneway=yes

@devemux86
Copy link
Contributor Author

@afischerdev

Do you mean that the exits should only be declared in instructions when change road categories?
i.e. change from motorway to motorway_link

@afischerdev
Copy link
Collaborator

@devemux86
It should only be declared on motorway exits.
But the rule goes with change from motorway to motorway_link and so it catches what you see above.
So no idea how to grab that at the moment.

@devemux86
Copy link
Contributor Author

devemux86 commented Sep 25, 2024

@afischerdev

Have you tested this area on other routers like OpenRouteService or Valhalla
to see what instructions they generate there?

@afischerdev
Copy link
Collaborator

@devemux86
Both using keep left, keep right
Only Google brings an exit announcement.

@devemux86
Copy link
Contributor Author

@afischerdev

Both using keep left, keep right

Is it for the motorway_link to motorway_link example?

Because both routers have exit instructions.
Doing routings on motorway exits, they both produce exit instructions.

@afischerdev
Copy link
Collaborator

@devemux86

Is it for the motorway_link to motorway_link example?

Yes, it is. And Graphhopper as well uses keep left/right in this sample.

Because both routers have exit instructions.
Doing routings on motorway exits, they both produce exit instructions.

May be we find an example that contains exit in it.
Think I found one:

look here for BRouter
look here for Valhalla - with exit
look here for ORS - no exit, keep right

However, for BRouter we have no additional data to map an exit.
So it's either everything or nothing - everything is Exit or Keep left/right.

@devemux86
Copy link
Contributor Author

@afischerdev

Graphhopper as well uses keep left/right in this sample.

GraphHopper does not support "exit" instructions (see here).

@devemux86
Copy link
Contributor Author

@afischerdev

Sorry about the OpenRouteService, it does not support "exit" instructions (see here).

@afischerdev
Copy link
Collaborator

I think I found a solution for the 'exit problem' - the future voicehints are checked as well.
So here is a new output with exit Instruction only on last motorway point.
exit_new

@devemux86
Copy link
Contributor Author

@afischerdev Thanks for the PR, it seems to work ok. 👍
(tested json and gpx formats)

I included it into the latest Cruiser for more user testing:

@afischerdev afischerdev added this to the 1.7.8 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants