Commit Graph

1303 Commits

Author SHA1 Message Date
Dennis Luxen
2da7ca5338
Route pedestrians over highway=platform (#6993) 2024-07-12 20:12:19 +02:00
Dennis Luxen
8ae9abaa63
Fix parsing on feature files on other gherkin parser (#6992) 2024-07-12 17:35:44 +02:00
Dennis Luxen
7436835244
Remove corech options, redundant tests (#6989)
* Remove corech options, redundant tests

* Small fix
2024-07-10 16:28:07 +02:00
Dennis Luxen
f1eabc3ecc
Replace boost::filesystem with std (#6432) 2024-06-20 21:44:28 +02:00
Michael Bell
ffc39b8ad2
Clarify use of forcing routing steps (#6866)
The change clarifies the conditions for forcing routing steps and
simplifies the codebase to support it.

- Makes explicity  the search runtime condition for forcing a routing
step. Namely, the node is a source of the forward and reverse searches,
and it's one of the pre-identified nodes that requires a step to
be forced.
- Consolidate the two lists of force nodes into one. Not only is there
no algorithmic value in separating the nodes by geometric direction,
the  improvements to via-routes with u-turns mean atleast one of these
lists will be empty for any search.
- Rename 'force loop' to 'force step'. This moves the code away
from the original CH-specific language for checking for self-loops
in the case where this condition is met. MLD does not have loops.

Additional cucumber tests are added to cover the logic related to
negative search weights and forcing routing steps on via-route
paths.
2024-05-10 22:00:24 +01:00
Matthew Wigginton Bhagat-Conway
7ebd21f39e
pass flags into process_segment (#6658)
* pass flags into process_segment

---------

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-04-06 09:27:42 +01:00
Michael Bell
8ef366e061
Add support for opposite approach request parameter (#6842)
* Added approach on the opposite side of the road.

* Additional test and docs coverage for opposite approach

---------

Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
2024-04-03 19:59:15 +01:00
Monday
6e77d53946
Correctly handle compressed traffic signals (#6724)
Unidirectional traffic signal segments are currently not compressed.
This means traffic signals which are not on turns can be missed and
not applied the correct penalty.

This commit changes this behaviour to correctly handle the graph
compression. Additional tests are added to ensure there is no
regression for other cases (turns, restrictions).

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-03-17 11:32:10 +00:00
fenwuyaoji
14dcf91812
add keepalive_timeout flag (#6674)
* add keepalive_timeout flag
2023-08-30 19:06:39 +01:00
Lasse Liehu
d234c7246c
Don't route on proposed ways (#6615) 2023-08-20 10:17:30 +01:00
Michael Bell
db7946d762
Add support for disabling feature datasets (#6666)
This change adds support for disabling datasets, such that specific
files are not loaded into memory when running OSRM. This enables users
to not pay the memory cost for features they do not intend to use.

Initially, there are two options:
- ROUTE_GEOMETRY, for disabling overview, steps, annotations and waypoints.
- ROUTE_STEPS, for disabling steps only.

Attempts to query features for which the datasets are disabled will
lead to a DisabledDatasetException being returned.
2023-08-04 18:43:37 +01:00
Michael Bell
522d0f066e
Add 'load directly' mode to default Cucumber test suite (#6664)
Currently `npm test` runs the Cucumber suite with a matrix
configuration for selecting the algorithm (CH, MLD) and data loading
(shared-memory, mmap) options.

However, there is a third data loading option, 'load directly',
which is to directly load the datasets into the osrm-routed process memory.

The code paths for each data loading option are distinct:

Storage::Run + SharedMemoryAllocator
MMapMemoryAllocator
ProcessMemoryAllocator

This commit adds direct data loading as part of the Cucumber
configuration matrix.

This will ensure optional dataset support can be added without any
regressions.
2023-08-01 09:24:51 +01:00
Whytro
d51631401e
Add support for a default_bearing_radius flag (#6575) 2023-03-24 16:49:33 +01:00
zephyr
ebd9ab4548
fix(json_render): json_render is not accurate enough for extremely sm… (#6531) 2023-02-02 18:58:25 +01:00
Michael Bell
9ad432c5b2
Fix adding traffic signal penalties during compression (#6419)
Weight and duration penalties are flipped in the lambda function
that applies penalties from traffic signals.

Duration is in deciseconds, whilst weight is multipled by
10^weight_precision, with weight_precision being 1 by default.

Therefore, for default routability profile, the penalties end up
being the same, hence why no tests picked this up.

If distance weight is used however, it will incorrectly apply an
additional penalty to the weight, and not add the traffic signal
delay to the duration in the routing graph.

To confuse things further, in some API responses the values are
correct because they use geometry data instead, but it's still
possible that a sub-optimal route was selected.

However, given the distance weight is in meters, and the additional
penalty per traffic light would be 20, it's unlikely this would
have changed the routing results.

In any case, we correct the function to apply the arguments correctly.
2022-10-23 14:59:12 +01:00
Siarhei Fedartsou
9d160a9b5d
Revert back to using custom HTTP parser instead of Boost.Beast (#6407) 2022-10-14 14:37:33 +02:00
Siarhei Fedartsou
d143de597d
Fix bug with large HTTP requests leading to Bad Request in osrm-routed. (#6403) 2022-10-13 16:53:49 +02:00
Siarhei Fedartsou
4026ed54c0
Add support for surface=metal,grass_paver,woodchips in bicyle profile (#6395) 2022-10-11 11:09:56 +02:00
Daniel J. H
895e4bf6d5
Adds cucumber scenario for u turn restrictions at intersection (#4484) 2022-10-10 22:27:27 +02:00
Siarhei Fedartsou
9a4b4648f4
Improve performance of JSON rendering (#6380) 2022-10-03 21:43:51 +02:00
Michael Bell
b7daa7e641
Gracefully handle no-turn intersections in guidance processing. (#6382)
Badly constructed OSM intersections can create OSRM intersection
views that have no valid turns.
The guidance code for segregated intersections tries to look
ahead to the second intersection to ensure lanes are  announced
intuitively.
Currently, OSRM assumes there are always turns at the second
intersection that we should consider. This commit corrects
this assumption so that it can now handle badly constructed
OSM intersections with no turns.
2022-10-01 14:35:08 +01:00
Michael Bell
ef8f3d7508
Ensure u-turn exists in intersection view (#6376)
Due to some rather complex logic that tries to calculate intersection
angles by looking further up the road, it's possible to return
an intersection view that is missing a u-turn - something which
is assumed to exist in later guidance calculations.

We apply a fix here by ensuring the u-turn is always included in
the returned view.
2022-09-27 13:49:12 +01:00
Louis
660cea8fcc
Bicycle surface speeds (#6212) 2022-09-23 17:54:55 +02:00
Siarhei Fedartsou
2cf957148b
Support floats for speed value in traffic updates CSV (#6327) 2022-08-30 15:34:46 +02:00
Michael Bell
b17cbb4c47
Support OSM traffic signal directions (#6153)
Currently OSRM parses traffic signal nodes without consideration
for the direction in which the signal applies. This can lead
to duplicated routing penalties, especially when a forward and backward
signal are in close proximity on a way.

This commit adds support for directed signals to the extraction and
graph creation. Signal penalties are only applied in the direction
specified by the OSM tag.

We add the assignment of traffic directions to the lua scripts,
maintaining backwards compatibility with the existing boolean
traffic states.

As part of the changes to the internal structures used for tracking
traffic signals during extraction, we stop serialising/deserialising
signals to the `.osrm` file. The traffic signals are only used by
`osrm-extract` so whilst this is a data format change, it will not
break any existing user processes.
2022-08-30 10:36:49 +01:00
Michael Bell
bfb74c2dad
Fix snapping target locations to ways used in turn restrictions (#6339)
Currently there is an edge-case in the turn restriction implementation,
such that routes can not be found if the target input location snaps
to a way used in a (multi) via restriction.

With the addition of snapping input locations to multiple ways, we
can now also snap to the "duplicate" edges created for the restriction graph,
thereby fixing the problem.
This is achieved by adding the duplicate restriction edges to the
geospatial search RTree.

This does open up the possibility of multiple paths representing exactly
the same route - one using the original edge as a source, the other
using the duplicate restriction graph edge as source. This is fine,
as both edges are represented by the same geometry, so will generate
the same result.
2022-08-27 15:59:44 +01:00
Michael Bell
d74e7b66bd
Support snapping to multiple ways at an input location (#5953)
This PR improves routing results by adding support for snapping to
multiple ways at input locations.

This means all edges at the snapped location can act as source/target
candidates for routing search, ensuring we always find the best route,
and not the one dependent on the edge selected.
2022-08-27 11:36:20 +01:00
Michael Bell
a98074a051
Improvements to maneuver override processing (#6215)
This change unblocks the osrm-extract debug build, which is
currently failing on a maneuver override assertion.

The processing of maneuver overrides currently has three issues
- It assumes the via node(s) can't be compressed (the failing assertion)
- It can't handle via-paths containing incompressible nodes
- It doesn't interop with turn restriction on the same path

Turn restrictions and maneuver overrides both use the same
from-via-to path representation.
Therefore, we can fix these issues by consolidating their
structures and reusing the path representation for
turn restrictions, which already is robust to the above
issues.

This also simplifies some of the codebase by removing maneuver
override specific path processing.

There are ~100 maneuver overrides in the OSM database, so the
impact on processing and routing will be minimal.
2022-08-24 16:19:24 +01:00
Lev Dragunov
928867c520
Add data_version field to responses of all plugins. (#5387) 2022-08-22 21:07:32 +02:00
Michael Bell
3cfd0e8334
Complete support for no_entry and no_exit turn restrictions (#5988)
The internal representation of turn restrictions expects only one
`from` way and only one `to` way.

`no_entry` and `no_exit` turn restrictions can have multiple `from` and
`to` ways respectively. This means they are not fully supported by
OSRM's restriction parser.

We complete support for these turn restriction types by parsing all
ways and converting a valid restriction with multiple `from`/`to` members
into multiple internal restrictions.
2022-08-22 12:58:16 +01:00
Michael Bell
b4b1aea567
Add support for non-round-trips with a single fixed endpoint (#6050)
Currently /trip supports finding round-trip routes where only the
start or end location is fixed. This PR extends this feature to
non-round-trip requests.

We do this by a new table manipulation that simulates non-round-trip
fixed endpoint requests as a round-trip request.
2022-08-22 12:56:47 +01:00
Siarhei Fedartsou
aadc088084
Fix distance calculation consistency. (#6315)
Consolidate great circle distance calculations to use cheap ruler library.
2022-08-19 22:31:40 +01:00
Siarhei Fedartsou
00816722dd
Configure Undefined Behaviour Sanitizer (#6290) 2022-08-01 22:40:26 +01:00
Siarhei Fedartsou
204fdaff6e
Fix bug with reading Set values from Lua scripts. (#6285)
* Fix bug with reading Set values from Lua scripts.

* Add test for foot profile named-road suffixes

Co-authored-by: Michael Bell <michael@mjjbell.com>
2022-07-30 23:14:06 +01:00
Michael Bell
37cfc7f99d
Revert "Executables use hyphens" (#6131)
This reverts commit 5bf3c7b659.
2021-09-21 13:28:01 -07:00
Michael Bell
2d1e620429
Fix test cache to consider MLD executable changes (#6129)
* Fix test cache to consider MLD executable changes

Currently the test cache is not invalidated if changes to
osrm-partition or osrm-customize executables. This is problematic
when these executables make breaking changes to the data format.

We fix this by including both in the list of executables that
can invalidate the test cache.

* Executables use hyphens
2021-09-21 12:35:34 -07:00
Michael Bell
8d3ebc64dc Add kerb barrier exception to default car profile
OSM data contains many mistakes that tag kerbs as highway barriers
when instead they are only describing highway crossings.

This PR updates the default car profile to handle these mistakes
and unblock routing on the affected highways.
2021-03-31 01:17:19 +01:00
themylogin
e7acc9df76 Fix turn.roads_on_the_left and turn.roads_on_the right for two-way roads #5128 2021-01-27 10:53:00 +01:00
Michael Bell
5266ac1635
Add support for multiple via-way restrictions (#5907)
Currently OSRM only supports turn restrictions with a single via-node or one
via-way. OSM allows for multiple via-ways to represent longer and more
complex restrictions.

This PR extends the use of duplicate nodes for representng via-way turn
restrictions to also support multi via-way restrictions. Effectively, this
increases the edge-based graph size by the number of edges in multi via-way
restrictions. However, given the low number of these restrictions it
has little effect on total graph size.

In addition, we add a new step in the extraction phase that constructs
a restriction graph to support more complex relationships between restrictions,
such as nested restrictions and overlapping restrictions.
2020-12-20 13:59:57 -08:00
Desone Burns II
b1646622e6 Changed nil test to empty test 2020-11-23 17:07:10 -07:00
Michael Bell
f87a324633
Fix crash in MLD alternative search if source or target are invalid (#5851)
In situations where there is not a valid source or target phantom
node (e.g. when snapping to an edge with a zero weight), a
heap assertion will fail in the MLD alternative search code.

We fix this by checking for empty heaps before proceeding with
the search.
2020-10-08 15:27:02 -07:00
Michael Bell
e033e0b553
Fix table result when source and destination on same one-way segment (#5828)
Fixes #5788

Table queries where source and destination are phantom nodes
on the same one-way segment can fail to find valid routes.

This is due to a bug in the MLD table generation for the
special case where the query can be simplified to a
one-to-many search.
If the destination is before the source on the one-way segment,
it will fail to find a route.

We fix this case by not marking the node as visited at the start,
so that valid paths to this node can be found later in the search.

We also remove redundant initialization for the source
node as the same actions are performed by a search step.
2020-10-07 14:58:13 -07:00
Denis Chaplygin
2d0b2ca987
Removed STXXL support. 2020-08-20 11:54:02 +03:00
Jeroen Hoek
92406da194 Bicycle: treat use_sidepath as no access
Fixes #5557.
2019-12-01 18:34:58 +01:00
Denis Chaplygin
d25a530942 Added cucumber test for skip_waypoint feature 2019-09-23 11:38:33 +03:00
Denis Chaplygin
50a1c8a08d Added flatbuffers support to Table service cucumber tests 2019-09-17 17:42:52 +03:00
Denis Chaplygin
0be87c73cf Fixed typo in flatbuffers: longitute -> longitude. 2019-08-26 14:31:51 +03:00
Denis Chaplygin
b8182dd7ff Replaced 'in' and 'out' at the flatbuffers 'instersection' object
with 'in_bearing' and 'out_bearing' to get flatbuffers schema javascript friendly.

Added a cucumber test for flatbuffers support.
2019-08-26 14:03:29 +03:00
Ilya Zverev
98294e3ddd Decrease max height to 2 meters 2019-03-04 13:23:17 +03:00
Ilya Zverev
a1e5061799 Decrease default car weight to 2 tons (#5371)
* Decrease default car weight to 2 tons
* Add a link to PR to the change log
2019-02-20 10:19:18 -08:00