navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
551 stars 173 forks source link

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

Open barbeque-squared opened 3 years ago

barbeque-squared commented 3 years ago

The issue

How to reproduce:

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

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:

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

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

I can reproduce it using attached destination.txt.

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

destination.txt

mvglasow commented 3 years ago

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:

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

edd-cgfan commented 2 years ago

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: