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

should not fork slight left when road goes straight #2527

Closed
emiltin opened this issue Jun 10, 2016 · 9 comments
Closed

should not fork slight left when road goes straight #2527

emiltin opened this issue Jun 10, 2016 · 9 comments
Labels

Comments

@emiltin
Copy link
Contributor

emiltin commented Jun 10, 2016

osrm emits a fork left instruction when the way continues straight ahead (same bearing before/after).

it should probably suppress the instruction (if the forking road is minor) or tell you to go straight at the fork.

situation:
screen shot 2016-06-10 at 13 51 06

response:

{
  "waypoints": [{
    "location": [12.620201, 55.661265],
    "hint": "HgsAgP___38zBAAAhgAAAPIAAAAAAAAAAAAAAMs9AAAQaQAAVwcAAKmRwADRUlEDqJHAANZSUQMAAAYGwiCf8g==",
    "name": "Øresundsvej"
  }, {
    "location": [12.6194, 55.661196],
    "hint": "fzMAgP___38zBAAAxAAAAAYBAAAAAAAAAAAAAA9pAAAKZQAAVwcAAIiOwACMUlEDiI7AAJBSUQMAAAYGwiCf8g==",
    "name": "Øresundsvej"
  }],
  "routes": [{
    "distance": 50.8,
    "duration": 30.4,
    "legs": [{
      "distance": 50.8,
      "steps": [{
        "distance": 18,
        "duration": 10.8,
        "name": "Øresundsvej",
        "maneuver": {
          "type": "depart",
          "location": [12.620201, 55.661265],
          "bearing_before": 0,
          "bearing_after": 261
        },
        "geometry": "}ivrIg{_lADv@",
        "mode": "pushing bike",
        "intersections": [{
          "location": [12.620201, 55.661265],
          "bearings": [261],
          "entry": [true],
          "out": 0
        }]
      }, {
        "distance": 32.9,
        "duration": 19.6,
        "name": "Øresundsvej",
        "maneuver": {
          "type": "fork",
          "modifier": "slight left",
          "bearing_before": 261,
          "bearing_after": 261,
          "location": [12.619918, 55.661241]
        },
        "geometry": "wivrIoy_lAFfB",
        "mode": "pushing bike",
        "intersections": [{
          "location": [12.619918, 55.661241],
          "bearings": [75, 255, 300],
          "entry": [false, true, true],
          "in": 0,
          "out": 1
        }]
      }, {
        "distance": 0,
        "duration": 0,
        "name": "Øresundsvej",
        "maneuver": {
          "type": "arrive",
          "location": [12.619918, 55.661241],
          "bearing_before": 261,
          "bearing_after": 0
        },
        "geometry": "oivrIgv_lA",
        "mode": "pushing bike",
        "intersections": [{
          "location": [12.6194, 55.661196],
          "bearings": [81],
          "entry": [true],
          "in": 0
        }]
      }],
      "duration": 30.4,
      "summary": "Øresundsvej"
    }],
    "geometry": "}ivrIg{_lADv@FfB"
  }],
  "code": "Ok"
}

using latest from master

@MoKob
Copy link

MoKob commented Jun 10, 2016

Usually forks are analysed for major/minor roads. So far guidance work is targeted at roads only. The addition of the footpath here introduces an unknown priority of roads that is obviously not handled correctly, yet.

This is related to #2113 and is already on the list.

@emiltin
Copy link
Contributor Author

emiltin commented Jun 10, 2016

ok

@MoKob
Copy link

MoKob commented Jun 29, 2016

Just a heads up. The work on guidance decisions in profiles already provides improvements:
screen shot 2016-06-29 at 11 04 42
screen shot 2016-06-29 at 11 04 45

@emiltin
Copy link
Contributor Author

emiltin commented Jun 29, 2016

nice!

@emiltin
Copy link
Contributor Author

emiltin commented Jun 29, 2016

looking at the updated profile i see there's a new function setClassification(highway, result). i'm not sure exactly how this works, but having only the highway tag is probably not going to be enough since routability depends on a number of tags. for example, a highway=runway IS routable if you have car=yes or bicycle=yes.

i'm also wondering about the two directions. for bikes, a way can have different modes for each direction (cycling, pushing_bike) - won't this affect classification/guidance?

@MoKob
Copy link

MoKob commented Jun 29, 2016

@emiltin the setClassification is a default way of how you may choose to handle stuff. You have the possibility to ignore roads (may_be_ignored flag) and you can set road-categories from a set of types.

Since guidance is changing quite a lot at the moment, its kind of hard to describe the implications of different flags/categories. You can have a look at the lib (lib/guidance.lua) to see what is currently set.
For bicycles, you probably want to provide a own way of setting the values using the additional information you mentioned.

Edit: Regarding the two different modes - this is definitely correct and we will have to update our behaviour here at some point. The first goal at this point is to reproduce our current behaviour with the possibility to offer configuration at profile level, not at compile level.
Next steps will have to include additions like different classifications for different directions.

@MoKob
Copy link

MoKob commented Jun 29, 2016

@emiltin I've added some (minor) documentation on the configuration in my PR. Keep in mind that these configurations most likely will have to change when we focus on improving bicycle and walking guidance.
The configuration should already help in improving our responses for cyclist, but (just like you mentioned) some features are still necessary to further improve guidance for non-car navigation.

@emiltin
Copy link
Contributor Author

emiltin commented Jun 29, 2016

alright, thanks

@MoKob
Copy link

MoKob commented Jul 5, 2016

With #2586 reviewed and waiting on merge, this issue is resolved (at merge, of course).

@MoKob MoKob closed this as completed Jul 5, 2016
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

2 participants