Skip to content

no_u_turn is ignored #2570

Open
Open

Activity

  1. easbar commented on May 3, 2022

    @easbar
    MemberAuthor

    This is because the global u-turn costs overrule those set in the turn cost storage:

    if (edgeFrom == edgeTo) {
    // note that the u-turn costs overwrite any turn costs set in TurnCostStorage
    tCost = uTurnCosts;

    ... but that does not really make any sense? I think I put this comment there, but only because historically we always did it like this, probably because at one point we had several different 'u-turn' TraversalModes...

  2. Arcturuss commented on Jun 12, 2024

    @Arcturuss

    Any new info or progress on this? Maybe someone could explain how it can be fixed?

  3. easbar commented on Jun 12, 2024

    @easbar
    MemberAuthor

    It is probably only a matter of reading the turn costs from storage and checking if there is a restriction, before returning the default u-turn costs in the code I linked above. This might cause a slow down of the routing though, because the u-turn costs will be read at every node.

  4. easbar commented on Jun 12, 2024

    @easbar
    MemberAuthor

    The tricky question here is probably what should be returned if there is no restriction, because then we still cannot tell if this is a u-turn we rather like to avoid or one that is perfectly fine. To me it seems like it would be much more useful if there was an OSM tag that explicitly marks junctions with reasonable u-turns.

  5. Arcturuss commented on Jun 13, 2024

    @Arcturuss

    what should be returned if there is no restriction

    I'd suggest just returning the default value from the profile if there's no restriction. It will make routing with u-turns usable without waiting for worldwide adoption of the new OSM tag (it can take years lol).

    we still cannot tell if this is a u-turn we rather like to avoid or one that is perfectly fine

    Maybe some configurable country-specific rules could be useful, taking into account road classes, other restrictions (left turn), etc. But that's another question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions