-
Notifications
You must be signed in to change notification settings - Fork 1
Cellulo V1 Installation [Linux & Android]
This guide covers the installation of the Cellulo framework on a Linux desktop for development on said Linux desktop and deployment to both Linux and Android.
Tested:
- On Ubuntu 16.04, 17.10 and 18.04
- With Android API 23, also known as Android 6 or Marshmallow
- With Android SDK Tools 25.2.5, newer versions removed many tools such as
android
required by the Qt deployment workflow so don't go beyond this version - With Android NDK r10e
- With Qt 5.10.0, Qt 5.11.1
Create a repository on c4science, set up SSH keys and VCS password following the guide: https://c4science.ch/w/c4science/
###libdots installation
This is to obtain the command-line tool to overlay the dot pattern on PDFs for localization.
NOTE: While using git clone with HTTPS, if encountered with server certification failed error message, the following command can be used (use it at your own risk): Export GIT_SSL_NO_VERIFY=1 With this command git ignores the SSL certificate verification (https://bytefreaks.net/tag/git_ssl_no_verify).
- Install
git
andcmake
.
-
For Windows, if not added automatically, add the install directory of CMake to system PATH environment variables Note: cmake [] : Uses as the build tree, and loads the path to the source tree from its CMakeCache.txt file, which must have already been generated by a previous run of CMake. The specified path may be absolute or relative to the current working directory.
- Install
libpodofo-dev
andlibfreetype6-dev
. - Clone https://c4science.ch/diffusion/514/libdots.git, the tool is in
tools/pdf-overlayer/
. - Follow the build instructions for libdots at https://c4science.ch/diffusion/514/browse/master/tools/pdf-overlayer/README.md.
- Use as
libdots-pdf-overlayer -i mypage.pdf -o mypage-dotted.pdf
.
###Qt framework installation
This is to set up the development environment necessary for Cellulo.
- Download Qt Open Source installer from the internet, it should be named something like
qt-unified-linux-x64-2.0.5-online.run
. - Make this file runnable by
chmod 755 qt-unified-linux-x64-2.0.5-online.run
. - Run
sudo ./qt-unified-linux-x64-2.0.5-online.run
, follow the installer. - Create an account or login.
- Continue installing in
/opt/Qt
. You can install somewhere else but you'll have to adapt the path accordingly in the future. - Select
Desktop gcc 64-bit
andAndroid ARM v7
fromQt 5.10.0
(could be a beta version depending on the date you're following this guide), others are not necessary. - Finish install.
-
Important for the future: Run
chmod 777 /opt/Qt/5.10.0/gcc_64/qml
andchmod 777 /opt/Qt/5.10.0/android_armv7/qml
for easier installation of the qml plugins. If you don't do this, you'll have tosudo make install
.
###Android SDK installation
This is the first step to be able to deploy Cellulo applications to Android devices. Can be omitted if no Android deployment is desired.
-
Install
openjdk-8-jre
andopenjdk-8-jdk
. -
Download http://dl.google.com/android/android-sdk_r22.3-linux.tgz.
-
Unpack it and move the resulting
android-sdk-linux
directory to/opt/
. -
Go to
/opt/android-sdk-linux/tools/
and run./android
. -
Install the recommended stuff (newer
Android SDK Tools
,Android SDK Platform-Tools
,Android SDK Build-Tools
etc. andAPI 23
) and restart with./android
| (*) Note: If faced with “Stopping ADB server failed (code -1)” error while installing, kill the ADB server and restart the server again from the command window, and lastly re-start the IDE.
| -
Install the newest
Android SDK Tools
,Android SDK Platform-Tools
andAndroid SDK Build-Tools
, no need to install any newer API, API 23 is enough. Note that some API version functionalities do not support the Linux environment, yet, therefore manually unselect the latest API version from the SDK installation window and select the newest fully supported API version. -
Do the relaunching and installation of newer
Android SDK Tools
(don't go beyond 25.2.5!),Android SDK Platform-Tools
andAndroid SDK Build-Tools
until no newer version is left.
###Android NDK installation
This is the second step to be able to deploy Cellulo applications to Android devices. Can be omitted if no Android deployment is desired.
- Download http://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip.
- Unpack it and move the resulting
android-ndk-r10e
directory to/opt/
.
If you have installed Qt version higher than 5.11, do NOT use this option. Use option 2
| (*) Note: The repositories are cloned from GitHub, hence the SSH key generated and added to the c4science portal must be added to the GitHub portal as well.|
Install all necessary repos from https://c4science.ch/source/cellulo-core/
For each of the installed libraries, follow the build instructions:
- Follow the build instructions for desktop at https://c4science.ch/diffusion/505/browse/master/README.md.
- Follow the build instructions for Android at https://c4science.ch/diffusion/505/browse/master/README.md. Can be omitted if no Android deployment is desired.
Alternatively you can follow the next steps to download each repo separately.
This installs the Cellulo QML plugin which provides the API to work with the robots.(*)
- Clone https://c4science.ch/diffusion/505/cellulo-qml-plugin.git.
- Set up your github ssh keys on your machine, you can follow https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ and then https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/.
- Install
mesa-common-dev
andlibgl1-mesa-dev
. - Install also
libbluetooth-dev
. Can be omitted if no swarm functionality is desired (i.e more than 5 robots, multiple Bluetooth adapters etc.). - Follow the build instructions for desktop at https://c4science.ch/diffusion/505/browse/master/README.md.
- Follow the build instructions for Android at https://c4science.ch/diffusion/505/browse/master/README.md. Can be omitted if no Android deployment is desired.
| (*) Note: If you are using Qt 5.11 or older, you can install all cellulo-qml-plugin and the other plugins all at once by cloning and building the project cellulo-core. See https://c4science.ch/source/cellulo-core/ |
These are necessary plugins that work alongside cellulo-qml-plugin
.
- Clone the following:
- Follow the build instructions at the README.md files within the plugins, they are the exact same as
cellulo-qml-plugin
.
###Test an application on the Linux desktop
- Launch Qt Creator.
- From
Open Project
in the main screen, loadcellulo-qml-plugin/samples/cellulo-hello-world/cellulo-hello-world.pro
. - Select the desktop configuration.
- When project is loaded, select desktop from the bottom left and click the big green arrow button to launch.
###Test an application on an Android device
- Install
ant
. - Launch Qt Creator.
- Go to Tools -> Options -> Devices -> Android, enter the
Android SDK Location
as/opt/android-sdk-linux
andAndroid NDK Location
as/opt/android-ndk-r10e
. - From
Open Project
in the main screen, loadcellulo-qml-plugin/samples/cellulo-hello-world/cellulo-hello-world.pro
. - Select the Android configuration.
- Plug in your Android device that has Debugging over USB enabled.
- Select Android from the bottom left and click the big green arrow button to launch it on the Android device.
Note: If a Device has too low API level
error is encountered, from within the project files in Qt Creator, go to Other files -> android -> AndroidManifest.xml and change the Minimum required SDK
and Target SDK
to the device's SDK versions.
Cellulo V1