mapbox / mapbox-navigation-android

Mapbox Navigation SDK for Android
https://docs.mapbox.com/android/navigation/overview/
Other
622 stars 319 forks source link

Multiple waypoint handling doesn't work #5479

Closed bgervan closed 2 years ago

bgervan commented 2 years ago

Mapbox Navigation SDK version: 2.2.0

Steps to trigger behavior

  1. Create multiple real waypoint
  2. Disable rerouting - the feature doesn't work if I enable it
  3. Start navigation
  4. Simulate/Use real location to progress on the route - (simulator doesn't work with waypoint, fake gps app or real life test required)
  5. Pass the first waypoint

Expected behavior

The second legs is in the guidance.

Actual behavior

Tries to navigate back to the first waypoint. It looks like the off road event reset the route index. This is not a real offroad event, the car moving on the second leg.

Sample log:

02-17 13:21:58.327 6294 6294 D ReactAUTO: logAndroidAuto State: TRACKING, legIndex: 0, legSize: 3 02-17 13:21:59.374 6294 6294 D ReactAUTO: logAndroidAuto State: TRACKING, legIndex: 0, legSize: 3 02-17 13:22:00.444 6294 6294 D ReactAUTO: logAndroidAuto State: TRACKING, legIndex: 0, legSize: 3 02-17 13:22:01.553 6294 6294 D ReactAUTO: logAndroidAuto State: TRACKING, legIndex: 0, legSize: 3 02-17 13:22:02.582 6294 6294 D ReactAUTO: logAndroidAuto onWaypointArrival 02-17 13:22:02.582 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:02.587 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:02.750 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:02.752 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:02.888 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:02.889 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.021 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:03.023 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.151 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:03.153 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.309 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:03.311 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.460 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:03.462 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.576 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg false 02-17 13:22:03.578 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.724 6294 6294 D ReactAUTO: logAndroidAuto shouldNavigateNextRouteLeg true 02-17 13:22:03.729 6294 6294 D ReactAUTO: logAndroidAuto State: COMPLETE, legIndex: 0, legSize: 3 02-17 13:22:03.770 6294 6294 D ReactAUTO: logAndroidAuto --- onNextRouteLegStart --- 02-17 13:22:03.787 6294 6294 D ReactAUTO: logAndroidAuto onLegIndexUpdatedCallback false 02-17 13:22:03.852 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:04.690 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:05.733 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:06.779 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:07.850 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:08.895 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:09.934 6294 6294 D ReactAUTO: logAndroidAuto State: INITIALIZED, legIndex: 1, legSize: 3 02-17 13:22:10.986 6294 6294 D ReactAUTO: logAndroidAuto State: TRACKING, legIndex: 1, legSize: 3 02-17 13:22:11.142 6294 6294 D ReactAUTO: logAndroidAuto State: OFF_ROUTE, legIndex: 0, legSize: 3 02-17 13:22:11.144 6294 6294 D ReactAUTO: logAndroidAuto onOffRouteStateChanged true 02-17 13:22:12.032 6294 6294 D ReactAUTO: logAndroidAuto State: OFF_ROUTE, legIndex: 0, legSize: 3 02-17 13:22:13.064 6294 6294 D ReactAUTO: logAndroidAuto State: OFF_ROUTE, legIndex: 0, legSize: 3 02-17 13:22:14.111 6294 6294 D ReactAUTO: logAndroidAuto State: OFF_ROUTE, legIndex: 0, legSize: 3

LukasPaczos commented 2 years ago

hey @bgervan, thanks for reporting the issue. We recently made some changes with our off-route/off-road detection, could you retest on v2.4.0?

bgervan commented 2 years ago

It looks like works properly with 2.4.0. Thanks for the update