From 9953b6417f10e9d69feb7974f4fd85e1e38ee0eb Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Fri, 20 May 2016 16:40:59 +0200 Subject: refine README files and build scripts --- src/navigation/README | 154 -------------------------------------- src/navigation/README.md | 82 ++++++++++++++++++++ src/navigation/build.sh | 47 ++++++++++++ src/navigation/clone_and_build.sh | 38 ++++++++++ src/navigation/rebuild_all.sh | 47 ------------ 5 files changed, 167 insertions(+), 201 deletions(-) delete mode 100644 src/navigation/README create mode 100644 src/navigation/README.md create mode 100755 src/navigation/build.sh create mode 100755 src/navigation/clone_and_build.sh delete mode 100755 src/navigation/rebuild_all.sh (limited to 'src') diff --git a/src/navigation/README b/src/navigation/README deleted file mode 100644 index e125fe3..0000000 --- a/src/navigation/README +++ /dev/null @@ -1,154 +0,0 @@ -Release date of the file: 31-03-2016 -Status: OK - -Project: -Navigation software based on Navit and compliant with the Navigation APIs standardized by the GENIVI Alliance -This project is one of the navigation-service common projects that implements the GENIVI navigation APIs. - -More: -The GENIVI APIs are implemented into navit plugins, running on DBus. The HMI is made in Qml -See also other navigation projects like proof of concepts implemented for poi-service, traffic-info and positioning - -What is in: -This folder contains scripts for building Navit and the GENIVI plugins. It runs only the navigation middleware (without the HMI) -FYI: the application (with the HMI) is located into git://git.projects.genivi.org/lbs/navigation-application.git - it's possible to build and run the whole stuff directly from that repository - -Author: -Martin Schaller -Philippe Colliot philippe.colliot@mpsa.com -Marco Residori marco.residori@xse.de - -License: -See headers and LICENSE file - -Test target: -Ubuntu 14.04 LTS - -=============================== -Current versions of additional code -=============================== - (git): 48451e36a8c21afb00575227d27e10417c27878c - (git): 162a3e43d14531a7053872903674351a3142eea2 - -=============================== -How to get additional code -=============================== -Get positioning: -git clone http://git.projects.genivi.org/lbs/positioning.git ./positioning -cd positioning -git checkout -cd ../ - -Get navit: -git clone https://github.com/navit-gps/navit.git -cd navit -git checkout -cd ../ - - -Now apply patches to navit (The r5549 removed the get_unique features used by GetSpell, and another one is required to run it on the RENESAS board): -cd navit -patch -p0 -i ../patches/search_list_get_unique.diff -patch -p0 -i ../patches/fsa_issue_padding.diff -cd ../ - -=============================== -Directory Structure -=============================== -map-viewer/ -the plugins for the map rendering and manipulation (zoom, scroll..) -navigation-core/ -the plugins for basic navigation features (location input, route calculation...) -poi-cam/ -the plugins for poi content access module -patches/ -some patches to complete the navit code -map/ -the map -navit/ -basic code of navit -positioning/ -the code of positioning - -=============================== -How To Build -=============================== - -========================================== -Known issues -========================================== -There's an issue with navit (R6135) against gtk. -If the env variable NAVIT_GRAPHICS is not set, by default the graphics are gtk based. -- for gtk, navit checks for freetype. Because of a missing symbolic link, it's necessary to do ln -s /usr/include/freetype2/ /usr/include/freetype -- despite navit enables gtk_drawing, there's a pb during runtime (to be fixed) -So, for the time being, export NAVIT_GRAPHICS='sdl' is set into the run script - -========================================== -All-in-one script -========================================== -./rebuild_all.sh - -========================================== -How-to step by step, with explanations -========================================== - -(you're supposed to have got additional code before) - -Create and enter the build folder: -mkdir ./build -cd build - -For the time being, navit is not being able to be built directly with the top CmakeLists.txt (to be improved), so it's needed to do it separately: -mkdir navit -cd navit -cmake -DDISABLE_QT=1 -DSAMPLE_MAP=0 -Dvehicle/null=1 -Dgraphics/qt_qpainter=0 ../../navit/ -make -cd ../ - -Now let's build the other parts: -cmake ../ -make -cd .. - -=============================== -How To Run -=============================== -./run -r - -=============================== -How To Test -=============================== -(launch a new term and go to the CWD of this README) -cd ../../test/navigation -./test-route-calculation.py - -If everything is OK, you must see: - -Test PASSED - -=============================== -How To for Yocto -=============================== -Due to a different way to manage the build, some specific settings are required: - -cmake -DYOCTO_BUILD=ON ../ - -=============================== -How To for Common API (experimental) -=============================== -You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI) - -cd build -cmake -DWITH_PLUGIN_MIGRATION=ON -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH= -DCOMMONAPI_DBUS_TOOL_DIR= -DCOMMONAPI_TOOL_DIR= -DWITH_DEBUG=ON ../ -make -cd .. - -Copy the configuration file ./resource/commonapi-dbus.ini in a directory of your choice - -Set the environment variable COMMONAPI_DBUS_DEFAULT_CONFIG before starting the poi-manager-server. - -Example: -export COMMONAPI_DBUS_DEFAULT_CONFIG=/commonapi-dbus.ini - - diff --git a/src/navigation/README.md b/src/navigation/README.md new file mode 100644 index 0000000..55b2421 --- /dev/null +++ b/src/navigation/README.md @@ -0,0 +1,82 @@ +# Navigation middleware + +## Synopsis +This folder contains a navigation software based on Navit and compliant with the Navigation APIs standardized by the GENIVI Alliance. Some test scripts are available into the ../../test/navigation folder. +The GENIVI APIs are implemented by navit plugins, running on DBus. + +##Tested targets +Desktop: Tested under Ubuntu 16.04 LTS 64 bits +Hardware: Code is running on the [Genivi Demo Platform](https://github.com/GENIVI/genivi-dev-platform) (Yocto based) + +## Third parties software +Positioning from [https://github.com/GENIVI/positioning](https://github.com/GENIVI/positioning) +Navit from [https://github.com/navit-gps/navit/](https://github.com/navit-gps/navit/) +NB: Patches are applied to navit: +search_list_get_unique.diff features used by GetSpell +fsa_issue_padding.diff required to run on the GDP +NB: For displaying current versions used by the code type ./reload.sh in command line +The code is regularly aligned with the latest versions of the third parties software + +## Prerequisities +Under Ubuntu, some packets are needed to be installed: +sudo apt-get install xsltproc libdbus-cpp-dev libdbus-c++-dev libglib2.0-dev gtk+-2.0 libglibmm-2.4-dev libxml++2.6-dev libgtk-3-dev libdbus-1-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev inkscape qt5-qmake qtbase5-dev-tools qtbase5-dev qttools5-dev-tools qtdeclarative5-dev + +## How to build +### From scratch +A script allows to clone the third parties code (i.e. positioning and navit) and rebuild all +./clone_and_build.sh +### Build +A script allows either: +to clean and rebuild all (including invoking cmake) +./build.sh -c +or to build updated parts +./build.sh + +## How to test +Some python scripts can be used for test. +Goto ../../test/navigation +For Python, you need to install some modules +sudo apt-get install python-pip python-dbus python-gobject python-pil +sudo pip install --upgrade pip + +To test, launch the navigation middleware by entering: +./run-r +test files: +./test-route-calculation.py +./test-location-input.py +./test-map-viewer-control.py +NB: there's a bug when the map is closed, so you need to restart the navigation after the last one + +If everything is OK, you must see: + +Test PASSED + +##Directory Structure + +map-viewer/ +the plugins for the map rendering and manipulation (zoom, scroll..) +navigation-core/ +the plugins for basic navigation features (location input, route calculation...) +poi-cam/ +the plugins for poi content access module +patches/ +some patches to complete the navit code +map/ +the map +navit/ +basic code of navit +positioning/ +the code of positioning + +##Known issues + +There's an issue with navit against gtk. +If the env variable NAVIT_GRAPHICS is not set, by default the graphics are gtk based. +- for gtk, navit checks for freetype. Because of a missing symbolic link, it's necessary to do ln -s /usr/include/freetype2/ /usr/include/freetype +- despite navit enables gtk_drawing, there's a pb during runtime (to be fixed) +So, for the time being, export NAVIT_GRAPHICS='sdl' is set into the run script + +There's an issue with the svg to png library so inkscape is used. It seems to be necessary to do: +export NO_AT_BRIDGE=1 + + diff --git a/src/navigation/build.sh b/src/navigation/build.sh new file mode 100755 index 0000000..e91a68b --- /dev/null +++ b/src/navigation/build.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +clean=0 + +while getopts c opt +do + case $opt in + c) + clean=1 + ;; + \?) + echo "Usage:" + echo "$0 [-c ]" + echo "-c: Rebuild with clean" + exit 1 + esac +done + +if [ "$clean" = 1 ] +then + echo 'clean up the build folder' + if [ -d "./build" ] + then + find ./build ! -name '*.cbp' -type f -exec rm -f {} + + fi +fi + +mkdir -p build +cd build +mkdir -p navit +cd navit +echo 'build navit' +if [ "$clean" = 1 ] +then + cmake -DDISABLE_QT=1 -DSAMPLE_MAP=0 -Dvehicle/null=1 -Dgraphics/qt_qpainter=0 ../../navit/ +fi +make +cd ../ +echo 'build navigation' +if [ "$clean" = 1 ] +then + cmake ../ +fi +make +cd .. + + diff --git a/src/navigation/clone_and_build.sh b/src/navigation/clone_and_build.sh new file mode 100755 index 0000000..310984b --- /dev/null +++ b/src/navigation/clone_and_build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +positioning_version='9e65831eed02cc8a1b2e2e73787d6007b54214b4' +navit_version='42f9d3484516c88c7cdf647817a6d6a2acac53c2' + +echo "version of positioning is: $positioning_version" +echo "version of navit is: $navit_version" + +echo -n "This script deletes, reloads and builds everything, are you sure ? (y or n) " +read input + +if [ ! "$input" = 'y' ] +then + exit 1 +fi + +if [ -d "./build" ] +then + find ./build ! -name '*.cbp' -type f -exec rm -f {} + +fi +rm -rf navit +rm -rf positioning + +git clone https://github.com/GENIVI/positioning.git ./positioning +cd positioning +git checkout $positioning_version +cd .. +git clone https://github.com/navit-gps/navit.git +cd navit +git checkout $navit_version +patch -p0 -i ../patches/search_list_get_unique.diff +patch -p0 -i ../patches/fsa_issue_padding.diff +cd .. + +./build.sh -c + + + diff --git a/src/navigation/rebuild_all.sh b/src/navigation/rebuild_all.sh deleted file mode 100755 index e91a68b..0000000 --- a/src/navigation/rebuild_all.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -clean=0 - -while getopts c opt -do - case $opt in - c) - clean=1 - ;; - \?) - echo "Usage:" - echo "$0 [-c ]" - echo "-c: Rebuild with clean" - exit 1 - esac -done - -if [ "$clean" = 1 ] -then - echo 'clean up the build folder' - if [ -d "./build" ] - then - find ./build ! -name '*.cbp' -type f -exec rm -f {} + - fi -fi - -mkdir -p build -cd build -mkdir -p navit -cd navit -echo 'build navit' -if [ "$clean" = 1 ] -then - cmake -DDISABLE_QT=1 -DSAMPLE_MAP=0 -Dvehicle/null=1 -Dgraphics/qt_qpainter=0 ../../navit/ -fi -make -cd ../ -echo 'build navigation' -if [ "$clean" = 1 ] -then - cmake ../ -fi -make -cd .. - - -- cgit v1.2.1