Install your IDE

Linux

Install your environment following these guidelines: (Ubuntu 16.04)

Install pre-requisites

In a console window, enter the following command:

sudo apt-get install python3-pip unzip build-essential gdb git pkg-config default-jre libqt5core5a libgtk2.0-0 libwebp5 libjasper1 libopenexr22 libopenni0 libdc1394-22 libavcodec-ffmpeg56 libavutil-ffmpeg54 libavformat-ffmpeg56 libswscale-ffmpeg3

And follow the instructions to complete the installation

Install QT Creator from QT installer

Then, just run the installer. For this, open a console window and enter the following command:

$ cd ~/Downloads

(English version)

or

cd ~/Téléchargements

(French version)

Then:

$ chmod 755 qt-opensource-linux-x64-5.9.1.run
$ sudo ./qt-opensource-linux-x64-5.9.1.run

Set up environment variables

  • create a BCOMDEVROOT directory on your local hard drive

    mkdir [path]/BCOMDEVROOT
    mkdir [path]/BCOMDEVROOT/linux

Add the following line into your ~/.profile file:

export BCOMDEVROOT= "[path]/BCOMDEVROOT/linux"

Also add the following line to your .bashrc file:

export PATH=/opt/Qt5.9.1/5.9/gcc_64/bin/:/opt/Qt5.9.1/Tools/QtCreator/bin/:$PATH

Windows 7/10

Pre-requisites

Install pkgconfig, sourcetree, python3 and jre.

pkg-config

pkg-config is a helper tool used when compiling applications and libraries.

Sourcetree

Sourcetree is a free git client for windows and mac.

  • Download it on the following web site: https://www.sourcetreeapp.com/ During Sourcetree installation, choose to download the embedded version of git program.

python3

Python is a widely used high-level programming language for general-purpose programming. Python3 is requiredby SolAR in order to create new components, based on templates.

jre

Java Runtime Environment, or JRE, is required in order to download third parties libraries based on your environment.

Install Visual Studio

You can either install Visual Community 2015 (adapted for OpenSource) or install Visual Studio 2015.

https://b-com.com/en

Check Visual Studio C /C ++compiler is installed correctly

Create a new C++ project and follow steps advised by the prompt.

If the compiler is not installed, you will have an option to install it right from the new project window.

You should verify you are able to run a console application "hello world" in C++.

https://b-com.com/en

Install QT creator

Install QT community by downloading and launching the following file:

http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe

During installation choose a minimal QT 5.9.0 with msvc2015 64bits, and QT Tools→QT creator (default selection) only

Check your QT configuration

Open the "tools/options" window and section "build and run"; please check compiler and debugger is installed. Every tab should be filled in.

  • Compiler

env
  • Debugger

env

If not, make sure your Visual installation is complete (see sections just above).

If Qt does not autodetect the windows debugger, you might need to manually install the debugging tools for Windows, as stated on [http://doc.qt.io/qtcreator/creator-debugger-engines.html this Qt Page]. You can get the Windows Driver Kit that contains the debugging tools from [https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit this page].

Set up environment variables

  • create a BCOMDEVROOT directory on your local hard drive For instance at the following location:

env

[path]/BCOMDEVROOT/windows

Add the following environment variable:

BCOMDEVROOT= "[path]/BCOMDEVROOT/windows"
Do not use "\" in BCOMDEVROOT variable!!!
  • create a XPCF_REGISTRY_PATH

Do not use "\" in BCOMDEVROOT variable!!! . that an XPCF_REGISTRY_PATH environment variable must be set, pointing to the packages XML file
  1. the XML file itself must be modified, depending on your installation: precisely you will have to set the path to your package library

Install and build SolAR Framework

it will install also SolarContainerOpenCV, a container of components SolAR compatible .

Download and build SolAR from scratch

  1. Create a SolAR directory

  2. Using a git client, clone the following repository on the develop branch:

    git clone -b develop ssh://gitolite@forge.b-com.com/argo/tools/build-scripts.git

windows users

  • Double click on build-scripts/solarshell.bat

buildscript repo
  • Execute the following command:

    ./build-scripts/fromscratch.sh
buildscript repo

Check your SolARFramework has been correctly installed, in looking in your BCOMDEVROOT folder.

  • Open your BCOMDEVROOT{yourOS}\bcomBuild

You should see a SolARFramework, a XPCF (pipeline manager) and a ContainerOpenCV directory.

check your installation

Check the SolAR third parties have been correctly installed, in looking in your BCOMDEVROOT folder.

packagedependencies in project

  • Open your BCOMDEVROOT{yourOS}\thirdParties

You should see a boost and a opencv directory.

packagedependencies in project

linux users

  • Open a terminal console, and go to your SolAR directory

  • Execute the following command:

    ./build-scripts/fromscratch.sh

Test your first SolAR program

Once you have installed SolAR, you are able to run your first SolAR program.

Look at your SolARframework folder

folder content after installation

You can see you have installed:

  1. the Core framework ins SolARFramework directory

  2. a Container or Package based on OpenCV .

The OpenCV container is a first implementation based on SolAR API. in this directory, you will see some features and tests.

container opencv tests

tous les tests devraient fonctionner, ce n’est pas le cas actuellement

choose a test program

You can for example open the SolARDescriptorMatcher program. For this program, and for each test, you can choose a dynamic or a static version. Let’s see with the static version here.

  • Open the SolARContainerOpenCV\tests\SolARDescriptorMatcher\static folder.

There are source files, and a packagedepencies.txt files, precizing which third parties are used.

NOTE : ce serait bien de préciser comment c’est utilisé techniquement

packagedependencies in project

Just have a look at packagedepencies.txt, it contains the definition of third parties used by this program.

  • SolARFramework|1.0.0|SolARFramework|bcomBuild|url_repo_artifactory

  • SolARContainerOpenCV|1.0.0|SolARContainerOpenCV|bcomBuild|url_repo_artifactory

  • xpcf|1.0.0|xpcf|bcomBuild|http://repository.b-com.com/

  • boost|1.64.0|boost|thirdParties|http://repository.b-com.com/

  • opencv|3.2.0|opencv|thirdParties|http://repository.b-com.com/

Just remind that the third parties shoule be available in your BCOMDEVROOT{yourOS}\thirdParties repository.

Open it the pro file in your favorite IDE.

test opencv solar matcher

configure your build

Configure the project build, add the "make install" line as described in this image.

configure example make install

Add also an image in arguments, so that the program can track the image in the camera vision.

command line execution arguments

run it

Then build and tun the program.

keypoint Matcher example

if you have problems for compiling or execute a program, feel free to contact us.

Update and re-build SolAR

Windows users

Double click on build-scripts/solarshell.bat

Unix users

Open a terminal console, and go to your SolAR directory

Update code source.

From your SolAR folder, update the develop branches of the three following git repositories: SolarFramework, SolarContainerOpenCV and xpcf. To do so, repeat the following commands inside the three folders, SolarFramework, SolarContainerOpenCV and xpcf:

$ git checkout develop
$ git pull origin develop
$ git submodule update --init --recursive
$ git submodule foreach git checkout develop
$ git submodule foreach git pull origin develop

Re-build SolAR

Run:

./build-scripts/build.sh debug

and/or

./build-scripts/build.sh release