Installation

From jderobot
Jump to: navigation, search


There are three options to install JdeRobot: (1) from debian packages; (2) using dockers; (3) from GitHub. In order to install JdeRobot5 you must have a machine running Ubuntu Linux 16.04 Xenial or Debian stable. Only 64bit architecture is supported. It's highly recommended to have a machine with at least 2GB of RAM, and support for 3D graphics processing

The source code of JdeRobot is at GitHub. The last stable release is:

JdeRobot-5.6.1 (October 2017) Release notes Tag


From Debian packages

We generate packages for easy installation both for Ubuntu Linux Xenial (16.04 LTS) and Debian Linux Jessie. Both for 64bits only. For other host systems, please use the source code or the Docker image.

JdeRobot depends on many other software pieces like OpenCV library, ROS middleware, Gazebo simulator, etc. and so it has many dependences. The first step is to prepare the installation of all the dependences from their original creators and maintainers,

Add the repositories

  • Add the lastest ROS sources:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
  • Add the lastest Gazebo sources:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 67170598AF249743
  • Add the lastest zeroc-ice sources:
sudo apt-add-repository "deb http://zeroc.com/download/apt/ubuntu$(lsb_release -rs) stable main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 5E6DA83306132997
  • Add JdeRobot repository (using dedicated file /etc/apt/sources.list.d/jderobot.list):
    • For Ubuntu Xenial(16.04)
sudo sh -c 'cat<<EOF>/etc/apt/sources.list.d/jderobot.list
# for ubuntu 16.04 LTS (64 bit)

deb [arch=amd64] http://jderobot.org/apt xenial main
EOF'


  • Get and add the public key from the JdeRobot repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv B0E7F58E82C8091DF945A0453DA08892EE69A25C
  • Update the repositories
sudo apt update


Installation itself

  • Install JdeRobot:
sudo apt install jderobot

After installing the package, you can close the terminal and reopen it to source the environment variables, OR just type:

source ~/.bashrc


Installing selected Tools

If you want to install a tool/driver in particular, you can install it with as follows:

  • C++ tools/drivers: apt install jderobot-toolName
sudo apt install jderobot-cameraview jderobot-cameraserver 
  • Python tools: apt install jderobot-toolName-python
sudo apt install jderobot-uav-viewer-python
  • WebTools: WebTools are installed together
sudo apt install jderobot-webtools


Troubleshooting

Tip: solve NO_PUBKEY

Official repositories have his GPG key in a reference repository. So most thrid-party repos should raise this warning

W: GPG error: http://apt-mirror.jderobot.org precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8A3751519274DEF

In order to solve it, add public key manually (note: risk of phising)

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D8A3751519274DEF
$ sudo aptitude update

Updating

If you already have a previous version of the package installed, you only have to do:

sudo apt update && sudo apt upgrade

From Docker image

If you want to run JdeRobot in MS-Windows, MacOS or other Linux distributions you can use Docker containers. We have prepared a Docker image with current JdeRobot Release and all the necessary components to be used with JdeRobot-Academy. To download it, use:

docker pull jderobot/jderobot

For more information follow this link

From source code at GitHub

Downloading the source code from the GitHub is strongly NOT RECOMMENDED for new users unless you know what you are doing.

Install the dependences

If you want to develop your own components and compile&test existing ones, follow these steps:

  • Add the lastest ROS sources:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
  • Add the lastest Gazebo sources:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 67170598AF249743
  • Add the lastest zeroc-ice sources:
sudo apt-add-repository "deb http://zeroc.com/download/apt/ubuntu$(lsb_release -rs) stable main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 5E6DA83306132997
  • Add JdeRobot repository (using dedicated file /etc/apt/sources.list.d/jderobot.list):
    • For Ubuntu Xenial(16.04)
sudo sh -c 'cat<<EOF>/etc/apt/sources.list.d/jderobot.list
# for ubuntu 16.04 LTS (64 bit)

deb [arch=amd64] http://jderobot.org/apt xenial main
EOF'


  • Get and add the public key from the JdeRobot repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv B0E7F58E82C8091DF945A0453DA08892EE69A25C
  • Update the repositories
sudo apt update
  • Install JdeRobot dependencies
$ sudo apt install jderobot-deps-dev


  • Install the script that tunes the environment variables for ROS in your .bashrc configuration file, and run it for the current shell:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc 
source ~/.bashrc 

Download the source code

  • You can download the current development release:
git clone http://github.com/JdeRobot/JdeRobot.git
cd JdeRobot
mkdir build && cd build
  • Alternatively you can download the last stable release.
- Click on this link to download the zip file
- Uncompress it:
unzip JdeRobot-master.zip

Compile and install

  • Check system and dependencies
cmake ..
  • Compile
make
  • Install
sudo make install
  • Once everything is installed, install the script that tunes the environment variables for jderobot in your .bashrc configuration file, and run it for the current shell:
echo "source /opt/jderobot/setup.bash" >> ~/.bashrc 
source ~/.bashrc 

And that's it! Now you can test your own components or the existing ones.

Compiling selected Tools

The installation of the whole project may take several minutes to complete, depending on your machine. If you only want to test some components and don't want to wait for the whole project to be compiled, you can compile only the components you're going to use. To do so you have to (in the JdeRobot folder):

  • Select components and check system and dependencies
  • If using plain cmake from the shell, you can select the desired components via build_componentName cmake variables and set the default option with build-default. For example, the following line would set cmake to build no component by default (build-default=OFF) and build components introrob (build_introrob=ON) and basic_component (build_basic_component=ON):
mkdir build && cd build
cmake -Dbuild-default=OFF -Dbuild_introrob=ON -Dbuild_basic_component=ON ..
  • If using a cmake GUI (i.e.: ccmake) no additional arguments are needed; however it's recommended to set build-default=OFF if you aren't going to build most of the components.
mkdir build && cd build
cmake -Dbuild-default=OFF ..
  • Compile
make
  • Install
sudo make install

Troubleshooting

IMPORTANT NOTE: If you upgraded your system from Ubuntu 14.04 to Ubuntu 16.04, you MUST delete your current JdeRobot installation COMPLETELY (dependencies included) and reinstall it as usual. Also, for the moment, jderobot-deps-dev does not install ICE3.6 python dependencies, so you have to:

$ sudo pip2 install --upgrade pip
$ sudo pip2 install zeroc-ice

We are trying to solve this issue

Installation of JdeRobot in ARM

If you want to compile JdeRobot in ARM systems (Raspberry Pi,...), you have to install the following dependencies:

NOTE: This installation hasn't support for gazebo plugins.


Install JdeRobot dependencies

JdeRobot has different external dependencies to build its structure. There are two types of dependencies: necessary dependencies and other dependencies. The firsts are needed to compile and install the basics of JdeRobot, that is, all its libraries and interfaces that are needed for the components or to develop components that use JdeRobot. The seconds are needed just for some components, but are not really necessary unless you want to use that components. For instance, the component gazeboserver uses Gazebo, a 3D robot simulator, so to use this component you may install Gazebo first.


  • Add the lastest ROS sources (for ubuntu):
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

Some libraries are required to compile, link or run JdeRobot 5. Just type the following commands:

  • Basic libraries:
sudo apt install build-essential libtool cmake g++ gcc git make
  • OpenGL libraries:
sudo apt install freeglut3 freeglut3-dev libgl1-mesa-dev libglu1-mesa
  • GTK2 libraries:
sudo apt install libgtk2.0-0 libgtk2.0-bin libgtk2.0-cil libgtk2.0-common libgtk2.0-dev libgtkgl2.0-1
sudo apt install libgtkgl2.0-dev libgtkglext1 libgtkglext1-dev libglademm-2.4-dev libgtkmm-2.4-dev 
sudo apt install libgnomecanvas2-0 libgnomecanvas2-dev  libgtkglext1-doc libgnomecanvasmm-2.6-dev
sudo apt install libgnomecanvasmm-2.6-1v5 libgtkglextmm-x11-1.2-0v5 libgtkglextmm-x11-1.2-dev
  • Gtk3 libraries:
sudo apt install libgoocanvasmm-2.0-6 libgoocanvasmm-2.0-dev
  • GSL libraries:
sudo apt install libgsl2 gsl-bin libgsl-dev
  • LibXML:
sudo apt install libxml++2.6-2v5 libxml++2.6-dev libtinyxml-dev
  • Eigen:
sudo apt install libeigen3-dev
  • Fireware:
sudo apt install libdc1394-22 libdc1394-22-dev
  • USB:
sudo apt install libusb-1.0-0 libusb-1.0-0-dev
  • CWIID:
sudo apt install libcwiid-dev
  • Python components:
sudo apt install python-matplotlib python-pyqt5 python-pip python-numpy python-pyqt5.qtsvg
  • Qfi

It can be compiled and installed from source: https://github.com/JdeRobot/ThirdParty/tree/master/qflightinstruments

  • Qt 5
sudo apt install qtbase5-dev libqt5declarative5 libqt5script5 libqt5svg5-dev
  • Boost
sudo apt install libboost-system-dev libboost-filesystem-dev
  • ROS
sudo apt install ros-kinetic-roscpp ros-kinetic-std-msgs ros-kinetic-cv-bridge ros-kinetic-image-transport ros-kinetic-roscpp-core ros-kinetic-rospy ros-kinetic-nav-msgs ros-kinetic-geometry-msgs ros-kinetic-kobuki-gazebo

Once all ros packages are installed, install the script that tunes the environment variables ROS in your .bashrc configuration file, and run it for the current shell:

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc 
source ~/.bashrc 
  • Google glog (logging)
sudo apt install libgoogle-glog-dev

GStreamer

GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plug-ins. This framework is used for Camera component interface impletentations. JdeRobot 5.0 Components, such us cameraserver requieres this libraries and development packages.

sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

ICE

The new version of JdeRobot requieres this GNU component as a feature for communicating different JdeRobot components in order to make them work together in a distributed system environment. ICE (or Internet Communications Engine) is a modern object-oriented middleware with support for C++, .NET, Java, Python, Objective-C, Ruby, and PHP., stands for Internet Communications Engine. The software consists of a set of services that allows multiple processes running on one or more machines to interact. It is an object-oriented middleware that provides object-oriented Remote Procedure Call, grid computing and Publish/subscribe functionality developed by ZeroC and dual-licensed under the GNU GPL and a proprietary license. As a high-performance Internet communications platform, Ice includes a wealth of layered services and plug-ins. Ice is built on concepts which will be familiar to CORBA programmers, and supports a wide variety of programming languages and runtime platforms. Slice is the interface description language used in Ice. They haven't packages for ARM systems. you need compile it. Install dependencies:

sudo apt install libdb5.3-dev libdb5.3++-dev libssl-dev libbz2-dev libmcpp-dev

compile ice:

git clone -b 3.6 https://github.com/zeroc-ice/ice.git 
cd ice/cpp
make CPP11=yes OPTIMIZE=yes
make install

Configure ICE for Python with pip

sudo pip2 install --upgrade pip
sudo pip2 install zeroc-ice

OpenNI 2

The OpenNI 2.0 API provides access to PrimeSense compatible depth sensors. It allows an application to initialize a sensor and receive depth, RGB, and IR video streams from the device. It provides a single unified interface to sensors and .ONI recordings created with depth sensors. OpenNI also provides a uniform interface that third party middleware developers can use to interact with depth sensors. Applications are then able to make use of both the third party middleware, as well as underlying basic depth and video data provided directly by OpenNI. To install openni2 type:

sudo apt-get install libopenni2-dev libopenni-dev

For further information go Openni2 Documentaition

Point Cloud Library

The PCL framework contains numerous state-of-the art algorithms including filtering, feature estimation, surface reconstruction, registration, model fitting and segmentation, as well as higher level tools for performing mapping and object recognition. To install PCL libraries and headers type

sudo apt-get install libpcl-dev

For further information go to PCL site

OpenCV

sudo apt-get install ros-kinetic-opencv3

NodeJS

Used for JdeRobot WebTools

sudo apt-get install nodejs

Kobuki robot libraries

You can find the source code in our git repository (http://github.com/jderobot/thirdparty.git)

SDK Parrot for ArDrone

If you want to install it manually from our third party repository, you only have to:

  • Create a folder to compile the code
mkdir ardronelib-build && cd ardronelib-build
  • Download the installer, a CMakeLists.txt file
wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/CMakeLists.txt
wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/ffmpeg-0.8.pc.in
wget https://raw.githubusercontent.com/RoboticsURJC/JdeRobot-ThirdParty/master/ardronelib/ardronelib.pc.in
  • Compile and install as usual:
cmake .
make
sudo make install

Install JdeRobot

Once all the dependencies (or the ones you need) are installed, you can download the source code of JdeRobot and install it as follows:

  • Download the source code from git:
git clone http://github.com/RoboticsURJC/JdeRobot.git
cd JdeRobot/

Edit JdeRobot/Deps/ice/CmakeLists.txt changing /usr/lib/x86_64-linux-gnu/c++11 by /opt/Ice-3.6.4/lib/arm-linux-gnueabihf/c++11/

  • Check system and dependencies
mkdir build && cd build
cmake ..
  • Compile
make
  • Install
<pre>
sudo make install

Previous Releases

Release Source code
JdeRobot-5.6.0 (October 2017) Release notes Tag
JdeRobot-5.5.2 (April 2017) Release notes Tag
JdeRobot-5.5.0 (March 2017) Release notes Tag
JdeRobot-5.4.2 (November 2016) Release notes Tag
JdeRobot-5.4.1 (October 2016) Release notes Tag
JdeRobot-5.4.0 (July 2016) Release notes Tag
JdeRobot 5.3.3 (April 2016) Release notes Tag
JdeRobot 5.3.2 (April 2016) Release notes Tag
JdeRobot 5.3.1 (April 2016) Release notes Tag
JdeRobot 5.2.4 (July 2014) Release Notes Tarball: JdeRobot-5.2.4-RC1.tgz.
JdeRobot 5.2.3 (February 2014) Release Notes Tarball: JdeRobot-5.2.3.tgz
JdeRobot 5.2.2 (February 2014) Release Notes Tarball: JdeRobot-5.2.2.tgz
JdeRobot 5.2.1 (October 2013) Release Notes Tarball: JdeRobot-5.2.1.tgz
JdeRobot 5.2.0 (July 2013) ReleaseNotes Tarball: JdeRobot-5.2.0
JdeRobot 4.3.1 ReleaseNotes Tarball: JdeRobot-4.3.1
JdeRobot 4.2.1 Tarball: JdeRobot-4.2.1