Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No turn-by-turn instructions/announcements on routes with waypoints (after route recomputation?) #1133

Open
barbeque-squared opened this issue Aug 11, 2021 · 6 comments

Comments

@barbeque-squared
Copy link
Contributor

The issue

How to reproduce:

  • Plan a route (from your current GPS position) with at least two waypoints (or 1 destination + 1 "Visit before" waypoint)
  • For simplicity, we'll call the current GPS position A, the waypoint B, and the destination C
  • All points are on or close enough to be reached by road (ie, no putting them in the middle of the sea etc)

Expected behaviour:
Regardless of where A, B and C are:

  • A route is drawn on the map
  • Route -> Description shows a route description plus ETA/distance
  • Turn-by-turn instruction(s) are shown on the OSD, and there are announcements
  • The OSD can show ETA/time left

Actual behaviour:
From what I've been able to test so far, all of the above works if the (probably as the crow flies) distance between A and B and also the distance between B and C are small. For example, it works if B is ~10km east of A, and C is ~20km east of B. But not if C is 100+ km north of B.

It seems that if either distance becomes bigger than some threshold somewhere, the following happens:

  • A route is drawn on the map
  • Route -> Description shows only ETA/distance (no route description)
  • No turn-by-turn instruction(s) are shown on the OSD, and there are no announcements
  • The OSD does not show ETA/time left

Sometimes when passing the last waypoint (ie only current postion to destination left) the route description and announcements suddenly start working. If it does initially show turn-by-turn instructions/announcements, just get it to recompute the route until it doesn't work anymore. If you hit the error, when Settings -> Maps -> Navigation is enabled it won't show arrows on the map anymore either

Example coordinates

The longer the route, the easier this seems to trigger, especially if your GPS position or your destination aren't on a national road or highway. If I pick a random destination 100km away from me, and add a waypoint about halfway, especially if that causes it to pick an alternate route that is only a few minutes longer than the default route anyway, I can trigger it at least 9 out of 10 times.

But if you need actual coordinates:

System details

  • This is on Android 7 with either of the APK's from the Download Center. I tried getting logs but they don't appear to actually relate to this (just GPS updates and some NavitGraphics stuff); if I'm doing it wrong please tell me what to do.
  • I use a custom map, which is basically the default map but buildings and house numbers removed. If needed I can provide the binfile and/or script to create it.
  • It triggers on the default navit.xml

Use case

On long journeys, I usually want to avoid some highway junction, or detour through a more scenic route. What I do is make a bookmark folder (on the computer) with the waypoints + destination in the correct order, then sync it over to my tablet and use the button to add all bookmarks as waypoints.
I didn't try making a waypoint every 10km, because even if that actually 'solved' it, it's way too much effort to set up, plus it becomes inflexible if there's a forced detour (for example because of an accident).
Or maybe it'll work if you never deviate from the route (which I generally don't but even then, GPS sometimes has other ideas).

Currently I 'workaround' it by first setting the waypoint as destination, then once I'm close, picking the next bookmark and setting that as destination. Needless to say, finding parking spots to do this isn't always possible, and doing it while driving (if you don't have a passenger) is not ideal. Plus it does actually draw the route and compute the correct length/ETA etc with waypoints, it's just not giving the turn-by-turn instructions.

@mvglasow
Copy link
Contributor

Can you tell us which exact version of Navit you are using? (Menu > About should give you the version.) Where exactly did you obtain it: are you referring to our Github releases when you say “download center”?

Can you reliably reproduce the behavior you are describing, i.e. does the same behavior occur every time, or just sometimes?

I have noticed similar behavior (route is calculated and drawn but instructions never show) without waypoints, when Navit recalculates the route following to a traffic report (which you will only get from an external app, such as Qz or Roadeagle). It might be a regression of adding traffic to Navit – or something that I only started noticing because of the more frequent route recalculations when getting traffic updates. However, the error appears to be sporadic in nature and I have been unable to reproduce it in a lab environment so far. Therefore, if you could provide a way to reproduce this, it would be greatly appreciated.

@BruhP8
Copy link

BruhP8 commented Aug 11, 2021

I can confirm im experiencing something similar on a linux build running on RPi based on the files currently on the repo.
Using the visit before function seems to be screwing up instructions as well as distance / ETA. This can sometimes be fixed by restarting Navit. This happens everytime for me.
I am not using any traffic awareness app, but from what @mvglasow is saying, I suspect that both after a traffic report or after adding a destination, Navit doesnt re create the route properly and something breaks. It would also explain why restarting navit can fix the route, as it forces Navit to re create a route from scratch.

@barbeque-squared
Copy link
Contributor Author

Completely forgot to add this in the original ticket, but like @BruhP8 I'm not using any kind of traffic awareness app. In fact while on the move it doesn't even have any kind of connection (expect GPS of course, and perhaps a USB cable charging through the car cigarette thing).

@mvglasow

Can you tell us which exact version of Navit you are using?

0.5.6.arm64-v8a+git:xdevxgitxnotxfound-
(I think I currently have the debug version installed, but iirc the release one also has the notxfound thing)

Where exactly did you obtain it:

https://download.navit-project.org/ (my one was downloaded less than 10 days ago)

Can you reliably reproduce the behavior you are describing,

I have been unable to reproduce it in a lab environment so far. Therefore, if you could provide a way to reproduce this, it would be greatly appreciated.

I have never been able to reproduce it if I went to a bookmark and "Set as position (and deactivate vehicle)".

On GPS position, it seems to trigger about half of the times on the initial planning (possibly because the GPS jumps to a different street if stationary). Seems to trigger more ofter on longer routes.

In reality, there is a case where I can reliably trigger this on GPS: I can just plan anything with waypoints that will take me onto the A28 towards the northeast. See this route, zoom out a bit to see the actual A28.
In reality I'll not follow that route, but go over the Prins Bernhardlaan instead. At first it'll try to U-turn me but somewhere along the Prins Bernhardlaan it'll figure it out and draw the new route. And that is the exact moment the instructions/announcements stop working.

Obviously it's caused by the road hierarchy here, but it'll happen in other places as well. For example if you're leaving a gridded campsite, and you don't take the exact route navit wants you to take, it 'recalculates' and announcements/instructions are gone. Same for daring to make a rest stop along the highway on a 500km+ route with waypoints.

If needed I can walk/cycle/drive the Prins Bernhardlaan route if it'll help in the issue (though if I also need to be able to adb at the same time I'll need to set that up first).

@OLFDB
Copy link
Contributor

OLFDB commented Sep 4, 2021

I can reproduce it using attached destination.txt.

  • Enable demo device.
  • Select Jägerstraße from list of destinations and set as destination.
  • Select A38 and set as start
  • Select Clausthaler Straße and set as waypoint before waypoint one.

After that route description is empty but showing distance and ETA being updated.

destination.txt

@mvglasow
Copy link
Contributor

The issue I have observed before is #986 and seems to be triggered by route recalculations (caused by traffic updates).

Unfortunately I am quite busy these days and might not get around to looking into it. If somebody wants to take a look at it, you are more than welcome. Some pointers:

  • route.c is where we calculate the route, i.e. the way segments used to get from one point on the map to another.
  • navigation.c is where we generate the maneuvers for a given route.
  • When the user inputs a destination in Navit, first the route is calculated. Internally, a callback is registered for the route object, which gets triggered when the route is finished and initiates maneuver generation.
  • The first thing I would advise checking is if that callback gets called under all circumstances, or if I missed some conditions.
  • You can also look at commits I made between late 2016 and mid-2019, which is when I did most of the traffic work, to get an idea of what changes were made (be warned that we are talking about some 400+ commits, though).

As I said, contributions will be welcome – we need more people getting familiar with the code base!

@edd-cgfan
Copy link

As long time Navit user I also can confirm this behavior, but can't tell when it started. However it has been there for a long time. Here I'll attach what I have noticed and how I play around with it.
Hope it helps and gives hints to find where it is triggered.

  1. I'm not driving:
    Planning the route in my house or similar.
    Settings -> Rules -> Lock on road is set.
    In navit.xml: route_pref="1800".
    The waypoints are in a bookmark folder and I also use the button to add all bookmarks as waypoints.
    If the OSD items and the route description are empty I use a different vehicleprofile from my list of vehicleprofiles. They can be found in attached file:
    my_vehicleprofiles.txt
    Changing back and forth between the vehicleprofiles helps in most of the cases for routes up to 300 km.
    Often only one change is successful.
    There is a route of a bit more than 500 km and there I can see that the OSD items and also the route description are updated after finishing route calculation. However, immediately after less than a second both are empty again. Route description only shows ETA and distance.

  2. If driving:
    In most cases works shutting down Navit and starting it again because of the ability of Navit storing the last destination or route in destination.txt.

My setup:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants