Open Source Voice Navigation?

I want to write a navigation based Open Source realtime carpooling app. For this, I am evaluating the Graphhopper Server and the Graphhopper Navigation Example app as a base. I need open source software on both sides.

Now, the example app calls the Graphhopper Directions API, which is not open source, as far as I know. On the other hand, this page suggests, that both parts are open source and the README of the Navigation SDK says, that it plays well
with the open source GraphHopper server as well as the GraphHopper Directions API.

So what changes are needed, such that the app uses my own instance of the GraphHopper server instead of the Directions API?

Maybe I need only change the base_url in developer-config.xml and I just couldn’t figure out the path.

Yes. You need to change the client to point to your server which is done in the developer-config.xml (You’ll also need vector tiles). And then you need to include the graphhopper-navigation module in the application to serve the /navigate endpoint.

Yay, it works!

I struggled a bit finding out how to include the graphhopper-navigation module.

What worked for me:

  • build the module with mvn install
  • In intellij: File -> Project Structure -> Modules -> + Import Module
  • navigate to graphhopper-navigation/pom.xml and hit OK
1 Like

Some questions:

  1. The example app has a menu for language selection. But when I choose German, I hear no voice any more. Is there any specific magic that makes this work?
  2. What do I need to do, to use the vector tiles produced by graphhoppers MVTResource? Yes, I am aware, that they are suitable only for debugging. (What I tried so far: download and unzip https://github.com/graphhopper/graphhopper/files/3243055/gh-mvt-style.zip, edit it to point to http://10.0.2.2:8989/mvt/{z}/{x}/{y}.mvt and serve it locally. 10.0.2.2. is localhost seen from the android emulator. But I dont see a map.)

This is a really great question and would love to know if and how this works :smiley:

Did you use this style to get it working for maputnik? Maputnik

@boldtrn are there any debug techniques or log entries @maxky can have a look at to make our debugging view work in the app?

But when I choose German, I hear no voice any more. Is there any specific magic that makes this work?

When you change the language on your device - does that work?

There are two problems:

  1. The style is slightly outdated. Can you try gh-mvt-style.json (2.4 KB) ? The tile URL is http://127.0.0.1:8989/mvt/{z}/{x}/{y}.mvt?details=max_speed&details=road_class and the filter is regarding max_speed not speed.
  2. Currently we are rather restrictive regarding the zoom, i.e. you need to zoom a bit in before roads appear. You can change this on the server here and here.

With the fixed style at least on maputnik the roads appear.

When you change the language on your device - does that work?

Unfortunately not. I set the device language to German and tried both, “Default for Device” and “German” and I don’t hear anything in both cases. When I choose “English” it works again.

It works partially. That is, the roads show up on high zoom levels, nothing else, in particular no labels. But the good news is, the data connection works, it was a style problem. And it doesn’t seem to be the style, I need. I need something for car navigation. I’ll try osm-bright.

Then it works already I guess. It is far from being usable for car navigation, even if you make the street labels working, there will be many things missing from this debug pane.

Is this a limitation of MVTResource or is it due to the style?

It just shows the road data that is available in the storage, but you’ll likely want more for a better guidance (city names+boundaries, rivers, rails and buildings etc)

The only thing missing from the style that is already in the storage is the road name.

I just double checked, German works for me.

A couple of things to look out for:

  • Do you have the TTS language installed?
  • Do you use a Samsung device? Their S-Voice implementation is known to be bit “special”. If you are using a Samsung device, could you try to switch to the Google TTS.

For the Kurviger app, while using a different platform, we do have some debugging tips if you can’t hear voice output, maybe this can help as well.

Are there any errors in your IDE?

1 Like

That was the problem, Thnk you.

More precisely, the problem was, that the emulator for strange reasons had no internet access in certain cases and therefore could not download the german speech data. With a newly set up emulator, it worked out of the box.

Hooray! It works!

As for the tiles, I use OpenMapTiles now, which is also pretty easy to install locally (see https://openmaptiles.com/server/#install ). Thus I got the whole universe on my dev machine, everything Open Source.

1 Like

:+1:

Usually 3 components are necessary for any maps application (maps, routing, geocoding). Do you have the geocoding part :wink: ? → see here or here

I have successfully configured graphhoper server on my local machine and it is working perfect from localhost. I need to include graphhoper-navigation module in my server. I have build the complete project in NetBeans. How can I add the navigation module?. Please guide

Thanks
Aamir