osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

via points should use u-turn

Open emiltin opened this issue 14 years ago • 49 comments

consider this situation

 | a | b | c | d |
 | .  | e |  . | f |
 |  . | g | h | i |

suppose i'm going from a to c, with a via point at e. the shortest would be to do a u-turn after visiting e, so following a,b,e,b,c

instead osrm goes all the way around the loop, following, a,b,e,g,h,i,f,d,e

emiltin avatar Feb 03 '12 19:02 emiltin

U-Turns are disabled by design and only allowed at the end of deadened streets.

DennisOSRM avatar Feb 03 '12 19:02 DennisOSRM

ok. because they're considered a bad thing in general?

emiltin avatar Feb 03 '12 19:02 emiltin

on bike (and certainly on foot) it might make sense to allow u-turns in the speedprofile.

emiltin avatar Feb 03 '12 19:02 emiltin

another option: if turn penalty is implemented, you could just have a (user defined) penalty for u-turns.

emiltin avatar Feb 03 '12 19:02 emiltin

U-Turns at via routes will be added, apart from that U-Turns don't make much sense.

DennisOSRM avatar Feb 04 '12 14:02 DennisOSRM

+1 for u-turns at via points, without it there are crazy routes like this: http://map.project-osrm.org/YP -- instead of u-turning at the traffic lights.

Inego avatar Jul 24 '12 12:07 Inego

+1 for u-turns at via points, otherwise they result in crazy routes like this: http://map.project-osrm.org/YP -- instead of u-turning at the traffic lights.

Be careful with the phrase crazy when your example does not include a via point and this is a correct routing according to the data.

DennisOSRM avatar Jul 24 '12 12:07 DennisOSRM

Oops, sorry. I didn't pay attention to the meaning of "via" in this topic. Anyway, what's wrong with U-turning at the traffic lights in my example if it's allowed by driving rules and makes the shortest route?

Inego avatar Jul 24 '12 12:07 Inego

On 24.07.2012 14:31, Inego wrote:

Oops, sorry. I didn't pay attention to the meaning of "via" in this topic. Anyway, what's wrong with U-turning at the traffic lights in my example if it's allowed by driving rules and makes the shortest route?

One would expect a turning lane or seperated lanes in both directions in reality. As it is right now, U-turns are explicitely forbidden.

DennisOSRM avatar Jul 24 '12 12:07 DennisOSRM

If there was a special node tag explicitly declaring that u-turns are allowed at this node, would you add support for them? Because routing like in my example is very misleading, and drawing two separate lanes with a connection for turning instead of one two-way highway with a node for u-turning is excessive work.

Inego avatar Jul 24 '12 12:07 Inego

"U-Turns are disabled by design and only allowed at the end of deadened streets.": U-turn on several deadened streets could be inadequate: service or small residental streets could be even not long enough to allow the manouvre (although logical appropriate(.

FabC avatar Aug 13 '12 09:08 FabC

As milestone 0.4 is near, please don't forget u-turns are completely legal everywhere in some countries like @stevage stated in issue #729...

ZupoLlask avatar Apr 25 '14 20:04 ZupoLlask

Thanks for the reminder

DennisOSRM avatar Apr 25 '14 20:04 DennisOSRM

What's needed to fix this, ie optionally allow u-turns at via points?

emiltin avatar Jul 04 '14 18:07 emiltin

Sweet-talking me into implementing it next week :-)

DennisOSRM avatar Jul 04 '14 20:07 DennisOSRM

good idea!

emiltin avatar Jul 04 '14 22:07 emiltin

:+1: great!

eleu avatar Jul 07 '14 06:07 eleu

Will you have time to work on it this week?

emiltin avatar Jul 07 '14 15:07 emiltin

any update?

eleu avatar Jul 11 '14 09:07 eleu

@DennisOSRM do you know when / if you get to work on it?

We need it quite soon; therefore we are thinking about implementing it ourselfs. Could you share your plans for implementation, (code) drafts and ideas with us?

eleu avatar Jul 14 '14 14:07 eleu