Closed pig2018 closed 1 month 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[0m
[info] Using script ../../profiles/car.lua[0m
[info] Input file: china-latest.osm.pbf[0m
[info] Profile: car.lua[0m
[info] Threads: 4[0m
[info] Parsing in progress..[0m
[info] input file generated by osmium/1.8.0[0m
[info] timestamp: 2019-03-18T21:14:02Z[0m
[info] Using profile api version 4[0m
[info] Found 3 turn restriction tags:[0m
[info] motorcar[0m
[info] motor_vehicle[0m
[info] vehicle[0m
[info] Parse relations ...[0m
[info] Parse ways and nodes ...[0m
[info] Using profile api version 4[0m
[info] Using profile api version 4[0m
[info] Using profile api version 4[0m
[info] Parsing finished after 135.886 seconds[0m
[info] Raw input contains 66864375 nodes, 5010682 ways, and 8741 relations, 6807
restrictions[0m
[info] Sorting used nodes ... ok, after 0.754457s[0m
[info] Erasing duplicate nodes ... ok, after 0.056767s[0m
[info] Sorting all nodes ... ok, after 0.042903s[0m
[info] Building node id map ... ok, after 0.114957s[0m
[info] Confirming/Writing used nodes ... ok, after 2.00483s[0m
[info] Writing barrier nodes ... ok, after 0s[0m
[info] Writing traffic light nodes ... ok, after 0s[0m
[info] Processed 27186590 nodes[0m
[info] Sorting edges by start ... ok, after 1.6817s[0m
[info] Setting start coords ... ok, after 2.2086s[0m
[info] Sorting edges by target ... ok, after 1.54985s[0m
[info] Computing edge weights ... ok, after 5.73452s[0m
[info] Sorting edges by renumbered start ... ok, after 1.70633s[0m
[info] Writing used edges ... ok, after 6.3033s -- Processed 28443486 edge
s[0m
[info] Writing way meta-data ... ok, after 0.011308s -- Metadata contains <<
2288690 entries.[0m
[info] Sorting used ways ... ok, after 0.003893s[0m
[info] Collecting start/end information on 0 maneuver overrides...ok, after 0.01
4602s[0m
[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[0m
[info] Collecting start/end information on 6807 restrictions...ok, after 0.01701
9s[0m
[info] writing street name index ... ok, after 0.055973s[0m
[info] extraction finished after 158.882s[0m
[info] Generating edge-expanded graph representation[0m
[info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%[0m
[info] Node compression ratio: 0.122906[0m
[info] Edge compression ratio: 0.161636[0m
[info] graph compression removed 2191908 annotations of 2288690 in 7.76487 seco
nds[0m
[info] Find segregated edges in node-based graph ...[0m
[info] ok, after 95.7549s[0m
[info] Segregated edges count = 348349[0m
[info] Writing nodes for nodes-based and edges-based graphs ...[0m
[info] Geometry successfully removed:
compressed edges: 9194700
compressed geometries: 56894492
longest chain length: 4865
cmpr ratio: 0.16161
avg chain length: 6.18775[0m
[info] Generating edge expanded nodes ... [0m
[info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%[0m
[info] Expanding via-way turn restrictions ... [0m
[info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%[0m
[info] Generated 7952573 nodes (756 of which are duplicates) and 28442532 segme
nts in edge-expanded graph[0m
[info] Generating edge-expanded edges [0m
[info] . 10% . 20% .[33m[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[0m
30% .[33m[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[0m
40% [33m[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[0m
[33m[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[0m
[33m[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[0m
.[33m[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[0m
[33m[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[0m
50% .[33m[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[0m
60% .[33m[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[0m
[33m[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[0m
[33m[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[0m
[33m[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[0m
70% . 80% .[33m[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[0m
[33m[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[0m
[33m[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[0m
[33m[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[0m
90% [33m[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[0m
.[0m
[info] Sorting and writing 0 maneuver overrides...[0m
[info] done.[0m
[info] Renumbering turns[0m
[info] Writing 0 conditional turn penalties...[0m
[info] Generated 28442532 edge based node segments[0m
[info] Node-based graph contains 7940439 edges[0m
[info] Edge-expanded graph ...[0m
[info] contains 15910388 edges[0m
[info] Timing statistics for edge-expanded graph:[0m
[info] Renumbering edges: 0.291909s[0m
[info] Generating nodes: 17.0011s[0m
[info] Generating edges: 80.8206s[0m
[info] Generating guidance turns [0m
[info] . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% .[0m
[info] done.[0m
[info] Created 145 entry classes and 43640 Bearing Classes[0m
[info] Handled: 308 of 7239 lanes: 4.25473 %.[0m
[info] Assigned 17414020 turn instruction types:[0m
[info] new name: 343272 (1.97%)[0m
[info] continue: 676333 (3.88%)[0m
[info] turn: 7658284 (43.98%)[0m
[info] merge: 46121 (0.26%)[0m
[info] on ramp: 28989 (0.17%)[0m
[info] off ramp: 41022 (0.24%)[0m
[info] fork: 110267 (0.63%)[0m
[info] end of road: 2406910 (13.82%)[0m
[info] notification: 1338 (0.01%)[0m
[info] enter roundabout: 11504 (0.07%)[0m
[info] enter and exit roundabout: 1506 (0.01%)[0m
[info] enter rotary: 619 (0.00%)[0m
[info] enter and exit rotary: 68 (0.00%)[0m
[info] enter roundabout turn: 1959 (0.01%)[0m
[info] enter and exit roundabout turn: 3 (0.00%)[0m
[info] (noturn): 314923 (1.81%)[0m
[info] (suppressed): 5723910 (32.87%)[0m
[info] roundabout: 1459 (0.01%)[0m
[info] exit roundabout: 13509 (0.08%)[0m
[info] rotary: 57 (0.00%)[0m
[info] exit rotary: 737 (0.00%)[0m
[info] roundabout turn: 2 (0.00%)[0m
[info] exit roundabout turn: 1988 (0.01%)[0m
[info] (stay on roundabout): 15621 (0.09%)[0m
[info] (sliproad): 13619 (0.08%)[0m
[info] Assigned 17414020 turn instruction modifiers:[0m
[info] uturn: 652001 (3.74%)[0m
[info] sharp right: 290497 (1.67%)[0m
[info] right: 4900604 (28.14%)[0m
[info] slight right: 410468 (2.36%)[0m
[info] straight: 5945772 (34.14%)[0m
[info] slight left: 372919 (2.14%)[0m
[info] left: 4538982 (26.07%)[0m
[info] sharp left: 302777 (1.74%)[0m
[info] Guidance turn annotations took 68.5346s[0m
[info] Writing Intersection Classification Data[0m
[info] ok, after 2.74402s[0m
[info] Writing Turns and Lane Data...[0m
[info] ok, after 3.79347s[0m
[info] Saving edge-based node weights to file.[0m
[info] Done writing. (1.32722)[0m
[info] Computing strictly connected components ...[0m
[info] Found 54341 SCC (5 large, 54336 small)[0m
[info] SCC run took: 1.79743s[0m
[info] Building r-tree ...[0m
[info] Constructing r-tree of 28442532 segments build on-top of 27186590 coordin
ates[0m
[info] finished r-tree construction in 15.241 seconds[0m
[info] Writing edge-based-graph edges ... [0m
[info] ok, after 2.32307s[0m
[info] Processed 15910388 edges[0m
[info] Expansion: 71369 nodes/sec and 20876 edges/sec[0m
[info] To prepare the data for routing, run: ./osrm-contract "china-latest.osrm"
[0m
[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[0m [info] Threads: 4[0m [info] Reading node weights.[0m [info] Done reading node weights.[0m [info] Loading edge-expanded graph representation[0m [info] merged 29514 edges out of 31820776[0m [info] initializing node priorities... ok.[0m [info] preprocessing 6981913 (87.7944%) nodes...[0m [info] . 10% . 20% . 30% . 40% . 50% . 60% .[renumbered] 70% . 80% .[0m [info] Converting contracted graph with 40841684 to edge list (1143567152 bytes) [0m [info] Getting edges of minimized graph . 10% . 20% . 30% . 40% . 50% . 60% . 70 % . 80% . 90% . 100%[0m [info] initializing node priorities... ok.[0m [info] preprocessing 966644 (12.1551%) nodes...[0m [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%[0m [info] initializing node priorities... ok.[0m [info] preprocessing 966644 (12.1551%) nodes...[0m [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%[0m [info] initializing node priorities... ok.[0m [info] preprocessing 966644 (12.1551%) nodes...[0m [info] [renumbered]. 10% . 20% . 30% . 40% . 50% . 60% . `
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
@chaupow Thank you for your reply,I want to run the service with CH. My input commands are as follows:
osrm-extract china-latest.osm.pbf -p ../../profiles/car.lua
osrm-contract china-latest.osrm
osrm-routed --algorithm=CH china-latest.osrm
@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?
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
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.
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
So I still don't understand where the problem could come from :/
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?
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
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
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.
This issue seems to be stale. It will be closed in 30 days if no further activity occurs.
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 use
osrm-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[0m [info] Threads: 4[0m [info] IP address: 0.0.0.0[0m [info] IP port: 5000[0m [info] http 1.1 compression handled by zlib version 1.2.8[0m [info] Listening on: 0.0.0.0:5000[0m [info] running and waiting for requests[0m`