organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
9.79k stars 941 forks source link

Turn problem for latest data snapshot (220506) #2538

Closed AntonM030481 closed 2 years ago

AntonM030481 commented 2 years ago

Latest data snapshot (220506) has next turn problems:

  1. (Debug) Running bicycle_route_test.cpp::SpainTenerifeAdejeVilaflor Avoid next roads: RoutingOptions: {} routing section for Spain_Canary Islands loaded in 0.317133 seconds Routing in mode: Joints Route build time: 1351 ms TID(1) ASSERT FAILED routing/turns_generator.cpp:1189 CHECK(turnCandidates.front().m_segment == firstOutgoingSeg) routing_integration_tests: /home/planet/omapsapp-private/routing/turns_generator.cpp:1189: void routing::turns::GetTurnDirection(const routing::turns::IRoutingResult&, size_t, const routing::NumMwmIds&, const routing::RoutingSettings&, routing::turns::TurnItem&): Assertion `false' failed. Aborted (core dumped)

  2. (Release) or if remove assert above. bicycle_turn_test.cpp::RussiaMoscowSevTushinoParkBicycleWayTurnTest pedestrian_route_test.cpp::BelarusMinskRenaissanceHotelUndergroundCross turn_test.cpp::Russia_Moscow_BolshoyKislovskiyPerBolshayaNikitinskayaUl_TurnTest turn_test.cpp::Netherlands_Barneveld_TurnTest

  3. (Warnings) "nodes.candidates are not expected to have same m_angle."

AntonM030481 commented 2 years ago

@vng how to get data snapshot (220506)?

vng commented 2 years ago

UPD: This will not work in cross mwm routing, because the branch that can read new cross-mwm index is still under my development.

AntonM030481 commented 2 years ago

Using new Belarus_Minsk Region.mwm:

Running pedestrian_route_test.cpp::BelarusMinskRenaissanceHotelUndergroundCross
Loaded countries list for version: 220415
Settings path: ./data/settings.ini
Avoid next roads: RoutingOptions: {}
TID(1) ASSERT FAILED
indexer/features_vector.cpp:16
CHECK(m_metaDeserializer) 
Assertion failed: (false), function FeaturesVector, file features_vector.cpp, line 16.
vng commented 2 years ago

Yes, try to reproduce and fix assert on 220415 data for Spain (28.11984, -16.72592) -> (28.15865, -16.63704)

AntonM030481 commented 2 years ago

For 220415 it is fine.

vng commented 2 years ago

Ok, please, take this branch https://github.com/organicmaps/organicmaps/pull/2539 and check 220506

AntonM030481 commented 2 years ago

I was able to reproduce issue in SpainTenerifeAdejeVilaflor. In fact this is start of the route from (28.11984, -16.72592) to (28.1197394, -16.726004). If shift start point just a bit (visually the same, e.g. (28.1198395, -16.7259453)) - no problem (no turnCandidates). But for this particular point - somehow one turnCandidate appears in RoutingEngineResult::GetPossibleTurns() and check is failed (angle of this candidate == 0, and this does not match expected 90 (right turn)). This is the turn from grey to magenta, so I suppose angle should be 90, not 0. But maybe we can skip 1st turn determination after going from grey. image

AntonM030481 commented 2 years ago

BelarusMinskRenaissanceHotelUndergroundCross Here I can see following picture. 1 TurnRight looks good here. Looks like the test is irrelevant. Maybe route is different now from before. My suggestion is to add distance check in all tests before any turns checks. image

I didn't change anything (by intention) for pedestrians yet. And didn't test it, just checked the number of failed tests before and after my changes. Looks like a lot of tests need to be updated.

AntonM030481 commented 2 years ago

are expected to fail. https://github.com/organicmaps/organicmaps/pull/2508#issue-1224134588

vng commented 2 years ago

Ok, thanks!