-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Pedestrian crossings on boulevards rotated wrong #457
Comments
There are a few things going wrong here. First is related to how sidewalks are mapped in OpenStreetMap -- sometimes as separate ways, sometimes as an attribute of the road ( But even with the current approach of placing a sidewalk on the left/right/both sides of each road segment, the way crosswalks are inferred is very unrealistic. If you imagine rotating either direction around the center of an intersection, every pair of adjacent sidewalks (not counting the ones sharing the same corner) get a crosswalk between them. In situations with split one-way roads like this, this heuristic is quite wrong. So I think dedicating this issue to improving that makes sense. The final issue is mostly cosmetic, although it can incorrectly cause some vehicle turns to look like they conflict with the crosswalk. The crosswalk geometry is always a straight line between the two sidewalk endpoints. Really it should trace along the shape of the intersection and look more like this: All of these problems have existed for a while because I haven't found a straightforward way to fix them. https://github.com/dabreegster/abstreet/blob/master/map_model/src/make/walking_turns.rs is the one place that figures out which sidewalks should be connected with a crosswalk, and calculates their exact geometry. There's a disabled |
You are right. Indeed, the sidewalks are not tagged on OSM. Here is this intersection. Nevertheless, the importer did a good job inferring both sidewalks on the East-West street and only outside sidewalks on the North-South street. I would imagine that having an intersection like
, where S is a sidewalk and X no sidewalk. The crosswalks should be produced connecting only sidewalks with the corresponding direction like
|
I'm not sure I understand the alley problem. No through traffic for anyone? At least with alleys I'm familiar with, there are no legal restrictions preventing a vehicle, cyclist, or pedestrian from going through. There are often physical width constraints that make it highly unlikely two vehicles in opposite directions will attempt to go through at the same time. But from the simulation perspective, any movement should be allowed through, but the routing should strongly prefer to not use alleys. The crosswalk issue is a little different. Pedestrians in A/B Street can only enter the road using crosswalks. It might be reasonable to not generate any crosswalks because of alleys, but then that forces people to walk all the way around the block. There may be some situations where this produces very unrealistically circuitous routes. It might be time to evaluate divorcing the physical presence of crosswalks in the map model from how pedestrians can cross. There are plenty of situations around the US that I'm familiar with where there isn't a crosswalk on all edges of a 4-way junction, but it's still standard for people to cross, after yielding to traffic. Possibly the distinction we ought to model is who has the right of way -- when there's a physical crosswalk present and ideally mapped in OSM, pedestrians, and otherwise, vehicles on the road. |
Sorry, my bad. I did the research, and indeed it is allowed. People just prefer not to do this when there is a lot of traffic. |
Nice @dabreegster! Does this affect traffic flow or just rendering? |
Both. Stop signs on those short segments really do cause a 0.5s pause, which can't be helping our gridlock. And extraneous crosswalks mean worse traffic signal heuristics, and maybe people cutting in front of turning vehicles in an unrealistic way. |
geometry), don't generate crosswalks or stop signs. In reality, these usually represent the middle of a complicatd intersection. Ideally these cases would be merged into a single intersection, but before that's feasible, at least improve some of the inferred things nearby. #457
@dmitriy-serdyuk If you re-import with the latest code, the inner crosswalks from your example should disappear -- er... actually, only if that road happens to be under 2 meters. You could try locally editing |
…the line of the crosswalk. This wasn't true for some degenerate intersections where the turn first crosses part of the sidewalk. #457
It doesn't work very well for my case unfortunately... I had to increase the constant up to 20-30 meters to import this particular intersection. It caused many false positive mergings elsewhere. I want to try the following heuristic. Merge if
|
I've considered explicitly tagging https://wiki.openstreetmap.org/wiki/Proposed_features/junction%3Dintersection in OSM for cases like this, but coming up with the precise rules for this tag is tricky ("so that things render in A/B Street" is of course not a valid definition there), and it often requires splitting the way. I've been tagging https://wiki.openstreetmap.org/wiki/Tag:dual_carriageway%3Dyes in places like this -- it has a very clear definition and is a more widely-used tagged. I'll try your second heuristic with the name matching or |
Furthermore, the intersecting ways on either end should be You can run this detector using https://dabreegster.github.io/abstreet/side_projects/parking_mapper.html and changing the dropdown on the right. I use this tool to look for possible dual carriageways and then manually tag them in OSM. The detection has false positives, so it still requires a human touch, but it finds many cases quickly. |
…roads. Look for roads between dual carriageways. #457
@dmitriy-serdyuk You could try changing the distance thresholds at https://github.com/dabreegster/abstreet/blob/322fb81a9d9cb43392c59de8c6cb6dd1291f19df/map_model/src/make/merge_intersections.rs#L64 and just below. The Also, if you're at least mildly invested in getting Montreal imported and high-quality in abst, I can start regularly importing and maintaining it. Just send the polygon boundary you're using if so. |
I was checking OSM for Montreal. It is quite low quality: number of lanes, parking, restricted left turns, u-turns, speed limits. It will take some effort to fix OSM before exporting something decent. How do you choose which area to export? The city is quite big. |
Definitely. I'm hoping A/B Street can provide motivation to rally OSM communities to mapping those sorts of details. Of course not only abst benefits from this; routing can be more precise, in particular. I personally think tagging for lanes is often low-quality in many areas because it's so hard to visualize the results.
I chop it up into different pieces. Some examples: |
Now regenerate all map data, because the schema changed. Also had to revert part of the last commit to unbreak transit route snapping in Berlin.
I filed #485 to focus on the crosswalk heuristics, btw |
I am trying to import a borough of Montreal currently. It looks like there is a bug for pedestrian crossings on boulevards:
The crossing seems to be rotated 90 degrees. There should be a zebra top right and bottom left and no zebras in the middle.
The text was updated successfully, but these errors were encountered: