Page tree
Skip to end of metadata
Go to start of metadata

Copyright notice


Introduction

So called “Fuel Stop Advisor” is a code to demonstrate main APIs standardized by the GENIVI Alliance under the Navigation scope.

NB: For convenience, the project is mentioning the fuel, but it can be adapted to any other kind of energy, and refill station can be for instance dedicated to electric vehicle.

Main features are:

  • Predictive evaluation of the tank distance on the route ahead
  • Warning in case of destination wouldn’t be reached with the remaining fuel level
  • Proposal of rerouting to an available refill station

This page describes the basic features of the FSA, with some screenshots picked from the FSA running under Ubuntu.

The FSA is also part of the GDP. The how-to build FSA on GDP will be documented soon under this [[1]] wiki.

Architecture


The features of the FSA are implemented as follows:

  • Basic navigation (select a destination, calculate a route, guidance)
    • plugins on top of Navit middleware (NavigationCore plugin, MapViewer plugin, POI CAM plugin)
    • this code is the code used by the proof of concepts of Navigation (that are requested to publish the APIs into the compliance).
  • Tank distance on the route ahead
    • piece of code that implements a basic trip computer (distance, average speed, average fuel consumption, tank distance based on history of the driver behavior and enhanced tank distance
    • the enhanced tank distance is using very simple prediction of the fuel consumption (based of speed limit on the route segments)
  • Location of refill stations
    • POI search server
    • this code is the code used by the POIService POC
    • a POI plugin on top of the Navit middleware, that implements a content access module, to extend the search to data coming from the OpenStreet map database
  • Position
    • Enhanced position server
    • this code is the code used by the positioning POC
    • log replayer and log files to simulate a vehicle position
  • Additional vehicle data
    • Automotive message broker
    • a specific plugin to connect to the log replayer
    • there's an extension of the existing log replayer in order to simulate fuel level, fuel consumption...
  • The HMI
    • QML panels
    • a piece of code that implements a gateway between QML/js and the DBus
    • specific panels designed for FSA and customizable
  • A test panel
    • python3 based
    • by using different log files, high and low fuel level are sent to the FSA, that makes appear the warning button on the HMI

Repository organization

The entry point for the code is this repository:

http://git.projects.genivi.org/lbs/navigation-application.git

FSA is using specific code and code cloned from other repositories:

http://git.projects.genivi.org/lbs/navigation.git

http://git.projects.genivi.org/lbs/positioning.git

https://github.com/otcshare/automotive-message-broker.git

http://svn.code.sf.net/p/navit/code/trunk

All the build process is CMake based.

The download of additional code and part of the build has to be made manually, everything is described into the README file [[2]] under the src/ folder.

For example, a complete download/cmake/make sequence is listed into this file [[3]].

Code in detail

Patches and specific implementations

Automotive message broker is patched to be able to use the DBus Session (by default it's limited to the system bus).

Navit (R6135 of the svn repos) is patched to add the Spell feature.

Process

In a full demo configuration, the FSA is fed with input data provided by a test script in Python. The main software is launched by:

   ./run -r

The started process are:

  • Automotive message broker (to provide the fuel level, fuel consumption on the DBus)
  ./ambd/ambd --config logreplayerconfig.in.json
  • POI server (for search on POIs)
  poi-server -f empty.db
  • Enhanced position service (for position on DBus)
  enhanced-position-service
  • An instance of Navit for the map rendering and control
  ./navit -d 0 -c navit_genivi_mapviewer.xml
  • An instance of Navit for the navigation core features
  ./navit -d 0 -c navit_genivi_navigationcore.xml
  • The fuel stop advisor application (including the trip computer)
  fuel-stop-advisor
  • The HMI (the DBus to QML gateway and the QML based HMI)
  hmi-launcher application.qml

python3 simulation-dashboard.py calls periodically log-replayer with different log file, depending on the simulation step

HMI

HMI map


HMI generation

A very simple tool is provided to generate the HMI. The HMI (in QML) can be customized by using style sheets and pictures, and generated by a python script in GIMP. Three sets of gimp files are available into the git repository: green-theme in 800x480 and 1024x768 gdp-theme in 800x480

How it works

If we take the example of the navigation search menu, the QML file is something like that:

"NavigationSearch.qml"

   import "Core/style-sheets/style-constants.js" as Constants;
   import "Core/style-sheets/navigation-search-menu-css.js" as StyleSheet;
   HMIBgImage {
       image:StyleSheet.navigation_search_menu_background[Constants.SOURCE];
       anchors { fill: parent; topMargin: parent.headlineHeight}
       Text {
           x:StyleSheet.searchTitle[Constants.X]; y:StyleSheet.searchTitle[Constants.Y]; width:StyleSheet.searchTitle[Constants.WIDTH]; height:StyleSheet.searchTitle[Constants.HEIGHT];color:StyleSheet.searchTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.searchTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.searchTitle[Constants.PIXELSIZE];
           style: Text.Sunken;
           smooth: true
           id: searchTitle
           text: Genivi.gettext("SearchMode")
       }

The location, the color, the font size ... are generated automatically from the GIMP. For instance, the x location of the title is given by x:StyleSheet.searchTitle[Constants.X]. Under GIMP, the 'searchTitle' layer contains the text.

NB: the layer names are the shared tags between the GIMP design and the QML. For consistency it's needed to keep exactly the same names.


"style-constants.js"

   //index used by the style generator
   var SOURCE = 0;
   var X = 1;
   var Y = 2;
   var WIDTH = 3;
   var HEIGHT = 4;
   var TEXTCOLOR = 5;
   var PIXELSIZE = 6;
   var STYLE = 7;
   var STYLECOLOR = 8;


The style sheet is generated with the python script under GIMP:

"navigation-search-menu-css.js"

   .pragma library
   Qt.include("style-constants.js");
   var searchTitle=new Object;
   searchTitle[X]=274;
   searchTitle[Y]=175;
   searchTitle[WIDTH]=267;
   searchTitle[HEIGHT]=43;
   searchTitle[TEXTCOLOR]=Qt.rgba(1.00, 1.00, 0.00, 1.00);
   searchTitle[STYLECOLOR]=Qt.rgba(1.00, 1.00, 0.00, 1.00);
   searchTitle[PIXELSIZE]=36;

Let's play with it

First, start the application by typing

  • under src
  ./run -r
  • under test/script
  python3 simulation-dashboard.py

Into the test panel, type 'h' to refill the tank.

Two windows are displayed:

Click on 'NAVI' button:

Click on the mailbox: (a predefined address is used as default)

At this step, it's possible to choose another one by clicking on one of the keyboard icons:

After this location input step, a menu allows to select the starting point and the destination (the simulation panel sends a predefined location, so it's possible to directly go to the destination.) Click on the hand in the destination line to select the entered address.

Click on GO TO and calculate the route:

And finally launch the route guidance by clicking on ON: (the simulation panel can be activated into the settings panel)

Now let's simulate a low level into the tank by typing 'l' into the test panel:

The refill icon appears into the FSA window:

Click on the tank icon, the POI menu is displayed, now click on SEARCH and select a station:

By clicking on REROUTE you'll be rerouted to the station.

Some tracks of improvement

For sure, FSA is far from being a commercial product. Nevertheless, because it's based on Navit and it uses GENIVI APIs, it can be an interesting alternative, as a demo bench for innovations, and a customizable OSS navigation.

Alignment with the latest versions of third party software

Navit

Current Navit version used by the FSA is the r6135 (SVN). Into the git repository of Navit, some new versions have been recently updated. It makes sense to align with the freshest one.

Spell patch: To be reintroduced into the mainstream

AMB

To add the patch (the one that allows to rn in the session bus) into the maintream.

HMI

The current HMI needs some improvements to make it more convenient.

FSA is using QML QtQuick 2.1 Qt 5.3. Navit seems to implement some QML, but built on an older version Qt 4.7. It could make sense to unify the QML used by Navit and FSA, in order to maintain only one set of files.

New features

To implement a reachable area displayed on the map.

To visualize weather info on the map, by getting it from external WEB sources

GENIVI world

To connect the FSA to persistence