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
Refactoring and bugfixing of profiles #1365
Conversation
- all profiles share a common speed profile, profile_defaults.lua - the profile logic is encapsulated in file logic.lua - all parsing logic is encapsulated in file lib/parser.lua New profiles can easily created by copying profile_car.lua and override the profile_defaults.lua values.
thanks for your patch. Usually, we discuss larger patches like this before in an issue or the mailing list. Please note that a large'ish number of tests fail.Also, a while back, we chose not to use includes in the default car profile. This lead to a myriad of issues from users missing these includes. |
it would be useful if osrm would handle lua includes better. specifically, it should handle symlinks. |
Thought it does follow symlinks as these happen on the filesystem level. Whats the issue? |
hmm it was something with the path parsing that's done in the c++ lua code |
Thanks for your feedback to this patch. Please let me first explain why we have implemented that changes: It was not our aim to undermine any regular process here. We just did, what we thought is useful to get well working profiles easily - which we needed for an application with a strong deadline. Afterwards we thought it might be a good idea to say "thank you" for this project by letting the developers and users benefit from our work. About the compilation error: I assume the reason for that is, that we fixed a typo in the find_access_tag(source,access_tags_hierarchy) method or that we have removed the namespace of this file. However, if this compilation error is the only problem which lasts we are willing to send in a new pull request without that bug to let the community benefit from our work. As mentioned in the pull request, we have not worked on the foot and bicycle profile, since our focus is on motorized vehicles. Thus our default speed-profile is more a default-motorized-vehicle profile. I hope I could explain a bit why we had done it that way and that we did not want annoy somebody. We are no lua experts thus we are not familiar with the mentioned import path problems before. We could not observe any of them. |
it seems there is really two issues here:
|
Can you elaborate on what these bugs are?
This is very much appreciated. Nevertheless, discussing issues beforehand has the advantage of actually knowing details on what has changed and why. |
note also that the PR breaks the bicycle profile, because profiles/lib/access.lua was modified |
about the bugs: node_function:
way_function: especially block If you like I can provide a demo access to our application (via email), where you can test our speed profiles. |
Agree that the penalty function should be reachable within How about addressing each of the issues you have identified by an issue on its own? To move the changes upstream, it's important to unpack the patch bomb into consumable parts. One important point is that the splitting of the profile code into separate files will have repercussions. Judging from previous experiences, there will be a fair amount of tickets opened for missing dependencies. Ideally, we'd like to avoid that dependency chain for the default profile.
sure. |
Regarding the demo: Just register here for free: http://business.inTanken.de Regarding addressing each issue by its own: (As you can see by the time it took until I answered) I do not think that I will find the time to do that, sorry. But of course you can feel free to extract everything useful from our work. What I really like to understand is, what the problem with including other files is: Is there a bug in lua or are the users not able to put all necessary files in the right spot? The files are already in the right spot, only the default profile in your main directory (which I missed to adapt before creating the pull request) might be a problem, but I am not sure, if this profile must be located there anyway. |
Hi Markus, I downloaded your patches for the (base for truck) profiles. Unfortunately I couldn't get it running (it extracts, but no routes whatsoever). In file access.lua I replaced "access_tags_hierarchy" (2x) by "access_tags_hierachy". Would you be so kind to publish your lua files? BTW have you considered ADR, special truck prohibits (road closed for trucks) and maut? Thanks, |
Hey Frank, can you please write an email to my business account mp@incs.org? Then we can have a chat about your request and about adding aspects like ADR (we haven't yet). Thanks, |
Hello, I'm also working on OSRM truck profile. In addition to suitable speed profile for truck, we have implemented the following rules based on osm tags:
For some rules we link lua profile to a postgis database loaded with osm data. I'll be glad to share and discuss this. |
Hi Markus, Willy, Thanks for wanting to share your results. I also created a truck profile (as the maxspeed approach in the car.lua sucks for trucks) but not on a detailed level you guys did. If would be nice to follow Markus approach and try to make the functions shareable/ object oriented. Although his logic.lua is more a motor-vehicle base than a general one. We better can ask @DennisOSRM what is the best way forward. BTW Willy did you also test for hgv=no, hazmat:adr_tunnel_cat? Also very nice, the third item. |
Hello Frank (@frankvandenbergh), sorry for the delayed answer but we - as a company - had to discuss in what manner and in which time effort we may want to participate in an open (source) distribution of routing profiles. Finally we decided that we are willing to share our profiles as long as others share them too and thus all sides benefit from this process. We also discussed where and how to share these profiles. Mainly two ideas come to our mind and we now like to discuss them with you before starting the sharing process:
Please let us know what you think about these options and/or what should be changed to improve these proposals. Also other ideas are pretty welcome. Andreas (@exciler), a colleague of mine, may step into this discussion as well. /Markus |
Conflicts: profiles/car.lua
@mackshot since Dennis is taking a leave from OSRM development, I'm going to jump on this. Why not include them in this repository? How many profiles are are talking about here?
Next steps:
|
Closing here because there was no response. |
New profiles can easily created by copying profile_car.lua and override the profile_defaults.lua values.
We are working on several truck profiles. If you are interested, just let me know.
The foot and bicycle profile stills needs to be adopted (later) to the logic which we suggest here with this pull request.