-
Notifications
You must be signed in to change notification settings - Fork 113
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
BRouter U-turn command missing. #436
Comments
I am not so sure u-turn instructions are the solutions for this problem. The Via point is about 1 meter from the wanted route and I would think that by the default setting of turnInstructionCatchingRange=40 (meter) this 1 meter detour would be ignored completely and the only turn instruction should be "Turn left". So there is a bug, I can recreate the bug using OsmAnd turn instructions, it gives Turn Right and 85 degrees, that is clearly incorrect. I tried also with turnInstructionCatchingRange=0 but then I still get only only one instruction this time Keep Right with 0 degrees also clearly wrong. Looking at this issue this way is also linked to what was discussed in #332 |
Keeping to the right if it was indeed preceded by the U-turn, how strangely close this may be is always correct and clear. What the U-turn, so close to the next Right instruction shows you as such, is that the planning edit has to be adjusted here. A Clear and simple msg. Point the finger so to the planner operator. The simplification problem by turnInstructionCatchingRange=40 (meter) was also presented here. And it also does not solve the badly planner points positioning problematic nor does it discourage such bad planning practices. Good planning practice should so encourage: Do NOT (never) click to near to the road junctions. Example You can see how unexpectedly something like this can happen in the following example. In the discussed format, instructions in the track points, this could look like this in the exported track file. Delligsen_rte__trk_navtrkpt_U-turn.gpx.txt In this file find both the gpx (rte) route with the routepoints and the resulting (trk) track with the instructions in track points. Allow me to ask myself whether the turnInstructionCatchingRange simplification does not sometimes create more problems than it helps. If too dubious turn instructions are generated by a not-so-decent simplification tool, removing this may be the better option. |
Probably also related regarding the wrong turn instruction near/at junction: #282 |
Yes, agreed the turnInstructionCatchingRange does not what it is supposed to do. Looking at the details and past experience I think one possible solution here is to extend the algorithm that snaps the via point to the line structure to check if there is a crossing nearby and if so, snap to that instead of the point closest on the way. This will also be good for other purposes. I added some debug code to VoiceHintProcessor.java and that reveals the likely problem: The voice instructions are generated in two steps, first from to to via1 and then from via1 to to That can explain a big part of the strange behavior I think and is not what is wanted I think. |
We have a turnInstructionCatchingRange problem, yes. I'm with @polyscias some thing with an additional snap logic seems to be a good idea. When you have short view on this . It is off a catching range. But it shows the voicehint problem. All gpx exports with voicehints as wpts meets the turn point 13.766777,51.061312 twice, on the way to u-turn point and back to river. Only the second one is valid. Please try the index based export 'comment-style' or json export - BRouter calculates it well. For more turnInstructionCatchingRange discussion please see #375 Coming back to start: U-turn command missing |
The U-turn command request. Anyway sometimes, although rarely used, you want to plan something with a U-turn indeed. How to use the U-turn info as a nice error indicator? Demo by an example file with (rtept) route points and a track displayed as an overlay. Check and compare the results against the track template. In a Kurviger export the gpx (rtept) routepoints are marked with the tag "type" Shaping. (To know: Kurviger uses own .kurviger files (.json variant) to transfer navigation tracks) Then look for the U-turns in the turnpoint list. Clicking on them will take you to the suspected wrong locations. Some other Shaping Points are also critically close to road junctions but not in a position to cause turn errors. Translated with www.DeepL.com/Translator (free version) |
On the snapping logic, and far as I understand it now, the problem is only there only for via points and if there is a crossing nearby, no problem when there is only a way. A workable solution is I think to look for a crossing that is within say 10 meter and it is present, take it. If the waypoint is further away from a line, take the normal perpendicular line and check if along the way within 10 meter a crossing is and if so, that that. The "10" meter could maybe be the same numbers as the turnInstructionCatchingRange The other problem that should be solved I think before further improvements is not to have the voice instructions for routes with via points not generated in a step per segment, i.e. first from to to via1 and then from via1 to to. Instead the voice instructions should be calculated for the whole track in one go. |
Difficult subject. When converting from "track to route", automatic planner points are placed. Depending on the 'fuziness' choice, many or few. Here, too, track glitches sometimes occur. Pointing out suspicious planner points by means of U-turn alerts can also be helpful here. What route planners should try to enforce is that sound and correct planning is done. A demo example. U-turn alert example: The Shaping Point 44 triggers a U-turn. In the last picture the original route Shaping routepoint position is snapped to the track into a trackpoint type Shaping. Both trigger Planner Point Shaping and U-turn do share the exact same trackpoint location. Even with a lot of planning experience, working too fast can sometimes lead to unexpected results. |
My name on this problem is 'avoid peaks'. This means not to have a view on only one point. A 'peak' can have more points. I have a workaround on that, but I can't 'deliver' now - or the next days, hope on next week.
I agree that. It could be saved several of the discussed problems. This is on agenda as well as other ideas. |
@afischerdev
Or import in Locus direct by the .zip (do not unzip) |
I think this would break a basic principle of consistent results between routing individual segments and the whole route, which is what brouter-web relies on, don't know about other clients. Don't know about all the implications and pros and cons, and might be Ok for just voice hints, but such a potentially breaking change should be given some consideration. |
@nrenner As far as I know the web client connects segment by segment. This will work as normal, only with more then two points in lonlats new function is active. |
The simple request is: Please generate the (180°) U-turn command. |
The upcoming brouter-web release switches export from re-requesting the whole route with all points to concatenating client-side segments, so it won't be affected but also won't benefit from those changes. And results would then be different from the app, which isn't ideal. But I will open a separate issue for that discussion.
Core results from app/engine and web should be consistent.
Currently the router processes each segment between two route points separately, and I guess this is on purpose, so it can't detect those U-turns. Changing that to looking at the whole route would be a fundamental breaking change that might have unintended consequences, so I think it needs to be discussed and well-considered. |
I had been saying so few years ago, but I had not been listened much. I am glad somebody else says it. |
@nrenner Hello Norbert. The Kurviger app now indeed uses the (GH) engine U-turn signal to its full potential. Also if apps, when driving wrong, by auto recalculation, it would also be useful to get the U-turn command instead of that very misleading (180°) straight ahead. Commercial (car) GPS systems will sure of course ask you to turn around, and if you still drive on, than an alternative proposal follows. With Locus_Brouter this alternative design comes after the second autorecalculation. Method proposal triggered by @poutnikl in Locus. @poutnikl Hello Libor. |
@0709wiwiwi To clarify, I had no problem with that myself, as I understood there was a Brouter backend layer and the (web/android) application frontend layer and how they (may) approach routes and route segments. Personally, I am not so much lately interested in the web application, preferring LocusMap route planner. BTW, thanks for your thorough end user testing and reporting. Good work. |
@poutnikl |
Yes, I think so. @nrenner I had a look on your wiki 'segments vs. full route'.
And we have some bothering routing instructions through single segment requests. Is that the reason why we don't see voice hints on web client? |
Now I can publish a work around. You find it on afischerdev/avoid-peaks There are some new rules:
This can not be tested with web client so here are some wget samples:
turnInstructionMode == 1 is now reachable in export and contains voicehints information on trackpoint. avoidPeaks should be found in the editable part of the profiles. So user can play around with it. This is not ready and needs a carefully test. |
You can see how you sometimes unexpectedly produce those very annoying trackglitches in the sample video here. I produced a similar short design based on that demo video: https://t.ly/4LZF This is a short track, you hardly will notice trackglitches on longer tracks with a zoomed out map. |
For the blocker 'no height on bridge' (e.g. #70) I added the tunnel version announced here and merged it into the avoid-peaks branch. |
@0709wiwiwi With this you can switch between direct lines or not in server and you get this results (Locus new export with reduced name tag, you asked for in #332): testtrack0.avoid-peaks.gpx.txt At the moment only available for the server variante, Android will follow. |
@afischerdev By the way I can't of course not forbid anyone to use the name tag though. What I don't see in the export gpx trackfile yet are the "snapped" planner trackpoint positions. I estimate that about 90% of the points in a design are shaping points, i.e. planner points without announcement in the navigation. However, shaping points are just as valid reference position points for the (re)planner and for the auto (re)routing in the navigation as the announced Via points. (= Kurviger implementation and style use by the type tag) Locus map actual already uses these positions as reusable Via points. See a question about the possible recovery of the planning Via points (Shaping) in a gpx track file. Thank you anyway for your enthusiasm and fast development progress. |
I have thought a bit more about the new "avoid¨Peak" tool which you propose and introduces.
What would you think of the following ?
"A Via Point is simply a promoted Shaping Point." If you accidentally produce a U-turn due to a (too) quickly and carelessly placed Shaping Point, the avoidPeaks tool will intervene according to the profile setting. |
How to promote route points to Via points without extra button in the BRouter web GUI ? Nice to have extra's. |
Good idea, I think this could work. |
Yes, this Via trackpoint import works fine as expected in Locus. Start & End Via trackpoints automatically with 'name' are with 'type' Via. I try to preserve the simple Brouter operation in this way. With gpx editor or Notepad++ you can always change the 'type' freely. |
I am curious about the effectiveness of the "avoid Peak tool. Note. Good to know. Calculation with the Cruiser_Brouter_app using that route file is very smooth, but produces that "peak" (track glitch) at km22. |
I've changed this.
Yes, I can confirm the peak is inside 30 meters and removed. |
Excellent message. U-turns. The difference.
Following examples are to be generated by the Profile Car (fast) ! Note.
BRouter Locus rtepointAction.
Information. (compare). _GraphHopper generates all 3 U-turn versions.
|
Why that strange "U-turn_right" ? (Very rare on EU mainland). |
The reason for this is simple, there is no extra u-turn, only left or right. And on this we share the source with OsmAnd - please see TurnType. For now I have rearranged the turn tags and add a u_turn simple. We need more input from other client projects to fill in a 180 degree turn. And another sample: testtrack0.u-turn-left.gpx.txt But allow a left, right without merging. |
GH web result with U-turn here. A remarkable difference between the track export by GH and BRouter. The U-turns by Brouter are perfect 180° returns. (No 179, no 181). The difference with this new implementation is that you detect AND heal automatically. I find this ultimately more convenient and faster than just the 'marking' in Locus map. I'm not an osmand user, but I do notice in their forums that this problem is also a frequent occurrence there. To avoid trackglitches, however, you need to notice them first. Imo generating (180°) specific U-turns and paying attention to the undesired ones also would lead to a more optimal track production in the osmand app. |
"avoid-peaks". I did read the comment of @zod Suggested is a tool to avoid the creation of "trackglitches". [NL] https://www.javawa.nl/unglitcher.html. [NL] https://help.routeyou.com/nl/topic/view/37/track |
Video demo: https://youtu.be/rIirfld57lc Neu-Isenburg_trk_original_rte_shaping_by_type.gpx.txt A navigation track result for a direct import into the Locus app. Ready to navigate. |
That's the performance and user experience we're competing with. The very long route might be an exaggeration to make a point, but there is also a noticable difference between fluent and laggy for shorter routes. And we do have requests to support multi-day trips, so users do or would use BRouter for that. |
Manually scanning the list of turn instructions for u-turns, as a possible hint for glitches, isn't an ideal solution in my opinion. Missing u-turn instructions are not the problem here. The problem are unintended back and forth detours (peaks/glitches/spikes) that go unnoticed by the user. From a client-side perspective, the most obvious solution for me would be to warn the user about such a peak right at the moment it occurs, e.g. by placing a warnig sign in the via marker. The user can then manually check and fix the problem while editing the route and before exporting. Very much like your "alert signal" proposal above: The client should be able to detect such peaks when two neighbouring segments are joined by more than one common track point. No u-turn voice hints needed for that. |
I cannot imagine I would plan a multiday trip or expedition without viapoints/Shapepoints, at least for important POIs or camps(whatever is meant by that). And more probably, I would make separated daily routes. GH performance comparison is imho an underbelt hit, as GH uses AFAIK Contraction hierarchies , an algorithm specialized for long distances, using intensively preprocessed data, what OTOH limits it's end user adaptability. |
Thank you for watching Norbert. Concerning
|
The idea was to maybe implement something similar in BRouter-Web. Your comment above sounds like the BRouter-Web client isn't involved at all - do you actually use that? Just trying to understand the use cases and what that all means for BRouter-Web, and if we have a theoretical or practial consistency issue here. |
I guess sometimes that, without careful reading, it may be questionable if a particular issue or topic belongs to abrensch/brouter or nrenner/brouter-web. |
Right. This entry was moved (advised) from Brouter web nrenner to BRouter abrensch. BRouter Generator. BRouter web planner. App planner(s). Locus and Cruiser and other. |
Current: BRouter (web) does not generate U-turns.
Desired: Brouter (web) generates U-turns.
Generating U-turns (180° track returns) is very valuable. By generating U-turns you can avoid unclear or false turn indications.
Especially when navigating with "display off" and with TTS audio indication mainly, U-turns can prevent very serious wrong turn instructions. How the confusion can arise without those U-turns can be found in the link to the google BRouter discussion group.
Pse find the details here:
https://groups.google.com/g/osm-android-bikerouting/c/-ljF8nqbFZc/m/4CjP2PQ7AAAJ
The text was updated successfully, but these errors were encountered: