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

Road not routable for default bicycle.lua profile, how to adapt lua profile to allow routing here ? #6100

Open
MathiasVersichele opened this issue Aug 17, 2021 · 5 comments

Comments

@MathiasVersichele
Copy link

I'm seeing that the following road doesn't allow routing with the bicycle.lua profile:

https://www.openstreetmap.org/way/23012499

I'm guessing it's related to the "bicycle:conditional" tag ? How can I adapt the lua profile to ignore these temporal restrictions ? Thx!

image

@mjjbell
Copy link
Member

mjjbell commented Aug 18, 2021

Conditional access tags are currently not supported. See #4231 for previous discussion. So the condition is being ignored, but OSRM doesn't process any other tags that grant bicycle access.

If you wanted to handle this in the Lua script, you could update the access hierarchy to include the bicycle:conditional key and then check the access condition value is something you're ok with.

access_tags_hierarchy = Sequence {
'bicycle',
'vehicle',
'access'
},

local access = find_access_tag(node, profile.access_tags_hierarchy)

data.access = find_access_tag(way, profile.access_tags_hierarchy)

@floswald
Copy link

floswald commented Aug 20, 2021

i have a similar question. suppose I live in Milan (italy) and traveling by bike I want to avoid at all costs roads with the tag surface=milanese_paving or surface=cobblestone or surface=cobblestone:flattened like tagged here

Screenshot 2021-08-20 at 10 29 50

is it a terrible hack to just decrease their surface_speed to a very low number here?

surface_speeds = {

thanks

@mjjbell
Copy link
Member

mjjbell commented Aug 29, 2021

I'm not too familiar with the bicycle profile, but it looks like there is an example of making roads with zero speed inaccessible.

if result.forward_speed <= 0 and result.duration <= 0 then
result.forward_mode = mode.inaccessible
end

@KirbyJames
Copy link

image
I've had a similar problem. I've been using OSRM to 'lock' some bicycle GPX tracks to OSM ways. This works fine for the majority of ways - but it fails to match ways labeled as 'trunk' (in the UK).
The image above shows a track locked to the OSM ways except for where it joins the A377 trunk road.
If I use the car.lua file it fits correctly.
I've modified the bicycle.lua file and added entries for 'trunk' which match the existing 'primary' and 'secondary' ones - but OSRM still fails to match the trunk route.
Any idea what I might be doing wrong?

@tombay
Copy link

tombay commented Jun 13, 2024

Hi KirbyJames
with regard to your problem I have a Pull request open (#PR6703) that addresses the "trunk" issue. Some countries allow bicycle access on trunk roads (including GBR). it might be more than you want
#6703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants