-
Notifications
You must be signed in to change notification settings - Fork 327
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
Routing miscalculates the ShortestPath when one border has zero length #58
Comments
yea that's what I have done. I just ask them if it should be an issue or not |
Hm, that looks like a bug. I'll try to find the time to look into it this week. Thanks for reporting! |
This is probably due to miscalculation of the orientation of boundaries.
|
That shouldn't be the reason. This function checks which of the two linestrings of the lanelet has nonzero length and uses that for the signed distance calculation to the other boundary. There is even a unittest that covers this case. This kind of problem should also be visible in the debug routing graph. But you are right in that it is most probably related to the problem that it is hard to determine neighborhood relationships for linestrings with zero length. Its not impossible, but hard to get right. |
Are you referring to this line?
What it is checking is the size of the linestring, not the length. |
I see. Linestrings that have duplicated points are not allowed in general. There are too many algorithms (also in boost::geometry) that rely on this. We should update or docs to reflect that. Linestings that have one single point are allowed however. |
@amastrobera can you confirm that this problem is solved by using a single-point-linestring? I tried to reproduce your issue and with my test cases everything worked fine with them. |
@poggenhans yes I tried it just now. LineString3d of 1 point for border makes the path planning work. |
Ok, thanks for checking. We have updated the doc and added a new validator to |
How do you generate a "single-node"-way in josm? |
Afaik, its not possible directly within JOSM. If you remove the second-last node from a way, the way will be deleted as well. But at least JOSM will not remove existing single node ways from loaded OSM files. To create one, you would have to create it directly within lanelet2 or modify the osm file by hand. |
Dear FZI,
I have cases where a lanelet is a junction lane. Say we are turning right at a junction. Right border is just one point (or a line with two equal points), while left border is a curve. In those cases the
lanelet2.routing.RoutingGraph.shortestPath()
does not take that lane into account, and calculates the path passing by other roads.This case is very frequent (for junctions or corner roads). Can this be fixed ?
The text was updated successfully, but these errors were encountered: