Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.29k stars 3.32k forks source link

Could not find any metrics for CH in the data. Did you load the right dataset? #5411

Closed pig2018 closed 1 month ago

pig2018 commented 5 years ago

My machine is window 7,the software is osrm-backend-5.22.0-customsnapping.3. The execution script is as follows: `D:\opensource_C++\osrm-backend-5.22.0-customsnapping.3\build\Release>osrm-routed

--algorithm=CH china-latest.osrm [info] starting up engines, v5.22.0[0m [info] Threads: 4[0m [info] IP address: 0.0.0.0[0m [info] IP port: 5000[0m [31m[error] [exception] Could not find any metrics for CH in the data. Did you load the right dataset?[0m but I useosrm-routed --algorithm=MLD china-latest.osrmis right. The execution script is as follows: D:\opensource_C++\osrm-backend-5.22.0-customsnapping.3\build\Release>osrm-routed --algorithm=MLD china-latest.osrm [info] starting up engines, v5.22.0 [info] Threads: 4 [info] IP address: 0.0.0.0 [info] IP port: 5000 [info] http 1.1 compression handled by zlib version 1.2.8 [info] Listening on: 0.0.0.0:5000 [info] running and waiting for requests`

pig2018 commented 5 years ago

When I execute the following script:osrm-contra ct china-latest.osrm ,The following information is repeated,I guess it's a problem here. How can I solve it,Below is the execution log: `D:\opensource_C++\osrm-backend-5.22.0-customsnapping.3\build\Release>osrm-extrac t china-latest.osm.pbf -p ../../profiles/car.lua [info] Parsed 0 location-dependent features with 0 GeoJSON polygons [info] Using script ../../profiles/car.lua [info] Input file: china-latest.osm.pbf [info] Profile: car.lua [info] Threads: 4 [info] Parsing in progress.. [info] input file generated by osmium/1.8.0 [info] timestamp: 2019-03-18T21:14:02Z [info] Using profile api version 4 [info] Found 3 turn restriction tags: [info] motorcar [info] motor_vehicle [info] vehicle [info] Parse relations ... [info] Parse ways and nodes ... [info] Using profile api version 4 [info] Using profile api version 4 [info] Using profile api version 4 [info] Parsing finished after 135.886 seconds [info] Raw input contains 66864375 nodes, 5010682 ways, and 8741 relations, 6807 restrictions [info] Sorting used nodes ... ok, after 0.754457s [info] Erasing duplicate nodes ... ok, after 0.056767s [info] Sorting all nodes ... ok, after 0.042903s [info] Building node id map ... ok, after 0.114957s [info] Confirming/Writing used nodes ... ok, after 2.00483s [info] Writing barrier nodes ... ok, after 0s [info] Writing traffic light nodes ... ok, after 0s [info] Processed 27186590 nodes [info] Sorting edges by start ... ok, after 1.6817s [info] Setting start coords ... ok, after 2.2086s [info] Sorting edges by target ... ok, after 1.54985s [info] Computing edge weights ... ok, after 5.73452s [info] Sorting edges by renumbered start ... ok, after 1.70633s [info] Writing used edges ... ok, after 6.3033s -- Processed 28443486 edge s [info] Writing way meta-data ... ok, after 0.011308s -- Metadata contains << 2288690 entries. [info] Sorting used ways ... ok, after 0.003893s [info] Collecting start/end information on 0 maneuver overrides...ok, after 0.01 4602s [info] Collecting start/end information on 0 maneuver overrides...ok, after 0s[ 0m [info] Collecting start/end information on 6807 restrictions...ok, after 0.05572 5s [info] Collecting start/end information on 6807 restrictions...ok, after 0.01701 9s [info] writing street name index ... ok, after 0.055973s [info] extraction finished after 158.882s [info] Generating edge-expanded graph representation [info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Node compression ratio: 0.122906 [info] Edge compression ratio: 0.161636 [info] graph compression removed 2191908 annotations of 2288690 in 7.76487 seco nds [info] Find segregated edges in node-based graph ... [info] ok, after 95.7549s [info] Segregated edges count = 348349 [info] Writing nodes for nodes-based and edges-based graphs ... [info] Geometry successfully removed: compressed edges: 9194700 compressed geometries: 56894492 longest chain length: 4865 cmpr ratio: 0.16161 avg chain length: 6.18775 [info] Generating edge expanded nodes ...  [info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Expanding via-way turn restrictions ...  [info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Generated 7952573 nodes (756 of which are duplicates) and 28442532 segme nts in edge-expanded graph [info] Generating edge-expanded edges  [info] . 10% . 20% .[warn] Turn is a u turn but not turning to the first co nnected edge of the intersection. Node ID: 7626327, OSM link: http://www.openstr eetmap.org/?zoom=18&mlat=43.823451&mlon=90.296722 30% .[warn] Turn is a u turn but not turning to the first connected edge o f the intersection. Node ID: 10816022, OSM link: http://www.openstreetmap.org/?z oom=18&mlat=28.037758&mlon=112.814761 40% [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 11893765, OSM link: http://www.openstreetmap.org/?zo om=18&mlat=28.037195&mlon=112.985144 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 11893772, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=28.0371&mlon=112.983076 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 11952709, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=28.111262&mlon=113.014266 .[warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 13086491, OSM link: http://www.openstreetmap.org/?zoom=1 8&mlat=28.034628&mlon=120.590075 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 13549897, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=34.428723&mlon=114.348376 50% .[warn] Turn is a u turn but not turning to the first connected edge o f the intersection. Node ID: 15300444, OSM link: http://www.openstreetmap.org/?z oom=18&mlat=22.318073&mlon=113.944813 60% .[warn] Turn is a u turn but not turning to the first connected edge o f the intersection. Node ID: 18138270, OSM link: http://www.openstreetmap.org/?z oom=18&mlat=22.598895&mlon=113.20451 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 18765728, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=31.245703&mlon=120.791581 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 18797226, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=31.243058&mlon=120.799378 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 18797226, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=31.243058&mlon=120.799378 70% . 80% .[warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 24188238, OSM link: http://www.openstreetmap. org/?zoom=18&mlat=22.807058&mlon=113.284883 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 24188238, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=22.807058&mlon=113.284883 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 24188238, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=22.807058&mlon=113.284883 [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 24369124, OSM link: http://www.openstreetmap.org/?zoom=18 &mlat=30.862513&mlon=104.46787 90% [warn] Turn is a u turn but not turning to the first connected edge of the intersection. Node ID: 25876279, OSM link: http://www.openstreetmap.org/?zo om=18&mlat=28.03718&mlon=112.986788 . [info] Sorting and writing 0 maneuver overrides... [info] done. [info] Renumbering turns [info] Writing 0 conditional turn penalties... [info] Generated 28442532 edge based node segments [info] Node-based graph contains 7940439 edges [info] Edge-expanded graph ... [info] contains 15910388 edges [info] Timing statistics for edge-expanded graph: [info] Renumbering edges: 0.291909s [info] Generating nodes: 17.0011s [info] Generating edges: 80.8206s [info] Generating guidance turns  [info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . [info] done. [info] Created 145 entry classes and 43640 Bearing Classes [info] Handled: 308 of 7239 lanes: 4.25473 %. [info] Assigned 17414020 turn instruction types: [info] new name: 343272 (1.97%) [info] continue: 676333 (3.88%) [info] turn: 7658284 (43.98%) [info] merge: 46121 (0.26%) [info] on ramp: 28989 (0.17%) [info] off ramp: 41022 (0.24%) [info] fork: 110267 (0.63%) [info] end of road: 2406910 (13.82%) [info] notification: 1338 (0.01%) [info] enter roundabout: 11504 (0.07%) [info] enter and exit roundabout: 1506 (0.01%) [info] enter rotary: 619 (0.00%) [info] enter and exit rotary: 68 (0.00%) [info] enter roundabout turn: 1959 (0.01%) [info] enter and exit roundabout turn: 3 (0.00%) [info] (noturn): 314923 (1.81%) [info] (suppressed): 5723910 (32.87%) [info] roundabout: 1459 (0.01%) [info] exit roundabout: 13509 (0.08%) [info] rotary: 57 (0.00%) [info] exit rotary: 737 (0.00%) [info] roundabout turn: 2 (0.00%) [info] exit roundabout turn: 1988 (0.01%) [info] (stay on roundabout): 15621 (0.09%) [info] (sliproad): 13619 (0.08%) [info] Assigned 17414020 turn instruction modifiers: [info] uturn: 652001 (3.74%) [info] sharp right: 290497 (1.67%) [info] right: 4900604 (28.14%) [info] slight right: 410468 (2.36%) [info] straight: 5945772 (34.14%) [info] slight left: 372919 (2.14%) [info] left: 4538982 (26.07%) [info] sharp left: 302777 (1.74%) [info] Guidance turn annotations took 68.5346s [info] Writing Intersection Classification Data [info] ok, after 2.74402s [info] Writing Turns and Lane Data... [info] ok, after 3.79347s [info] Saving edge-based node weights to file. [info] Done writing. (1.32722) [info] Computing strictly connected components ... [info] Found 54341 SCC (5 large, 54336 small) [info] SCC run took: 1.79743s [info] Building r-tree ... [info] Constructing r-tree of 28442532 segments build on-top of 27186590 coordin ates [info] finished r-tree construction in 15.241 seconds [info] Writing edge-based-graph edges ...  [info] ok, after 2.32307s [info] Processed 15910388 edges [info] Expansion: 71369 nodes/sec and 20876 edges/sec [info] To prepare the data for routing, run: ./osrm-contract "china-latest.osrm"  [info] RAM: peak bytes used: 

D:\opensource_C++\osrm-backend-5.22.0-customsnapping.3\build\Release>osrm-contra ct china-latest.osrm [info] Input file: china-latest.osrm [info] Threads: 4 [info] Reading node weights. [info] Done reading node weights. [info] Loading edge-expanded graph representation [info] merged 29514 edges out of 31820776 [info] initializing node priorities... ok. [info] preprocessing 6981913 (87.7944%) nodes... [info] . 10% . 20% . 30% . 40% . 50% . 60% .[renumbered] 70% . 80% . [info] Converting contracted graph with 40841684 to edge list (1143567152 bytes)  [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70 % . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 966644 (12.1551%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [0m [info] Converting contracted graph with 9108101 to edge list (255026828 bytes)[ 0m [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70 % . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 966644 (12.1551%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [0m [info] Converting contracted graph with 9034777 to edge list (252973756 bytes)[ 0m [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70 % . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 966644 (12.1551%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . `

chaupow commented 5 years ago

I'm a bit confused. Do you want to run the service with MLD or with CH?

Can you send us just the commands that you are using? from the beginning when you preprocess the data until trying to run osrm-routed? (no need for the response/logs at least for now)

Doublecheck with with commands here and stick to the example of either MLD or CH.

Also, you can format multi-line code with three quotes:

put in your code here

pig2018 commented 5 years ago

@chaupow Thank you for your reply,I want to run the service with CH. My input commands are as follows:

  1. osrm-extract china-latest.osm.pbf -p ../../profiles/car.lua

  2. osrm-contract china-latest.osrm

  3. osrm-routed --algorithm=CH china-latest.osrm

pig2018 commented 5 years ago

@chaupow Can I ask another question? Does OSRM data support SHAPE, KIWI, NDS or opendrive? Does it consider the impact of real-time road conditions or traffic accidents on navigation?

GarfAbh commented 5 years ago

Hi,

I'm faces the same issue. What is really weird is that I'm working on OSRM using CH since 3 month without any problems and now it comes out.

When I try to run ./osrm-routed --algorithm=CH path/to/data.osrm I get this :

''' terminate called after throwing an instance of 'osrm::util::exception' what(): Could not find any metrics for CH in the data. Did you load the right dataset? ./osrm-server-launch.sh : ligne 34 : 13165 Abandon '''

My OSRM release is 5.22.0 I'm on Linux distribution. I have asolutely no issues running it using MLD but CH is messing I don't know why. I tried to uninstall everything and start again from the begining but still got the same error.

What could I do ?

Thank you a lot in advance for your help

danpat commented 5 years ago

In order to use the CH routing algorithm, you must prepare the data with osrm-extract and osrm-contract. Ensure that both those complete without error.

GarfAbh commented 5 years ago

This is my output for osrm-contract.

As MLD work properly i assumed that osrm_extract also.

It sounds to work as mentioned a lot of time on all the issues to see if it works it should end with RAM: peak ... which I have.

``[info] Input file: ../data/OSRM/switzerland/switzerland-latest.osrm [info] Threads: 4 [info] Reading node weights. [info] Done reading node weights. [info] Loading edge-expanded graph representation [info] merged 9960 edges out of 5795584 [info] initializing node priorities... ok. [info] preprocessing 1432580 (89.5266%) nodes... [info] . 10% . 20% . 30% . 40% . 50% . 60% .[renumbered] 70% . 80% . [info] Converting contracted graph with 6295017 to edge list (151080408 bytes) [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 167198 (10.4488%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Converting contracted graph with 1204476 to edge list (28907424 bytes) [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 167198 (10.4488%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Converting contracted graph with 1180414 to edge list (28329936 bytes) [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 167198 (10.4488%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Converting contracted graph with 1174789 to edge list (28194936 bytes) [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] initializing node priorities... ok. [info] preprocessing 167198 (10.4488%) nodes... [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Converting contracted graph with 1203531 to edge list (28884744 bytes) [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100% [info] Contracted graph has 6770141 edges. [info] Contraction took 307.333 sec [info] Preprocessing : 308.029 seconds [info] finished preprocessing [info] RAM: peak bytes used: 672305152

GarfAbh commented 5 years ago

So I still don't understand where the problem could come from :/

danpat commented 5 years ago

Are you generating data for both CH and MLD?

There's one thing to note: if you run osrm-partition after osrm-contract, it will delete the CH files, as they need to be regenerated after partitioning. Is it possible you've done this?

GarfAbh commented 5 years ago

No i'm not generating it for both. I just have a branch and depending on if it's MLD or CH it does the right thing.

for MLD it partition then customize then routed for CH it contract then routed.

Could it be possible that we never have to run partition after contract on the same data set ? cause if it's the case I switched from CH to MLD and then switched back but on the same data set and it's at that point that it stoped working

GarfAbh commented 5 years ago

ok it's not my problem.

I tried to uninstall everything and start again from the begining and I got this :

[warn] Missing/Broken File: /home/arnaud/data/OSRM/switzerland/switzerland-latest.osrm.datasource_names
[error] Required files are missing, cannot continue

I will continue to explore then

GarfAbh commented 5 years ago

Does OSRM need every file that are in build or somewhere else in the folder ? Or only the executable ? Cause I'm extracting all the executable and then delete the repo.

github-actions[bot] commented 2 months ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.