Bug routing cars where highway=cycleway and bicycle=designated

40 views
Skip to first unread message

ma...@rideamigos.com

unread,
Dec 20, 2021, 1:52:03 PM12/20/21
to OpenTripPlanner Developers
Following Murphy's Law, I spotted what appears to a case of bad routing with OTP while we we giving a product demo.

I'm interested in a second set of eyes  to see if you  possibly reproduce it.

What happened is that a trip plan "mode=CAR" was routed through a bike-only facility where cars are not al. Here's the location, but we've since updated OSM to specify "motor_vehicle=no" there to be even more explicit. Here's the way: it's a bike/walk path connecting two streets:


I believe the root cause may trace back an issue with this patch:


That in turn was a fix for this problem:

OSM Tag Combination "highway=living_street" and "bicycle=designated" prevent Drive routing. #2374

To recap:
   1. There was originally a problem was mode=CAR being routed on ways where "highway=living_street" and "bicycle=designated"
   2. The fix was to allow mode=CAR to be routed where ""highway=living_street" and "bicycle=designated"
  3. What we observed this week is now kind an inverse problem-- we are seeing mode=CAR routed on ways where "highway=cycleway" and "bicycle=desginated".

I observed this with 1.x, but I found the parallel file for routing rules in 2.x and it appears to have the same structure.

Here's a direct to the file for 2.x:

From reading the last patch and the code comment in the file, it appears the current syntax *should* work, because this rule:


props.setProperties("highway=cycleway", StreetTraversalPermission.PEDESTRIAN_AND_BICYCLE,
0.60, 0.60);

Appears first in the file before this rule:

props.setProperties("highway=*;bicycle=designated",
StreetTraversalPermission.ALL, 0.97, 0.97);

But I don't deeply understand this code and I may be missing something.

A second set of eyes would be welcome! To reproduce, you'll need to find an OSM way where "highway=cycleway" and "bicycle=designated" that's not right next to a road  and see if OTP will route a trip across when "mode=CAR".

Thanks!


Leonard Ehrenfried

unread,
Dec 20, 2021, 3:56:18 PM12/20/21
to Opentripplanner Developers
Hi Mark,

I think it's even easier to reproduce this with a unit test.


If you adapt it ever so slightly you can check if your specific tag combination produces the permission you expect.

Perhaps it's also worth pointing out that OTP has a debug view show shows you the permissions on a map. http://docs.opentripplanner.org/en/dev-2.x/Troubleshooting-Routing/

All the best.

--
  Leonard Ehrenfried

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.

ma...@rideamigos.com

unread,
Jun 17, 2022, 8:16:50 PMJun 17
to OpenTripPlanner Developers
Tonight I looked at contributing the unit test.

I checkout the project and tried `make`, but this resulted in an error. 

I scanned the README.md, but didn't see basic build steps in there. 

I checked "CONTRIBUTING.md", but it doesn't mention how to build the project either.

I looked through the "docs" directory, but didn't see a file that looked like it would contain the build commands. 

Somewhere I found a reference to "mvn clean package", so I tried that. It eventually failured with an error that implied my Java was too old. I had jre8. 

I figured out how to upgrade my Java to the latest version and tried again. This time I got an error that implied my Java was too new: "Fatal error compiling: error: release version 17 not supported ". 

I eventually found the Developers Guide http://docs.opentripplanner.org/en/latest/Developers-Guide/, but it doesn't document which Java versions are supported. 

At this point I gave up. 

Leonard Ehrenfried

unread,
Jun 20, 2022, 2:42:42 AMJun 20
to Opentripplanner Developers
Yes, that developer guide needs a bit of updating.

To answer your questions:

The command to run the tests is "mvn test".

The latest dev-2.x branch needs Java 17.

--
  Leonard Ehrenfried


On Sat, 18 Jun 2022, at 02:16, ma...@rideamigos.com wrote:
Tonight I looked at contributing the unit test.

I checkout the proje ct and tried `make`, but this resulted in an error. 
Reply all
Reply to author
Forward
0 new messages