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
Blind user mode. #3694
Blind user mode. #3694
Conversation
Special optional mode implemented in Valhalla for use in Seeing Assistant applications from @transition-technologies: - Announcing crossed streets, the stairs, bridges, tunnels, gates and bollards, which need to be passed on route. - Information about traffic signals on crosswalks. - Route numbers not announced for named routes. - Added blind_user_mode switch in query parameters.
This is awesome I'll take a look at it more closely tonight most likely |
@grzezlo would there be any chance you could update your branch to get the latest master merged in? i know its been a long time but i'm hoping you'd still be interested in merging this |
No problem, @kevinkreiser, merged. |
I'm just looking at this again after a long time. Sorry for the wait @grzezlo I could fully understand if you moved on by now. I'd still be super interested to merge this and I know @kevinkreiser as well. So I'd help out on this if you'd prefer that. One thing I'm wondering: how about including the OSM tag |
proto/options.proto
Outdated
@@ -482,4 +482,5 @@ message Options { | |||
uint32 matrix_locations = 54; // a one to many or many to one time distance matrix. Does not affect | |||
} // sources_to_targets when either sources or targets has more than 1 location | |||
// or when CostMatrix is the selected matrix mode. | |||
bool blind_user_mode = 81; // route: additional maneuvers and informations for blind users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just looking at "vehicle types" and realized we already have smth you want in our request parameters, however, not documented. In PBF we have transport_type
which is being set by either bicycle_type
request param or type
for all other modes, also pedestrian (not documented). Maybe we should use that instead of this boolean? Then we can make it a TravelType
which will make more sense once we get to implement tactile_paving
in costing. Let me know if you need some code pointers. What do you think @grzezlo ?
Thanks @nilsnolde for your comments and first of all for interest in the subject. Sorry for my late answer. In fact I moved to other projects, but Valhalla is still interesting for me and used as a routing engine in our app. |
Thanks for your good thoughts here @grzezlo ! It's again a while gone that I said I'll look into it more. It's far down the PR list by now, I guess it's not as much hitting my attention, I'll try to change that, I really want this functionality. Is it ok for you if I commit to your branch instead of reviewing? I mean both in the end of course, but maybe that'd be more efficient? |
i felt the same way about this but again didnt find anyy time. unless @grzezlo has time to also work on it, i would suggest you make a new branch from master and then merge @grzezlo's branch into that. that way you can let his branch unchanged and have all your work in a place you can more easily commit to |
@nilsnolde modyfying this branch is ok for me, in such scenario all work on it will be in one place. |
66b5116
to
b832779
Compare
I have picked this up again, and apart from resolving merge conflicts, I did two things:
Having it as a costing option while not actually impacting the costing at all is a bit misleading maybe, but @nilsnolde pointed out that also modifying the costing could be a good addition to this in the future.
Update: reversed parsing of nodes tagged |
src/odin/maneuversbuilder.cc
Outdated
: options_(options), trip_path_(etp), | ||
blind_mode_(options.costing_type() == Costing_Type_pedestrian && | ||
options.costings().find(Costing::pedestrian)->second.options().transport_type() == | ||
"blind") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so to look a bit more like the other types we should:
over in pedestriancost.cc we parse out kFook and kWheelchair, we should add kBlind
then in triplegbuilder we call on a trip edge set_pedestrian_type which stores this type on the edges of the path so we'll need to update the proto with that blind value as well (trip edge is a proto struct)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also add std::to_lower
in costing for parsing to be a little more lenient
src/mjolnir/pbfgraphparser.cc
Outdated
} else if (tag.first == "highway") { | ||
n.set_traffic_signal(tag.second == "traffic_signals"); | ||
n.set_traffic_signal(n.traffic_signal() || tag.second == "traffic_signals"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has the potential to make the alogrithm think that we have to stop multiple times in a row in quick succession when a car traffic light and a cross walk light are next to each other. we might want to move pedestrian crossing to be a new node type or use the spare bit on node
src/odin/maneuversbuilder.cc
Outdated
@@ -278,7 +281,33 @@ std::list<Maneuver> ManeuversBuilder::Produce() { | |||
std::string(" | left_similar_traversable_outbound =") + | |||
std::to_string(xedge_counts.left_similar_traversable_outbound)); | |||
#endif | |||
|
|||
if (blind_mode_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we add more braces here, i know i never ask for that but in this case wrap the switch
valhalla/odin/narrative_dictionary.h
Outdated
@@ -134,6 +144,7 @@ constexpr auto kCrossStreetNamesTag = "<CROSS_STREET_NAMES>"; | |||
constexpr auto kRoundaboutExitStreetNamesTag = "<ROUNDABOUT_EXIT_STREET_NAMES>"; | |||
constexpr auto kRoundaboutExitBeginStreetNamesTag = "<ROUNDABOUT_EXIT_BEGIN_STREET_NAMES>"; | |||
constexpr auto kRampExitNumbersVisualTag = "<EXIT_NUMBERS>"; | |||
constexpr auto kObjectLabelTag = "<object_label>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upper case
After some review rounds now, the only big question remaining is how to enable announcements for passing pedestrian traffic signals without messing with |
…lind-mode-resolve-conflicts
is there anything left to do here? from my point of view we covered most of it and since we reverted the graphparser change we can merge now and come back to the whole crosswalk (traffic_signals) thing as a separate issue |
From my side this is all set. In the last CI run, the tests I added failed only in the build release (and I wasn't able to reproduce it locally). Just merged master, so let's see if this was a hick up of some sort |
Okay, seems like I have to have another look at those tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you so much @grzezlo for startign this and @chrstnbwnkl for bringing it over the line!
Hi I am getting this exception when making a route call Any possibility above merged code requires changes for graph tile generation ? |
from what I can see that key is in all 29 published locales, so your problem seems to be that you're again not really on master. updating locales for odin is done during building the library, which will write them from locales/*.json to a public header in and as a general rule, unless we bump the major version, we never require new tile builds for any new commits.. |
are you sure you're really re-compiling valhalla when you pull (vs just installing new headers..)? |
@nilsnolde thank you for the comment. I have a custom locale which is missing the "pass". I am not aware of this to be added and I now understand the meaning of the exception. |
Well we don’t expect people to bring their own locales tbh. I’d recommend to consider adding it to transifex. If it’s > 95% translated we’ll add it to the repo and this sort of thing can’t happen. |
Special optional mode implemented in Valhalla turn-by-turn, for use in Seeing Assistant applications from @transition-technologies:
No idea how to write the tests, also where to announce this new feature in
CHANGELOG.md
(maybe underADDED: Indoor routing
near line 84?)Added processing of crossing=traffic_signals in
mjolnir/pbfgraphparser.c
, so updated `taginfo.json' too.Issue
fixes #2989
Tasklist
Requirements / Relations
No special requirements.