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

Stop Signs for Profiles #2652

Open
daniel-j-h opened this issue Jul 13, 2016 · 10 comments
Open

Stop Signs for Profiles #2652

daniel-j-h opened this issue Jul 13, 2016 · 10 comments
Assignees
Labels

Comments

@daniel-j-h
Copy link
Member

Profiles are currently unaware of stop signs.
We want them for better ETAs.

Tagging: highway=stop on nodes.

http://wiki.openstreetmap.org/wiki/Tag:highway%3Dstop
http://taginfo.openstreetmap.org/tags/highway=stop

@1ec5
Copy link
Member

1ec5 commented Jul 13, 2016

The wiki page makes its tagging recommendation sound authoritative, but how prevalent are tags such as priority_road in places like North America, where the concept of a priority road has no formal/legal status and would not be signposted as such? In my armchair-mapping travels in the U.S., I've seen three tagging styles that closely parallel tagging for traffic signals, and usage for each is much less common than for traffic signals:

  1. highway=stop on the intersection node, even for non-all-way stops
  2. Less commonly, highway=stop on each approach
  3. Just as commonly as 2, a stop relation

Hopefully my observations are an outlier and approach 2 is the most common generally.

@MoKob
Copy link

MoKob commented Aug 30, 2016

From discussion on traffic signals (#2758 (comment)), stop-signs cannot be modelled just like traffic signals since stop-signs give a precedence to one way while penalising another. The same can be said to some extend for traffic signals -- the phases are not necessarily of the same duration -- but nothing we have currently in our scope.

The issue here is: we need to assign the stop-sign only to a specific way direction.

@danpat
Copy link
Member

danpat commented Sep 2, 2016

In the last couple of days, I've been doing a bunch of test driving with a high-resolution GPS and looking to improve the Lua turn_function.

One thing is fairly clear from the data - whether you need to stop or not makes a big difference in the turn cost.

Right-hand turn that required a stop (this intersection has a stop sign for traffic heading west, north-south is a 'priority road' with no stopping required):
screen shot 2016-09-02 at 12 34 35 am

Right-hand turn that required no stop:
screen shot 2016-09-02 at 12 31 32 am

Across all the data, there was a roughtly 2-3 second additional penalty for a turn that requires a stop. Turns without stops fall into the 2-4 second range, turns with stops fall into the 4-8 second range. This seems significant enough that I think we want to support this where tags are available.

My current thinking is that we need to pass more data to the turn_function, for example:

function turn_function(angle, approach_speed, exit_speed, turn_radius, stop_required, has_signals)

This would allow the turn function to include all the factors (that I can see) are relevant to estimating the average turn penalty.

We don't have all of this data available where the turn_function is called yet, so there's work to be done. #2822 adds approach_speed and exit_speed, but based on my testing, there are more factors than that.

@MoKob MoKob added this to the 5.6.0 milestone Sep 22, 2016
@TheMarex TheMarex modified the milestones: 5.7.0, 5.6.0 Jan 28, 2017
@TheMarex TheMarex removed this from the 5.7.0 milestone Mar 20, 2017
@chaupow chaupow self-assigned this Jan 17, 2018
@chaupow
Copy link
Member

chaupow commented Jan 24, 2018

Picking this up again. Steps

  • add a bool is_stop to ExtractionTurn which is exposed to lua in process_turn
  • set is_stop = true to the turn at the end of a way that has a highway=stop node
  • set is_stop = true to turns at an intersection that is tagged highway=stop
    • if stop=all
    • if stop=minor and coming from a minor road
    • if turn is not coming from a highway=priority

open question: not sure stop=minor should be considered but I do not think so.

edit: tracking implementation in this PR #4828

@1ec5
Copy link
Member

1ec5 commented Jan 25, 2018

open question: not sure stop=minor should be considered but I do not think so.

It depends on whether the step encounters this node while traversing a minor road. For example, if the stop node is at the intersection of a highway=residential and a highway=tertiary, the stop node should be penalized when passing through the intersection on the residential road but not when passing through it on the tertiary road.

@emiltin
Copy link
Contributor

emiltin commented Jan 25, 2018

is highway=give_way handled? https://wiki.openstreetmap.org/wiki/Tag:highway%3Dgive_way

@chaupow
Copy link
Member

chaupow commented Jan 25, 2018

is highway=give_way handled? https://wiki.openstreetmap.org/wiki/Tag:highway%3Dgive_way

not yet. there is an issue about priority roads and give ways: #3003

Depending on how big the changes are & how long it takes I might handle priority roads and give ways in the same PR and roll out all at once. If it takes too long, I might just break it into another PR :)

But it's on the list!

It depends on whether the step encounters this node while traversing a minor road. For example, if the stop node is at the intersection of a highway=residential and a highway=tertiary, the stop node should be penalized when passing through the intersection on the residential road but not when passing through it on the tertiary road.

Wow. So in that case, tertiary would not have to stop? I was so naive thinking that you don't have to stop when on priority but if that is the case, I need to consider stop=minor too.

Follow-up question @1ec5 If the same intersection would not have stop=minor, is it an all-way stop? I only need to check for minor roads if stop=minor, right?

@1ec5
Copy link
Member

1ec5 commented Jan 25, 2018

The most common ways to map highway=stop are:

  1. intersection

    At the intersection, tagged stop=minor for a 2-way stop that only applies to the lesser road – in this case, the residential road. For an all-way stop, use stop=all.

  2. stoplines

    At each stopline, tagged direction=forward, direction=backward, or direction=both, depending on the way’s direction. At a 2-way stop, there are two stoplines; at an all-way stop, there are three or more stoplines.

@chaupow
Copy link
Member

chaupow commented Jan 26, 2018

These are the priority classes I will use to identify whether stop=minor applies or not:

const constexpr Enum MOTORWAY            = 0;
const constexpr Enum TRUNK               = 2;
const constexpr Enum PRIMARY             = 4;
const constexpr Enum SECONDARY           = 6;
const constexpr Enum TERTIARY            = 8;
const constexpr Enum MAIN_RESIDENTIAL    = 10;
const constexpr Enum SIDE_RESIDENTIAL    = 11;
const constexpr Enum LINK_ROAD           = 14;
const constexpr Enum BIKE_PATH           = 16;
const constexpr Enum FOOT_PATH           = 18;
const constexpr Enum CONNECTIVITY        = 31;

These do not align 1:1 to osm tags, but almost.

Copy link

github-actions bot commented Jul 8, 2024

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Jul 8, 2024
@1ec5 1ec5 removed the Stale label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants