Skip to content

Latest commit

 

History

History
218 lines (142 loc) · 6.04 KB

File metadata and controls

218 lines (142 loc) · 6.04 KB

Linux installation from sources

Sub-packages

The is constituted of several sub-packages. Depending on the use of those packages, some or all of them must be built. These are the packages of and the dependencies between them:

Sub-package Description Depends on
Main C++ library with the implementation and API to create Nodes.
Project to auto-generate a Python library from .
Main Python library with API to create AML-IP Nodes.
Sphinx documentation project.

Dependencies

These are the dependencies required in the system before building from sources.

  • cmake_gcc_pip_wget_git_sl_installation
  • asiotinyxml2_installation
  • openssl_installation
  • yamlcpp_installation
  • swig_installation
  • colcon_installation [optional]
  • gtest_installation [for test only]
  • eprosima_dependencies

CMake, g++, pip, wget and git

These packages provide the tools required to install and its dependencies from command line. Install CMake, g++, pip, wget and git using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install cmake g++ pip wget git

Asio and TinyXML2 libraries

Asio is a cross-platform C++ library for network and low-level I/O programming, which provides a consistent asynchronous model. TinyXML2 is a simple, small and efficient C++ XML parser. Install these libraries using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libasio-dev libtinyxml2-dev

OpenSSL

OpenSSL is a robust toolkit for the TLS and SSL protocols and a general-purpose cryptography library. Install OpenSSL using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libssl-dev

yaml-cpp

yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec, and is used by DDS Router application to parse the provided configuration files. Install yaml-cpp using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install libyaml-cpp-dev

SWIG

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. In this project, it is used to wrap C++ API to generate a Python library. Install SWIG using the package manager of the appropriate Linux distribution. For example, on Ubuntu use the command:

sudo apt install swig

Colcon

Install the ROS 2 development tools (colcon and vcstool) by executing the following command:

pip3 install -U colcon-common-extensions vcstool

Note

If this fails due to an Environment Error, add the --user flag to the pip installation command.

Gtest

Gtest is a unit testing library for C++. For a detailed description of the Gtest installation process, please refer to the Gtest Installation Guide.

If using colcon, it is also possible to clone the Gtest Github repository into the workspace and compile it as a dependency package. Add this new package to .repos file before importing the sources:

googletest-distribution:
    type: git
    url: https://github.com/google/googletest.git
    version: release-1.12.1

eProsima dependencies

These are the eProsima libraries required for building :

  • foonathan_memory_vendor, an STL compatible C++ memory allocation library.
  • fastcdr, a C++ library that serializes according to the standard CDR serialization mechanism.
  • fastrtps, the core library of eProsima Fast DDS library.
  • cmake_utils, an eProsima utilities library for CMake.
  • cpp_utils, an eProsima utilities library for C++.
  • ddsrouter_core, the eProsima DDS Router library C++.

If they are already available in the system there is no need to build them again, just source them when building the . If using CMake, add the already libraries installation paths to LD_LIBRARY_PATH. If using colcon, use the following command to source them:

source <eprosima-dependencies-installation-path>/install/setup.bash

Installation methods

There are two main possibilities to build from sources in Linux. One of them uses CMake and the other colcon, an auto-build framework.

Note

Colcon version is advised for non advanced users as it is easier and neater.

Colcon <linux_colcon> CMake <linux_cmake>